Cut the timers back to 8 bits, that's more than enough

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/389/head
Gergely Nagy 8 years ago
parent 2aa03bed47
commit 4a4ea83121

@ -22,8 +22,8 @@ namespace Akela {
GhostInTheFirmware::GhostKey *GhostInTheFirmware::ghostKeys; GhostInTheFirmware::GhostKey *GhostInTheFirmware::ghostKeys;
bool GhostInTheFirmware::isActive; bool GhostInTheFirmware::isActive;
uint16_t GhostInTheFirmware::currentPos; uint16_t GhostInTheFirmware::currentPos;
uint16_t GhostInTheFirmware::timer; uint8_t GhostInTheFirmware::timer;
uint16_t GhostInTheFirmware::timeOut; uint8_t GhostInTheFirmware::timeOut;
GhostInTheFirmware::GhostInTheFirmware (void) { GhostInTheFirmware::GhostInTheFirmware (void) {
} }
@ -49,7 +49,7 @@ namespace Akela {
return; return;
if (timeOut == 0) { if (timeOut == 0) {
timeOut = pgm_read_word (&(ghostKeys[currentPos].delay)); timeOut = pgm_read_byte (&(ghostKeys[currentPos].delay));
if (timeOut == 0) { if (timeOut == 0) {
currentPos = 0; currentPos = 0;

@ -26,7 +26,7 @@ namespace Akela {
typedef struct { typedef struct {
byte row; byte row;
byte col; byte col;
uint16_t delay; uint8_t delay;
} GhostKey; } GhostKey;
GhostInTheFirmware (void); GhostInTheFirmware (void);
@ -39,8 +39,8 @@ namespace Akela {
static GhostKey *ghostKeys; static GhostKey *ghostKeys;
static bool isActive; static bool isActive;
static uint16_t currentPos; static uint16_t currentPos;
static uint16_t timer; static uint8_t timer;
static uint16_t timeOut; static uint8_t timeOut;
static void loopHook (bool postClear); static void loopHook (bool postClear);
}; };

Loading…
Cancel
Save