From 49dc332a0401c9089afe91d2d06dc1f4e18fe01b Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sun, 4 Apr 2021 04:42:29 +0900 Subject: [Keymap] cleanup keyboards/helix/{rev2|rev3_5rows}/keymaps/five_rows (#12259) * cleanup keyboards/helix/{rev2|rev3_5rows}/keymaps/five_rows * Made the layout data easier to read. * helix/rev2/keymaps/five_rows/keymap.c * helix/rev3_5rows/keymaps/five_rows/keymap.c * The following two were made the same. * keymaps/five_rows/config.h * keymaps/five_rows/oled_display.c The binary of the compilation result has not changed. * update keyboards/helix/rev2/keymaps/five_rows/rules.mk KEYBOARD_LOCAL_FEATURES_MK was moved to the end. * add '#define DISABLE_SYNC_TIMER' into helix/rev3_5rows/keymaps/five_rows/config.h The sync timer features worsen the matrix scan rate of the Helix keyboard. I'm not sure if it makes sense to have sync timer features enabled on the Helix keyboard. So in my keymap I disable this. --- keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c') diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c b/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c index 127d80cc7d..689efe4c88 100644 --- a/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c @@ -163,6 +163,10 @@ void render_status(void) { } # ifdef SSD1306OLED +# if OLED_UPDATE_INTERVAL > 0 +uint16_t oled_update_timeout; +# endif + void iota_gfx_task_user(void) { struct CharacterMatrix matrix; @@ -172,6 +176,12 @@ void iota_gfx_task_user(void) { } # endif +#if OLED_UPDATE_INTERVAL > 0 + if (timer_elapsed(oled_update_timeout) < OLED_UPDATE_INTERVAL) { + return; + } + oled_update_timeout = timer_read(); +#endif matrix_clear(&matrix); if (is_keyboard_master()) { render_status(&matrix); -- cgit v1.2.3