diff options
author | jack <[email protected]> | 2023-07-29 18:08:33 -0600 |
---|---|---|
committer | jack <[email protected]> | 2023-07-29 18:08:33 -0600 |
commit | 9fd39337e1c4ce006cafbf576b40479ef4831f69 (patch) | |
tree | 306df2b696d182c2e6fb5f0651e005af40017837 /waffle/oled.c | |
parent | 7976a931a0f1a65b54a34b74c5387b27e4d0ce86 (diff) | |
download | qmk_me-9fd39337e1c4ce006cafbf576b40479ef4831f69.tar.gz qmk_me-9fd39337e1c4ce006cafbf576b40479ef4831f69.zip |
fixup some keyboards & unicode
Diffstat (limited to 'waffle/oled.c')
-rw-r--r-- | waffle/oled.c | 7 |
1 files changed, 3 insertions, 4 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++; } |