Remove deprecated LEDControl code

Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
pull/1115/head
Michael Richters 3 years ago
parent 6ee4539654
commit b57daf53a8
No known key found for this signature in database
GPG Key ID: 1288FD13E4EEF0C0

@ -1060,6 +1060,10 @@ Second, the `Layer.eventHandler()` function has been deprecated. There wasn't mu
# Removed APIs
#### `LEDControl.syncDelay` configuration variable
Direct access to this configuration variable was removed on **2022-03-03**. Please use `LEDControl.setInterval()` to set the interval between LED updates instead.
#### Obsolete active macros array removed
The deprecated `Macros.active_macro_count` variable was removed on **2022-03-03**. Any references to it are obsolete, and can simply be removed.

@ -37,11 +37,6 @@ LEDControl::LEDControl(void) {
uint8_t LEDControl::sync_interval_ = 32;
uint16_t LEDControl::last_sync_time_ = 0;
#ifndef NDEPRECATED
uint8_t LEDControl::syncDelay = LEDControl::sync_interval_;
#endif
void LEDControl::next_mode() {
++mode_id_;
@ -203,12 +198,6 @@ EventHandlerResult LEDControl::afterEachCycle() {
return EventHandlerResult::OK;
if (Runtime.hasTimeExpired(last_sync_time_, sync_interval_)) {
#ifndef NDEPRECATED
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
sync_interval_ = syncDelay;
#pragma GCC diagnostic pop
#endif
syncLeds();
last_sync_time_ += sync_interval_;
update();

@ -19,14 +19,6 @@
#include "kaleidoscope/Runtime.h"
#include "kaleidoscope/plugin/LEDMode.h"
#ifndef NDEPRECATED
#define _DEPRECATED_MESSAGE_LEDCONTROL_SYNCDELAY __NL__ \
"The `LEDControl.syncDelay` variable has been deprecated.\n" __NL__ \
"Please use the `LEDControl.setInterval()` function instead."
#endif
#define LED_TOGGLE 0b00000001 // Synthetic, internal
#define Key_LEDEffectNext Key(0, KEY_FLAGS | SYNTHETIC | IS_INTERNAL | LED_TOGGLE)
@ -100,19 +92,8 @@ class LEDControl : public kaleidoscope::Plugin {
//
static void activate(LEDModeInterface *plugin);
#ifndef NDEPRECATED
DEPRECATED(LEDCONTROL_SYNCDELAY)
static uint8_t syncDelay;
#endif
static void setSyncInterval(uint8_t interval) {
sync_interval_ = interval;
#ifndef NDEPRECATED
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
syncDelay = interval;
#pragma GCC diagnostic pop
#endif
}
EventHandlerResult onSetup();

Loading…
Cancel
Save