summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-01-20 13:30:25 +0100
committerDaniel Friesel <derf@finalrewind.org>2016-01-20 13:30:25 +0100
commitd1d0e300d9c3a7d6289afcb0bfc544f5d9e81eee (patch)
tree891e93d77d00b4730f6ac298f4a36e99ce7a1c1c
parentf0261ac07dada88c46bc6bb74a55324425cfba9c (diff)
display: add variable for scroll delay
-rw-r--r--src/display.cc3
-rw-r--r--src/display.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/display.cc b/src/display.cc
index 0a64c18..b0bc636 100644
--- a/src/display.cc
+++ b/src/display.cc
@@ -20,6 +20,7 @@ Display::Display()
disp_buf[6] = 0xff;
disp_buf[7] = 0xff;
char_pos = -1;
+ scroll_delay = 400;
}
void Display::disable()
@@ -58,7 +59,7 @@ void Display::multiplex()
if (++active_col == 8)
active_col = 0;
- if (++scroll == 512) {
+ if (++scroll == scroll_delay) {
scroll = 0;
for (i = 0; i < 7; i++) {
diff --git a/src/display.h b/src/display.h
index 3eab2a8..666648a 100644
--- a/src/display.h
+++ b/src/display.h
@@ -6,6 +6,7 @@
class Display {
private:
+ uint16_t scroll_delay;
uint8_t active_col;
uint8_t disp_buf[8];
uint8_t str_pos;