From a29a83e925a3af8388e43a9784b9db9caef70c4b Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 14 Nov 2022 22:44:09 -0800 Subject: [PATCH] Revert "Add pointing device support to data driven config (#18215)" (#19063) --- data/mappings/info_config.hjson | 18 ------- data/mappings/info_rules.hjson | 2 - data/schemas/keyboard.jsonschema | 62 ------------------------- lib/python/qmk/cli/generate/config_h.py | 13 ------ 4 files changed, 95 deletions(-) diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson index a80d5cff6f09..a013e98b346a 100644 --- a/data/mappings/info_config.hjson +++ b/data/mappings/info_config.hjson @@ -11,10 +11,6 @@ // invalid: Default `false`. Set to `true` to generate errors when a value exists // replace_with: use with a key marked deprecated or invalid to designate a replacement "AUDIO_VOICES": {"info_key": "audio.voices", "value_type": "bool"}, - "AUTO_MOUSE_DEFAULT_LAYER": {"info_key": "pointing_device.auto_mouse.default_layer"}, - "AUTO_MOUSE_TIME": {"info_key": "pointing_device.auto_mouse.time"}, - "AUTO_MOUSE_DELAY": {"info_key": "pointing_device.auto_mouse.delay"}, - "AUTO_MOUSE_DEBOUNCE": {"info_key": "pointing_device.auto_mouse.debounce"}, "BACKLIGHT_BREATHING": {"info_key": "backlight.breathing", "value_type": "bool"}, "BREATHING_PERIOD": {"info_key": "backlight.breathing_period", "value_type": "int"}, "BACKLIGHT_LEVELS": {"info_key": "backlight.levels", "value_type": "int"}, @@ -91,19 +87,6 @@ "RGB_MATRIX_VAL_STEP": {"info_key": "rgb_matrix.val_steps", "value_type": "int"}, "RGB_MATRIX_SPD_STEP": {"info_key": "rgb_matrix.speed_steps", "value_type": "int"}, "RGBW": {"info_key": "rgblight.rgbw", "value_type": "bool"}, - "POINTING_DEVICE_AUTO_MOUSE_ENABLE": {"info_key": "pointing_device.auto_mouse.enabled"}, - "POINTING_DEVICE_CS_PIN": {"info_key": "pointing_device.pins.cs"}, - "POINTING_DEVICE_INVERT_X": {"info_key": "pointing_device.invert_x", "value_type": "bool"}, - "POINTING_DEVICE_INVERT_X_RIGHT": {"info_key": "split.pointing_device.right.invert_x", "value_type": "bool"}, - "POINTING_DEVICE_INVERT_Y": {"info_key": "pointing_device.invert_y", "value_type": "bool"}, - "POINTING_DEVICE_INVERT_Y_RIGHT": {"info_key": "split.pointing_device.right.invert_y", "value_type": "bool"}, - "POINTING_DEVICE_MOTION_PIN": {"info_key": "pointing_device.pins.motion"}, - "POINTING_DEVICE_SDIO_PIN": {"info_key": "pointing_device.pins.sdio"}, - "POINTING_DEVICE_SCLK_PIN": {"info_key": "pointing_device.pins.sclk"}, - "POINTING_DEVICE_TASK_THROTTLE_MS": {"info_key": "pointing_device.throttle", "value_type": "int"}, - "POINTING_DEVICE_GESTURES_CURSOR_GLIDE_ENABLE": {"info_key": "pointing_device.gestures.cursor_glide", "value_type": "bool"}, - "POINTING_DEVICE_GESTURES_SCROLL_ENABLE": {"info_key": "pointing_device.gestures.scroll", "value_type": "bool"}, - "PRODUCT": {"info_key": "keyboard_name", "warn_duplicate": false, "value_type": "str"}, "PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex"}, "VENDOR_ID": {"info_key": "usb.vid", "value_type": "hex"}, @@ -116,7 +99,6 @@ "SECURE_IDLE_TIMEOUT": {"info_key": "secure.idle_timeout", "value_type": "int"}, "SENDSTRING_BELL": {"info_key": "audio.macro_beep", "value_type": "bool"}, "SPLIT_MODS_ENABLE": {"info_key": "split.transport.sync_modifiers", "value_type": "bool"}, - "SPLIT_POINTING_ENABLE": {"info_key": "split.transport.sync_pointing", "value_type": "bool"}, "SPLIT_TRANSPORT_MIRROR": {"info_key": "split.transport.sync_matrix_state", "value_type": "bool"}, "SPLIT_USB_DETECT": {"info_key": "split.usb_detect.enabled", "value_type": "bool"}, "SPLIT_USB_TIMEOUT": {"info_key": "split.usb_detect.timeout", "value_type": "int"}, diff --git a/data/mappings/info_rules.hjson b/data/mappings/info_rules.hjson index 2cc465f30d6e..2f8656c4bf8e 100644 --- a/data/mappings/info_rules.hjson +++ b/data/mappings/info_rules.hjson @@ -36,8 +36,6 @@ "PS2_ENABLE": {"info_key": "ps2.enabled", "value_type": "bool"}, "PS2_MOUSE_ENABLE": {"info_key": "ps2.mouse_enabled", "value_type": "bool"}, "PS2_DRIVER": {"info_key": "ps2.driver"}, - "POINTING_DEVICE_ENABLE": {"info_key": "pointing_device.enabled", "value_type": "bool"}, - "POINTING_DEVICE_DRIVER": {"info_key": "pointing_device.driver"}, // Items we want flagged in lint "CTPC": {"info_key": "_deprecated.ctpc", "deprecated": true, "replace_with": "CONVERT_TO=proton_c"}, diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 353d9469d105..daf54141a874 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -363,48 +363,6 @@ } } }, - "pointing_device": { - "type": "object", - "properties": { - "enabled": {"type": "boolean"}, - "driver": {"type": "string"}, - "auto_mouse": { - "type": "object", - "properties": { - "enabled": {"type": "boolean"}, - "default_layer": {"type": "qmk.definitions.v1#/unsigned_int_8"}, - "time": {"type": "qmk.definitions.v1#/unsigned_int"}, - "delay": {"type": "qmk.definitions.v1#/unsigned_int"}, - "debounce": {"type": "qmk.definitions.v1#/unsigned_int"} - } - } - "pins": { - "type": "object", - "additionalProperties": false, - "properties": { - "motion": {"$ref": "qmk.definitions.v1#/mcu_pin"}, - "cs": {"$ref": "qmk.definitions.v1#/mcu_pin"}, - "sdio": {"$ref": "qmk.definitions.v1#/mcu_pin"}, - "sclk": {"$ref": "qmk.definitions.v1#/mcu_pin"} - } - }, - "throttle": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, - "invert_x": {"type": "boolean"}, - "invert_y": {"type": "boolean"}, - "gestures": { - "type": "object", - "properties": { - "cursor_glide": {"type": "boolean"}, - "scroll": {"type": "boolean"} - } - }, - "rotation": { - "type": "integer", - "minimum": 0, - "enum": [0, 90, 180, 270] - } - } - }, "rgb_matrix": { "type": "object", "properties": { @@ -586,25 +544,6 @@ "type": "string", "enum": ["eeprom", "left", "matrix_grid", "pin", "right"] }, - "pointing_device": { - "right": { - "type": "object", - "additionalProperties": false, - "properties": { - "side": { - "type": "string", - "enum": ["left", "right", "combined"] - }, - "invert_x": {"type": "boolean"}, - "invert_y": {"type": "boolean"}, - "rotation": { - "type": "integer", - "minimum": 0, - "enum": [0, 90, 180, 270] - } - } - } - }, "soft_serial_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, "soft_serial_speed": { "type": "integer", @@ -621,7 +560,6 @@ }, "sync_matrix_state": {"type": "boolean"}, "sync_modifiers": {"type": "boolean"}, - "sync_pointing": {"type": "boolean"}, "watchdog": {"type": "boolean"}, "watchdog_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} } diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py index 51051ef610e8..31b8d7063511 100755 --- a/lib/python/qmk/cli/generate/config_h.py +++ b/lib/python/qmk/cli/generate/config_h.py @@ -126,13 +126,6 @@ def generate_encoder_config(encoder_json, config_h_lines, postfix=''): config_h_lines.append(generate_define(f'ENCODER_RESOLUTIONS{postfix}', f'{{ {", ".join(map(str,resolutions))} }}')) -def generate_pointing_device_config(pointing_device_json, config_h_lines, postfix=''): - - rotation = pointing_device_json.get('rotation', 0) - - generate_define(f'POINTING_DEVICE_ROTATION_{rotation}{postfix}') - - def generate_split_config(kb_info_json, config_h_lines): """Generate the config.h lines for split boards.""" if 'primary' in kb_info_json['split']: @@ -163,9 +156,6 @@ def generate_split_config(kb_info_json, config_h_lines): if 'right' in kb_info_json['split'].get('encoder', {}): generate_encoder_config(kb_info_json['split']['encoder']['right'], config_h_lines, '_RIGHT') - if 'right' in kb_info_json['split'].get('pointing_device', {}): - generate_pointing_device_config(kb_info_json['split']['pointing_device']['right'], config_h_lines, '_RIGHT') - def generate_led_animations_config(led_feature_json, config_h_lines, prefix): for animation in led_feature_json.get('animations', {}): @@ -217,8 +207,5 @@ def generate_config_h(cli): if 'rgblight' in kb_info_json: generate_led_animations_config(kb_info_json['rgblight'], config_h_lines, 'RGBLIGHT_EFFECT_') - if 'pointing_device' in kb_info_json: - generate_pointing_device_config(kb_info_json['pointing_device'], config_h_lines) - # Show the results dump_lines(cli.args.output, config_h_lines, cli.args.quiet)