Reduce the amount of supported OneShot layers

Instead of supporting up to 24 one-shot layers, support only 8. This
allows us to fit all state in 16 bits, down from 32, saving us almost
200 bytes of program memory.

Partially addresses #8.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/389/head
Gergely Nagy 8 years ago
parent fbb5dcb359
commit 7534c13475

@ -26,9 +26,9 @@ namespace KaleidoscopePlugins {
uint32_t OneShot::startTime = 0;
uint16_t OneShot::timeOut = 2500;
uint16_t OneShot::holdTimeOut = 250;
uint32_t OneShot::State = 0;
uint32_t OneShot::stickyState = 0;
uint32_t OneShot::pressedState = 0;
uint16_t OneShot::State = 0;
uint16_t OneShot::stickyState = 0;
uint16_t OneShot::pressedState = 0;
uint32_t OneShot::leftMask;
uint32_t OneShot::rightMask;
Key OneShot::prevKey;

@ -43,9 +43,9 @@ namespace KaleidoscopePlugins {
private:
static uint32_t startTime;
static uint32_t State;
static uint32_t stickyState;
static uint32_t pressedState;
static uint16_t State;
static uint16_t stickyState;
static uint16_t pressedState;
static uint32_t leftMask;
static uint32_t rightMask;
static Key prevKey;

Loading…
Cancel
Save