diff options
Diffstat (limited to 'waffle')
-rw-r--r-- | waffle/oled.c | 7 | ||||
-rw-r--r-- | waffle/tapping.c | 3 |
2 files changed, 5 insertions, 5 deletions
diff --git a/waffle/oled.c b/waffle/oled.c index a89ee7e..365c0af 100644 --- a/waffle/oled.c +++ b/waffle/oled.c @@ -170,11 +170,10 @@ void bongo(void) { #ifdef WPM_GRAPH void wpm_graph(void) { - float max_wpm = 160; - static uint8_t height = OLED_DISPLAY_HEIGHT - 1, vert_count = 0; + static uint8_t height = OLED_DISPLAY_HEIGHT - 1, vert_count = 0, max_wpm = 160; static uint16_t graph_timer = 0; if (timer_elapsed(graph_timer) > 100) { - height = 63 - ((get_current_wpm() / max_wpm) * 63); + height = 63 - ((get_current_wpm() / (float)max_wpm) * 63); for (uint8_t i = 0; i <= 1; i++) oled_write_pixel(3, height + i, true); if (vert_count == 3) { @@ -185,7 +184,7 @@ void wpm_graph(void) { } } else { for (uint8_t i = 63; i > height; i--) - if (i % 3 == 0) + if (!(i % 3)) oled_write_pixel(3, i, true); vert_count++; } diff --git a/waffle/tapping.c b/waffle/tapping.c index ab9e9d4..ce2bd1b 100644 --- a/waffle/tapping.c +++ b/waffle/tapping.c @@ -115,7 +115,8 @@ tap_dance_action_t tap_dance_actions[] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef UNICODE_COMMON_ENABLE - process_record_unicode(keycode, record); + if (!process_record_unicode(keycode, record)) + return false; #endif #ifdef OLED_ENABLE if (record->event.pressed) { |