diff options
author | Daniel Friesel <derf@finalrewind.org> | 2016-03-01 19:10:55 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2016-03-01 19:10:55 +0100 |
commit | af823d5dc61878e7aff1c8b66973e1ed7e5728f9 (patch) | |
tree | 8ea2146b58e493a6f2a46c76d1682fe16976aeb0 | |
parent | fbfadac23b3b8cb868d0a1cfbc232669699c1acd (diff) |
move "storage is empty" to PROGMEM as well
-rw-r--r-- | src/static_patterns.h | 7 | ||||
-rw-r--r-- | src/system.cc | 34 |
2 files changed, 8 insertions, 33 deletions
diff --git a/src/static_patterns.h b/src/static_patterns.h index 8d708dd..f590f60 100644 --- a/src/static_patterns.h +++ b/src/static_patterns.h @@ -23,5 +23,12 @@ const uint8_t PROGMEM flashingPattern[] = { 0x00, 0x00, 0x07, 0x33, 0x55, 0x98, 0x00, 0x00 }; +const uint8_t PROGMEM emptyPattern[] = { + 0x10, 0x1a, + 0x20, 0x00, + ' ', 1, ' ', 'O', 'h', 'a', 'i', ' ', '-' ,' ', + 'S', 't', 'o', 'r', 'a', 'g', 'e', ' ', 'i', 's', + ' ', 'e', 'm', 'p', 't', 'y' +}; #endif /* STATIC_PATTERNS_H_ */ diff --git a/src/system.cc b/src/system.cc index 9e7354d..1a5a060 100644 --- a/src/system.cc +++ b/src/system.cc @@ -97,39 +97,7 @@ void System::loadPattern(uint8_t anim_no) active_anim.data = disp_buf + 4; } else { - active_anim.type = AnimationType::TEXT; - active_anim.speed = (2 << 4) + 15; - active_anim.data = disp_buf; - active_anim.length = 26; - active_anim.delay = (0 << 4) + 0; - - // no strcpy_P or similar to save space - disp_buf[0] = ' '; - disp_buf[1] = 1; - disp_buf[2] = ' '; - disp_buf[3] = 'O'; - disp_buf[4] = 'h'; - disp_buf[5] = 'a'; - disp_buf[6] = 'i'; - disp_buf[7] = ' '; - disp_buf[8] = '-'; - disp_buf[9] = ' '; - disp_buf[10] = 'S'; - disp_buf[11] = 't'; - disp_buf[12] = 'o'; - disp_buf[13] = 'r'; - disp_buf[14] = 'a'; - disp_buf[15] = 'g'; - disp_buf[16] = 'e'; - disp_buf[17] = ' '; - disp_buf[18] = 'i'; - disp_buf[19] = 's'; - disp_buf[20] = ' '; - disp_buf[21] = 'e'; - disp_buf[22] = 'm'; - disp_buf[23] = 'p'; - disp_buf[24] = 't'; - disp_buf[25] = 'y'; + loadPattern_P(emptyPattern); } display.show(&active_anim); |