1
0

Stop using deprecated (and now removed) APIs

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
This commit is contained in:
Gergely Nagy 2019-01-20 08:39:58 +01:00
parent 383c5ff1df
commit 0b00f27cba
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

View File

@ -341,29 +341,29 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
// Keyboardio Model 01. // Keyboardio Model 01.
static kaleidoscope::LEDSolidColor solidRed(160, 0, 0); static kaleidoscope::plugin::LEDSolidColor solidRed(160, 0, 0);
static kaleidoscope::LEDSolidColor solidOrange(140, 70, 0); static kaleidoscope::plugin::LEDSolidColor solidOrange(140, 70, 0);
static kaleidoscope::LEDSolidColor solidYellow(130, 100, 0); static kaleidoscope::plugin::LEDSolidColor solidYellow(130, 100, 0);
static kaleidoscope::LEDSolidColor solidGreen(0, 160, 0); static kaleidoscope::plugin::LEDSolidColor solidGreen(0, 160, 0);
static kaleidoscope::LEDSolidColor solidBlue(0, 70, 130); static kaleidoscope::plugin::LEDSolidColor solidBlue(0, 70, 130);
static kaleidoscope::LEDSolidColor solidIndigo(0, 0, 170); static kaleidoscope::plugin::LEDSolidColor solidIndigo(0, 0, 170);
static kaleidoscope::LEDSolidColor solidViolet(130, 0, 120); static kaleidoscope::plugin::LEDSolidColor solidViolet(130, 0, 120);
/** toggleLedsOnSuspendResume toggles the LEDs off when the host goes to sleep, /** toggleLedsOnSuspendResume toggles the LEDs off when the host goes to sleep,
* and turns them back on when it wakes up. * and turns them back on when it wakes up.
*/ */
void toggleLedsOnSuspendResume(kaleidoscope::HostPowerManagement::Event event) { void toggleLedsOnSuspendResume(kaleidoscope::plugin::HostPowerManagement::Event event) {
switch (event) { switch (event) {
case kaleidoscope::HostPowerManagement::Suspend: case kaleidoscope::plugin::HostPowerManagement::Suspend:
LEDControl.paused = true; LEDControl.paused = true;
LEDControl.set_all_leds_to({0, 0, 0}); LEDControl.set_all_leds_to({0, 0, 0});
LEDControl.syncLeds(); LEDControl.syncLeds();
break; break;
case kaleidoscope::HostPowerManagement::Resume: case kaleidoscope::plugin::HostPowerManagement::Resume:
LEDControl.paused = false; LEDControl.paused = false;
LEDControl.refreshAll(); LEDControl.refreshAll();
break; break;
case kaleidoscope::HostPowerManagement::Sleep: case kaleidoscope::plugin::HostPowerManagement::Sleep:
break; break;
} }
} }
@ -372,7 +372,7 @@ void toggleLedsOnSuspendResume(kaleidoscope::HostPowerManagement::Event event) {
* resume, and sleep) to other functions that perform action based on these * resume, and sleep) to other functions that perform action based on these
* events. * events.
*/ */
void hostPowerManagementEventHandler(kaleidoscope::HostPowerManagement::Event event) { void hostPowerManagementEventHandler(kaleidoscope::plugin::HostPowerManagement::Event event) {
toggleLedsOnSuspendResume(event); toggleLedsOnSuspendResume(event);
} }