Small change to Settings var names

This commit is contained in:
Theo Arends 2020-04-09 11:40:26 +02:00
parent 10efdce4ad
commit e69f103755
4 changed files with 18 additions and 15 deletions

View File

@ -58,8 +58,11 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
- Change light scheme 2,3,4 cycle time speed from 24,48,72,... seconds to 4,6,12,24,36,48,... seconds (#8034)
- Change remove floating point libs from IRAM
- Change remove MQTT Info messages on restart for DeepSleep Wake (#8044)
- Change IRremoteESP8266 library updated to v2.7.5
- Fix possible Relay toggle on (OTA) restart
- Fix PWM flickering during wifi connection (#8046)
- Fix Zigbee sending wrong Sat value with Hue emulation
- Fix Zigbee crash with Occupancy sensor (#8089)
- Add Zigbee command ``ZbRestore`` to restore device configuration dumped with ``ZbStatus 2``
- Add Zigbee command ``ZbUnbind``
- Add Zigbee command ``ZbBindState`` and ``manuf``attribute

View File

@ -5,6 +5,9 @@
- Change light scheme 2,3,4 cycle time speed from 24,48,72,... seconds to 4,6,12,24,36,48,... seconds (#8034)
- Change remove floating point libs from IRAM
- Change remove MQTT Info messages on restart for DeepSleep Wake (#8044)
- Change IRremoteESP8266 library updated to v2.7.5
- Fix PWM flickering during wifi connection (#8046)
- Fix Zigbee crash with Occupancy sensor (#8089)
- Add support for longer template names
- Add Zigbee command ``ZbBindState`` and ``manuf``attribute
- Add commands ``CounterDebounceLow`` and ``CounterDebounceHigh`` to control debouncing (#8021)
@ -14,9 +17,6 @@
- Add command ``SetOption91 1`` to enable fading at startup / power on
- Add command ``SetOption41 <x>`` to force sending gratuitous ARP every <x> seconds
- Add quick wifi reconnect using saved AP parameters when ``SetOption56 0`` (#3189)
- Fix PWM flickering during wifi connection (#8046)
- Fix Zigbee crash with Occupancy sensor (#8089)
- Change IRremoteESP8266 library updated to v2.7.5
### 8.2.0.2 20200328

View File

@ -240,7 +240,7 @@ struct SYSCFG {
int16_t save_data; // 014
int8_t timezone; // 016
// Start of char array storing all parameter strings
// Start of char array storing all parameter strings ********
char text_pool[101]; // 017 - was ota_url[101] - size is settings_text_size
@ -276,7 +276,7 @@ struct SYSCFG {
char ex_button_topic[33]; // 290
char ex_mqtt_grptopic[33]; // 2B1
// End of single char array of 698 chars max
// End of single char array of 698 chars max ****************
uint8_t display_model; // 2D2
uint8_t display_mode; // 2D3
@ -470,8 +470,8 @@ struct SYSCFG {
uint8_t bri_preset_low; // F06
uint8_t bri_preset_high; // F07
int8_t hum_comp; // F08
uint8_t channel; // F09
uint8_t bssid[6]; // F0A
uint8_t wifi_channel; // F09
uint8_t wifi_bssid[6]; // F0A
uint8_t free_f10[168]; // F10

View File

@ -403,9 +403,9 @@ void WifiCheckIp(void)
Settings.ip_address[3] = (uint32_t)WiFi.dnsIP();
// Save current AP parameters for quick reconnect
Settings.channel = WiFi.channel();
Settings.wifi_channel = WiFi.channel();
uint8_t *bssid = WiFi.BSSID();
memcpy((void*) &Settings.bssid, (void*) bssid, sizeof(Settings.bssid));
memcpy((void*) &Settings.wifi_bssid, (void*) bssid, sizeof(Settings.wifi_bssid));
}
Wifi.status = WL_CONNECTED;
#ifdef USE_DISCOVERY
@ -428,7 +428,7 @@ void WifiCheckIp(void)
break;
case WL_NO_SSID_AVAIL:
AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_CONNECT_FAILED_AP_NOT_REACHED));
Settings.channel = 0; // Disable stored AP
Settings.wifi_channel = 0; // Disable stored AP
if (WIFI_WAIT == Settings.sta_config) {
Wifi.retry = Wifi.retry_init;
} else {
@ -442,7 +442,7 @@ void WifiCheckIp(void)
break;
case WL_CONNECT_FAILED:
AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_CONNECT_FAILED_WRONG_PASSWORD));
Settings.channel = 0; // Disable stored AP
Settings.wifi_channel = 0; // Disable stored AP
if (Wifi.retry > (Wifi.retry_init / 2)) {
Wifi.retry = Wifi.retry_init / 2;
}
@ -453,10 +453,10 @@ void WifiCheckIp(void)
default: // WL_IDLE_STATUS and WL_DISCONNECTED
if (!Wifi.retry || ((Wifi.retry_init / 2) == Wifi.retry)) {
AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_CONNECT_FAILED_AP_TIMEOUT));
Settings.channel = 0; // Disable stored AP
Settings.wifi_channel = 0; // Disable stored AP
} else {
if (!strlen(SettingsText(SET_STASSID1)) && !strlen(SettingsText(SET_STASSID2))) {
Settings.channel = 0; // Disable stored AP
Settings.wifi_channel = 0; // Disable stored AP
wifi_config_tool = WIFI_MANAGER; // Skip empty SSIDs and start Wifi config tool
Wifi.retry = 0;
} else {
@ -471,7 +471,7 @@ void WifiCheckIp(void)
}
} else {
if (Wifi.retry_init == Wifi.retry) {
WifiBegin(3, Settings.channel); // Select default SSID
WifiBegin(3, Settings.wifi_channel); // Select default SSID
}
if ((Settings.sta_config != WIFI_WAIT) && ((Wifi.retry_init / 2) == Wifi.retry)) {
WifiBegin(2, 0); // Select alternate SSID
@ -659,7 +659,7 @@ void WifiConnect(void)
Wifi.retry = Wifi.retry_init;
Wifi.counter = 1;
memcpy((void*) &Wifi.bssid, (void*) Settings.bssid, sizeof(Wifi.bssid));
memcpy((void*) &Wifi.bssid, (void*) Settings.wifi_bssid, sizeof(Wifi.bssid));
#ifdef WIFI_RF_PRE_INIT
if (rf_pre_init_flag) {