diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index f5758a6d2..6281dabaf 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -112,14 +112,11 @@ byte dual_hex_code = 0; // Sonoff dual input flag uint16_t dual_button_code = 0; // Sonoff dual received code int16_t save_data_counter; // Counter and flag for config save to Flash uint8_t fallback_topic_flag = 0; // Use Topic or FallbackTopic - unsigned long state_second = 0; // State second timer unsigned long state_50msecond = 0; // State 50msecond timer unsigned long state_100msecond = 0; // State 100msecond timer unsigned long state_250msecond = 0; // State 250msecond timer -int state = 0; // State 50msecond per second flag (Legacy) uint8_t state_250mS = 0; // State 250msecond per second flag - int ota_state_flag = 0; // OTA state flag int ota_result = 0; // OTA result byte ota_retry_counter = OTA_ATTEMPTS; // OTA retry counter @@ -1857,9 +1854,6 @@ void Every50mSeconds() { // As the max amount of sleep = 250 mSec this loop will shift in time... - state++; - if (STATES == state) { state = 0; } - ButtonHandler(); SwitchHandler(0); } diff --git a/sonoff/xplg_ws2812.ino b/sonoff/xplg_ws2812.ino index 0d8846550..2e4c47b34 100644 --- a/sonoff/xplg_ws2812.ino +++ b/sonoff/xplg_ws2812.ino @@ -409,7 +409,7 @@ void Ws2812ShowScheme(uint8_t scheme) { switch (scheme) { case 0: // Clock - if (((STATES/10)*2 == state) || (ws_show_next)) { + if ((1 == state_250mS) || (ws_show_next)) { Ws2812Clock(); ws_show_next = 0; }