From 84758ec540877a79d2c9a4403b2023aa5d31eb17 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 22 Jan 2016 16:44:53 +0100 Subject: display: rename *scroll* to *update* (would be confusing for animations otherwise) --- src/display.cc | 12 ++++++------ src/display.h | 6 +++--- src/main.cc | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/display.cc b/src/display.cc index 82c5020..2059c9b 100644 --- a/src/display.cc +++ b/src/display.cc @@ -12,7 +12,7 @@ Display display; Display::Display() { char_pos = -1; - scroll_delay = 400; + update_delay = 400; } void Display::disable() @@ -49,17 +49,17 @@ void Display::multiplex() if (++active_col == 8) active_col = 0; - if (++scroll == scroll_delay) { + if (++scroll == update_delay) { scroll = 0; - need_scroll = 1; + need_update = 1; } } -void Display::scroll() { +void Display::update() { uint8_t i, glyph_len; uint8_t *glyph_addr; - if (need_scroll) { - need_scroll = 0; + if (need_update) { + need_update = 0; for (i = 0; i < 7; i++) { disp_buf[i] = disp_buf[i+1]; diff --git a/src/display.h b/src/display.h index 0887f72..f48d1c3 100644 --- a/src/display.h +++ b/src/display.h @@ -6,8 +6,8 @@ class Display { private: - uint16_t scroll_delay; - uint8_t need_scroll; + uint16_t update_delay; + uint8_t need_update; uint8_t active_col; uint8_t disp_buf[8]; uint8_t str_pos; @@ -19,7 +19,7 @@ class Display { void disable(void); void multiplex(void); void reset(void); - void scroll(void); + void update(void); void setString(const char *str); void setString(char *str); }; diff --git a/src/main.cc b/src/main.cc index 78cbd88..4398d02 100644 --- a/src/main.cc +++ b/src/main.cc @@ -38,7 +38,7 @@ int main (void) * it means we can immediately process the received data. */ rocket.loop(); - display.scroll(); + display.update(); } return 0; -- cgit v1.2.3