Merge pull request #75 from keyboardio/no-deprecated-apis
Stop using deprecated (and now removed) APIs
This commit is contained in:
commit
cf6234b77e
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user