Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 5a3aa22

Browse files
authored
v1.4.1
### Releases v1.4.1 1. Fix bug. 2. Fix compiler warnings.
1 parent db9fe2c commit 5a3aa22

File tree

19 files changed

+123
-99
lines changed

19 files changed

+123
-99
lines changed

examples/Async_AutoConnect/Async_AutoConnect.ino

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager
1515
Licensed under MIT license
16-
Version: 1.4.0
16+
Version: 1.4.1
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -25,6 +25,7 @@
2525
1.2.0 K Hoang 15/10/2020 Restore cpp code besides Impl.h code to use if linker error. Fix bug.
2626
1.3.0 K Hoang 04/12/2020 Add LittleFS support to ESP32 using LITTLEFS Library
2727
1.4.0 K Hoang 18/12/2020 Fix staticIP not saved. Add functions. Add complex examples.
28+
1.4.1 K Hoang 21/12/2020 Fix bug and compiler warnings.
2829
*****************************************************************************************************************************/
2930
#if !( defined(ESP8266) || defined(ESP32) )
3031
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
@@ -34,10 +35,10 @@
3435
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
3536

3637
// Default is 30s, using 20s now
37-
#define TIME_BETWEEN_MODAL_SCANS 20000
38+
#define TIME_BETWEEN_MODAL_SCANS 20000UL
3839

3940
// Default is 60s, using 30s now
40-
#define TIME_BETWEEN_MODELESS_SCANS 30000
41+
#define TIME_BETWEEN_MODELESS_SCANS 30000UL
4142

4243
//Ported to ESP32
4344
#ifdef ESP32
@@ -421,10 +422,11 @@ void loadConfigData()
421422
File file = FileFS.open(CONFIG_FILENAME, "r");
422423
LOGERROR(F("LoadWiFiCfgFile "));
423424

424-
memset(&WM_config, sizeof(WM_config), 0);
425+
memset(&WM_config, 0, sizeof(WM_config));
425426

426427
// New in v1.4.0
427-
memset(&WM_STA_IPconfig, sizeof(WM_STA_IPconfig), 0);
428+
memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig));
429+
//////
428430
//////
429431

430432
if (file)

examples/Async_AutoConnectWithFSParameters/Async_AutoConnectWithFSParameters.ino

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager
1515
Licensed under MIT license
16-
Version: 1.3.0
16+
Version: 1.4.1
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -24,6 +24,8 @@
2424
1.1.2 K Hoang 17/09/2020 Fix bug in examples.
2525
1.2.0 K Hoang 15/10/2020 Restore cpp code besides Impl.h code to use if linker error. Fix bug.
2626
1.3.0 K Hoang 04/12/2020 Add LittleFS support to ESP32 using LITTLEFS Library
27+
1.4.0 K Hoang 18/12/2020 Fix staticIP not saved. Add functions. Add complex examples.
28+
1.4.1 K Hoang 21/12/2020 Fix bug and compiler warnings.
2729
*****************************************************************************************************************************/
2830
#if !( defined(ESP8266) || defined(ESP32) )
2931
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
@@ -33,10 +35,10 @@
3335
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
3436

3537
// Default is 30s, using 20s now
36-
#define TIME_BETWEEN_MODAL_SCANS 20000
38+
#define TIME_BETWEEN_MODAL_SCANS 20000UL
3739

3840
// Default is 60s, using 30s now
39-
#define TIME_BETWEEN_MODELESS_SCANS 30000
41+
#define TIME_BETWEEN_MODELESS_SCANS 30000UL
4042

4143
#include <FS.h>
4244

@@ -529,6 +531,8 @@ bool saveFileFSConfigFile()
529531
if (!configFile)
530532
{
531533
Serial.println("Failed to open config file for writing");
534+
535+
return false;
532536
}
533537

534538
#if (ARDUINOJSON_VERSION_MAJOR >= 6)
@@ -545,6 +549,8 @@ bool saveFileFSConfigFile()
545549

546550
configFile.close();
547551
//end save
552+
553+
return true;
548554
}
549555

550556
void toggleLED()
@@ -623,10 +629,10 @@ void loadConfigData()
623629
File file = FileFS.open(CONFIG_FILENAME, "r");
624630
LOGERROR(F("LoadWiFiCfgFile "));
625631

626-
memset(&WM_config, sizeof(WM_config), 0);
632+
memset(&WM_config, 0, sizeof(WM_config));
627633

628634
// New in v1.4.0
629-
memset(&WM_STA_IPconfig, sizeof(WM_STA_IPconfig), 0);
635+
memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig));
630636
//////
631637

632638
if (file)

