diff options
-rw-r--r-- | src/display.cc | 8 | ||||
-rw-r--r-- | src/display.h | 1 | ||||
-rw-r--r-- | src/system.cc | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/display.cc b/src/display.cc index 4b4c22d..0a64c18 100644 --- a/src/display.cc +++ b/src/display.cc @@ -86,6 +86,14 @@ void Display::multiplex() } } +void Display::reset() +{ + for (int i = 0; i < 8; i++) + disp_buf[i] = 0xff; + str_pos = 0; + char_pos = -1; +} + /* * Draws a single display column. This function should be called at least once * per millisecond. diff --git a/src/display.h b/src/display.h index 655ffa1..3eab2a8 100644 --- a/src/display.h +++ b/src/display.h @@ -15,6 +15,7 @@ class Display { void enable(void); void disable(void); void multiplex(void); + void reset(void); char string[128]; }; diff --git a/src/system.cc b/src/system.cc index 340615d..6c44a30 100644 --- a/src/system.cc +++ b/src/system.cc @@ -75,6 +75,7 @@ void System::loop() i = 0; } else if (modem_char == 0) { i = 0; + display.reset(); } } } |