diff --git a/sonoff/settings.h b/sonoff/settings.h index 714dee800..a6f846aec 100644 --- a/sonoff/settings.h +++ b/sonoff/settings.h @@ -271,9 +271,7 @@ struct SYSCFG { uint8_t ws_color[4][3]; // 475 uint8_t ws_width[3]; // 481 myio my_gp; // 484 - - byte free_495[1]; // 495 - + uint8_t test_step; // 495 uint16_t light_pixels; // 496 uint8_t light_color[5]; // 498 uint8_t light_correction; // 49D diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index a4fe3bf38..878a24d50 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -2445,12 +2445,14 @@ void setup(void) Settings.rule_enabled = 0; // Disable all rules } if (RtcReboot.fast_reboot_count > 4) { // Restarted 5 times - Settings.module = SONOFF_BASIC; // Reset module to Sonoff Basic -// Settings.last_module = SONOFF_BASIC; for (byte i = 0; i < sizeof(Settings.my_gp); i++) { Settings.my_gp.io[i] = GPIO_NONE; // Reset user defined GPIO disabling sensors } } + if (RtcReboot.fast_reboot_count > 5) { // Restarted 6 times + Settings.module = SONOFF_BASIC; // Reset module to Sonoff Basic +// Settings.last_module = SONOFF_BASIC; + } snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_APPLICATION D_LOG_SOME_SETTINGS_RESET " (%d)"), RtcReboot.fast_reboot_count); AddLog(LOG_LEVEL_DEBUG); }