examples/Async_AutoConnectWithFSParametersAndCustomIP/Async_AutoConnectWithFSParametersAndCustomIP.ino

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager
1515
Licensed under MIT license
16-
Version: 1.4.0
16+
Version: 1.4.1
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -24,7 +24,8 @@
2424
1.1.2 K Hoang 17/09/2020 Fix bug in examples.
2525
1.2.0 K Hoang 15/10/2020 Restore cpp code besides Impl.h code to use if linker error. Fix bug.
2626
1.3.0 K Hoang 04/12/2020 Add LittleFS support to ESP32 using LITTLEFS Library
27-
1.4.0 K Hoang 18/12/2020 Fix staticIP not saved. Add functions. Add complex examples.
27+
1.4.0 K Hoang 18/12/2020 Fix staticIP not saved. Add functions. Add complex examples.
28+
1.4.1 K Hoang 21/12/2020 Fix bug and compiler warnings.
2829
*****************************************************************************************************************************/
2930

3031
#if !( defined(ESP8266) || defined(ESP32) )
@@ -35,10 +36,10 @@
3536
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
3637

3738
// Default is 30s, using 20s now
38-
#define TIME_BETWEEN_MODAL_SCANS 20000
39+
#define TIME_BETWEEN_MODAL_SCANS 20000UL
3940

4041
// Default is 60s, using 30s now
41-
#define TIME_BETWEEN_MODELESS_SCANS 30000
42+
#define TIME_BETWEEN_MODELESS_SCANS 30000UL
4243

4344
#include <FS.h> //this needs to be first, or it all crashes and burns...
4445

@@ -469,10 +470,10 @@ void loadConfigData()
469470
File file = FileFS.open(CONFIG_FILENAME, "r");
470471
LOGERROR(F("LoadWiFiCfgFile "));
471472

472-
memset(&WM_config, sizeof(WM_config), 0);
473+
memset(&WM_config, 0, sizeof(WM_config));
473474

474475
// New in v1.4.0
475-
memset(&WM_STA_IPconfig, sizeof(WM_STA_IPconfig), 0);
476+
memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig));
476477
//////
477478

478479
if (file)

examples/Async_AutoConnectWithFeedback/Async_AutoConnectWithFeedback.ino

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager
1515
Licensed under MIT license
16-
Version: 1.4.0
16+
Version: 1.4.1
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -25,6 +25,7 @@
2525
1.2.0 K Hoang 15/10/2020 Restore cpp code besides Impl.h code to use if linker error. Fix bug.
2626
1.3.0 K Hoang 04/12/2020 Add LittleFS support to ESP32 using LITTLEFS Library
2727
1.4.0 K Hoang 18/12/2020 Fix staticIP not saved. Add functions. Add complex examples.
28+
1.4.1 K Hoang 21/12/2020 Fix bug and compiler warnings.
2829
*****************************************************************************************************************************/
2930
#if !( defined(ESP8266) || defined(ESP32) )
3031
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
@@ -34,10 +35,10 @@
3435
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
3536

3637
// Default is 30s, using 20s now
37-
#define TIME_BETWEEN_MODAL_SCANS 20000
38+
#define TIME_BETWEEN_MODAL_SCANS 20000UL
3839

3940
// Default is 60s, using 30s now
40-
#define TIME_BETWEEN_MODELESS_SCANS 30000
41+
#define TIME_BETWEEN_MODELESS_SCANS 30000UL
4142

4243
//Ported to ESP32
4344
#ifdef ESP32
@@ -425,10 +426,10 @@ void loadConfigData()
425426
File file = FileFS.open(CONFIG_FILENAME, "r");
426427
LOGERROR(F("LoadWiFiCfgFile "));
427428

428-
memset(&WM_config, sizeof(WM_config), 0);
429+
memset(&WM_config, 0, sizeof(WM_config));
429430

430431
// New in v1.4.0
431-
memset(&WM_STA_IPconfig, sizeof(WM_STA_IPconfig), 0);
432+
memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig));
432433
//////
433434

434435
if (file)

examples/Async_AutoConnectWithFeedbackLED/Async_AutoConnectWithFeedbackLED.ino

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager
1515
Licensed under MIT license
16-
Version: 1.4.0
16+
Version: 1.4.1
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -25,6 +25,7 @@
2525
1.2.0 K Hoang 15/10/2020 Restore cpp code besides Impl.h code to use if linker error. Fix bug.
2626
1.3.0 K Hoang 04/12/2020 Add LittleFS support to ESP32 using LITTLEFS Library
2727
1.4.0 K Hoang 18/12/2020 Fix staticIP not saved. Add functions. Add complex examples.
28+
1.4.1 K Hoang 21/12/2020 Fix bug and compiler warnings.
2829
*****************************************************************************************************************************/
2930
#if !( defined(ESP8266) || defined(ESP32) )
3031
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
@@ -34,10 +35,10 @@
3435
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
3536

3637
// Default is 30s, using 20s now
37-
#define TIME_BETWEEN_MODAL_SCANS 20000
38+
#define TIME_BETWEEN_MODAL_SCANS 20000UL
3839

