From d1d0e300d9c3a7d6289afcb0bfc544f5d9e81eee Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 20 Jan 2016 13:30:25 +0100 Subject: display: add variable for scroll delay --- src/display.cc | 3 ++- src/display.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3