summaryrefslogtreecommitdiff
path: root/src/display.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/display.cc')
-rw-r--r--src/display.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/display.cc b/src/display.cc
index 42710c9..82c5020 100644
--- a/src/display.cc
+++ b/src/display.cc
@@ -37,8 +37,6 @@ void Display::enable()
void Display::multiplex()
{
static uint16_t scroll;
- uint8_t i, glyph_len;
- uint8_t *glyph_addr;
/*
* To avoid flickering, do not put any code (or expensive index
@@ -53,6 +51,15 @@ void Display::multiplex()
if (++scroll == scroll_delay) {
scroll = 0;
+ need_scroll = 1;
+ }
+}
+
+void Display::scroll() {
+ uint8_t i, glyph_len;
+ uint8_t *glyph_addr;
+ if (need_scroll) {
+ need_scroll = 0;
for (i = 0; i < 7; i++) {
disp_buf[i] = disp_buf[i+1];
@@ -87,6 +94,11 @@ void Display::reset()
char_pos = -1;
}
+void Display::setString(const char *new_str)
+{
+ setString((char *)new_str);
+}
+
void Display::setString(char *new_str)
{
reset();