3940
// Default is 60s, using 30s now
40-
#define TIME_BETWEEN_MODELESS_SCANS 30000
41+
#define TIME_BETWEEN_MODELESS_SCANS 30000UL
4142

4243
//Ported to ESP32
4344
#ifdef ESP32
@@ -456,10 +457,11 @@ void loadConfigData()
456457
File file = FileFS.open(CONFIG_FILENAME, "r");
457458
LOGERROR(F("LoadWiFiCfgFile "));
458459

459-
memset(&WM_config, sizeof(WM_config), 0);
460+
memset(&WM_config, 0, sizeof(WM_config));
460461

461462
// New in v1.4.0
462-
memset(&WM_STA_IPconfig, sizeof(WM_STA_IPconfig), 0);
463+
memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig));
464+
//////
463465
//////
464466

465467
if (file)

examples/Async_ConfigOnDRD_FS_MQTT_Ptr/Async_ConfigOnDRD_FS_MQTT_Ptr.ino

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager
1515
Licensed under MIT license
16-
Version: 1.4.0
16+
Version: 1.4.1
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -25,6 +25,7 @@
2525
1.2.0 K Hoang 15/10/2020 Restore cpp code besides Impl.h code to use if linker error. Fix bug.
2626
1.3.0 K Hoang 04/12/2020 Add LittleFS support to ESP32 using LITTLEFS Library
2727
1.4.0 K Hoang 18/12/2020 Fix staticIP not saved. Add functions. Add complex examples.
28+
1.4.1 K Hoang 21/12/2020 Fix bug and compiler warnings.
2829
*****************************************************************************************************************************/
2930
/****************************************************************************************************************************
3031
This example will open a Config Portal when there is no stored WiFi Credentials or when a DRD is detected.
@@ -47,10 +48,10 @@
4748
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
4849

4950
// Default is 30s, using 20s now
50-
#define TIME_BETWEEN_MODAL_SCANS 20000
51+
#define TIME_BETWEEN_MODAL_SCANS 20000UL
5152

5253
// Default is 60s, using 30s now
53-
#define TIME_BETWEEN_MODELESS_SCANS 30000
54+
#define TIME_BETWEEN_MODELESS_SCANS 30000UL
5455

5556
#include <FS.h>
5657

@@ -593,10 +594,10 @@ void loadConfigData()
593594
File file = FileFS.open(CONFIG_FILENAME, "r");
594595
LOGERROR(F("LoadWiFiCfgFile "));
595596

596-
memset(&WM_config, sizeof(WM_config), 0);
597+
memset(&WM_config, 0, sizeof(WM_config));
597598

598599
// New in v1.4.0
599-
memset(&WM_STA_IPconfig, sizeof(WM_STA_IPconfig), 0);
600+
memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig));
600601
//////
601602

602603
if (file)

examples/Async_ConfigOnDRD_FS_MQTT_Ptr_Complex/Async_ConfigOnDRD_FS_MQTT_Ptr_Complex.ino

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager
1515
Licensed under MIT license
16-
Version: 1.4.0
16+
Version: 1.4.1
1717
1818
Version Modified By Date Comments
1919
------- ----------- ---------- -----------
@@ -25,6 +25,7 @@
2525
1.2.0 K Hoang 15/10/2020 Restore cpp code besides Impl.h code to use if linker error. Fix bug.
2626
1.3.0 K Hoang 04/12/2020 Add LittleFS support to ESP32 using LITTLEFS Library
2727
1.4.0 K Hoang 18/12/2020 Fix staticIP not saved. Add functions. Add complex examples.
28+
1.4.1 K Hoang 21/12/2020 Fix bug and compiler warnings.
2829
*****************************************************************************************************************************/
2930
/****************************************************************************************************************************
3031
This example will open a Config Portal when there is no stored WiFi Credentials or when a DRD is detected.
@@ -47,10 +48,10 @@
4748
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
4849

4950
// Default is 30s, using 20s now
50-
#define TIME_BETWEEN_MODAL_SCANS 20000
51+
#define TIME_BETWEEN_MODAL_SCANS 20000UL
5152

5253
// Default is 60s, using 30s now
53-
#define TIME_BETWEEN_MODELESS_SCANS 30000
54+
#define TIME_BETWEEN_MODELESS_SCANS 30000UL
5455

5556
#include <FS.h>
5657

@@ -643,10 +644,10 @@ void loadConfigData()
643644
File file = FileFS.open(CONFIG_FILENAME, "r");
644645
LOGERROR(F("LoadWiFiCfgFile "));
645646

646-
memset(&WM_config, sizeof(WM_config), 0);
647+
memset(&WM_config, 0, sizeof(WM_config));
647648

648649
// New in v1.4.0
649-
memset(&WM_STA_IPconfig, sizeof(WM_STA_IPconfig), 0);
650+
memset(&WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig));
650651
//////
651652

652653
if (file)

0 commit comments

Comments
 (0)