diff options
author | Wilba6582 <Wilba6582@users.noreply.github.com> | 2018-09-28 06:09:14 +0200 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2018-09-28 06:09:14 +0200 |
commit | a173eda6d28bd09b2d59448a6532edb7a6c8e358 (patch) | |
tree | d8f1f40684eaf4dad48502fc75cd383d53b34011 /keyboards/zeal60 | |
parent | b382076ad1a6d857b6f185077b5f3635801b4ad6 (diff) | |
download | qmk_firmware-a173eda6d28bd09b2d59448a6532edb7a6c8e358.tar.gz qmk_firmware-a173eda6d28bd09b2d59448a6532edb7a6c8e358.tar.xz |
Improved dynamic keymaps (#3972)
* Improved dynamic keymaps
* K&R sucks
Diffstat (limited to 'keyboards/zeal60')
-rw-r--r-- | keyboards/zeal60/zeal60.c | 9 | ||||
-rw-r--r-- | keyboards/zeal60/zeal60_api.h | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/keyboards/zeal60/zeal60.c b/keyboards/zeal60/zeal60.c index e516c4dbf..092235ca6 100644 --- a/keyboards/zeal60/zeal60.c +++ b/keyboards/zeal60/zeal60.c @@ -81,9 +81,9 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) dynamic_keymap_set_keycode( command_data[0], command_data[1], command_data[2], ( command_data[3] << 8 ) | command_data[4] ); break; } - case id_dynamic_keymap_clear_all: + case id_dynamic_keymap_reset: { - dynamic_keymap_clear_all(); + dynamic_keymap_reset(); break; } #endif // DYNAMIC_KEYMAP_ENABLE @@ -171,9 +171,8 @@ void matrix_init_kb(void) #endif // RGB_BACKLIGHT_ENABLED #ifdef DYNAMIC_KEYMAP_ENABLE - // This saves "empty" keymaps so it falls back to the keymaps - // in the firmware (aka. progmem/flash) - dynamic_keymap_clear_all(); + // This resets the keymaps in EEPROM to what is in flash. + dynamic_keymap_reset(); #endif // Save the magic number last, in case saving was interrupted diff --git a/keyboards/zeal60/zeal60_api.h b/keyboards/zeal60/zeal60_api.h index baa8ac09f..eaac3ad7c 100644 --- a/keyboards/zeal60/zeal60_api.h +++ b/keyboards/zeal60/zeal60_api.h @@ -24,7 +24,7 @@ enum zeal60_command_id id_set_keyboard_value, id_dynamic_keymap_get_keycode, id_dynamic_keymap_set_keycode, - id_dynamic_keymap_clear_all, + id_dynamic_keymap_reset, id_backlight_config_set_value, id_backlight_config_get_value, id_backlight_config_save, |