|
|
@ -20,34 +20,34 @@
|
|
|
|
#include <Kaleidoscope-GhostInTheFirmware.h>
|
|
|
|
#include <Kaleidoscope-GhostInTheFirmware.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace KaleidoscopePlugins {
|
|
|
|
namespace KaleidoscopePlugins {
|
|
|
|
GhostInTheFirmware::GhostKey *GhostInTheFirmware::ghostKeys;
|
|
|
|
GhostInTheFirmware::GhostKey *GhostInTheFirmware::ghostKeys;
|
|
|
|
bool GhostInTheFirmware::isActive;
|
|
|
|
bool GhostInTheFirmware::isActive;
|
|
|
|
bool GhostInTheFirmware::isPressed;
|
|
|
|
bool GhostInTheFirmware::isPressed;
|
|
|
|
uint16_t GhostInTheFirmware::currentPos;
|
|
|
|
uint16_t GhostInTheFirmware::currentPos;
|
|
|
|
uint32_t GhostInTheFirmware::startTime;
|
|
|
|
uint32_t GhostInTheFirmware::startTime;
|
|
|
|
uint16_t GhostInTheFirmware::pressTimeOut;
|
|
|
|
uint16_t GhostInTheFirmware::pressTimeOut;
|
|
|
|
uint16_t GhostInTheFirmware::delayTimeOut;
|
|
|
|
uint16_t GhostInTheFirmware::delayTimeOut;
|
|
|
|
|
|
|
|
|
|
|
|
GhostInTheFirmware::GhostInTheFirmware (void) {
|
|
|
|
GhostInTheFirmware::GhostInTheFirmware (void) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
GhostInTheFirmware::begin (void) {
|
|
|
|
GhostInTheFirmware::begin (void) {
|
|
|
|
loop_hook_use (this->loopHook);
|
|
|
|
loop_hook_use (this->loopHook);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
GhostInTheFirmware::activate (void) {
|
|
|
|
GhostInTheFirmware::activate (void) {
|
|
|
|
isActive = true;
|
|
|
|
isActive = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
GhostInTheFirmware::configure (const GhostKey ghostKeys_[]) {
|
|
|
|
GhostInTheFirmware::configure (const GhostKey ghostKeys_[]) {
|
|
|
|
ghostKeys = (GhostKey *)ghostKeys_;
|
|
|
|
ghostKeys = (GhostKey *)ghostKeys_;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
GhostInTheFirmware::loopHook (bool postClear) {
|
|
|
|
GhostInTheFirmware::loopHook (bool postClear) {
|
|
|
|
if (postClear || !isActive)
|
|
|
|
if (postClear || !isActive)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
@ -81,7 +81,7 @@ namespace KaleidoscopePlugins {
|
|
|
|
pressTimeOut = 0;
|
|
|
|
pressTimeOut = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|