diff options
-rw-r--r-- | src/system.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/system.cc b/src/system.cc index 8b02275..9aaa62b 100644 --- a/src/system.cc +++ b/src/system.cc @@ -16,6 +16,7 @@ extern volatile uint8_t disp[8]; void System::loop() { + static uint8_t i = 0; // both buttons are pressed if ((PINC & (_BV(PC3) | _BV(PC7))) == 0) { // naptime! @@ -64,7 +65,9 @@ void System::loop() } if (modem.buffer_available()) { - disp[0] = modem.buffer_get(); + disp[i++] = modem.buffer_get(); + if (i == 7) + i = 0; } } |