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

Commit 7cee4c6

Browse files
authored
Update README.md and use allman astyle
1 parent 30577f7 commit 7cee4c6

File tree

9 files changed

+1110
-940
lines changed

9 files changed

+1110
-940
lines changed

CONTRIBUTING.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
1515
Please ensure to specify the following:
1616

1717
* Arduino IDE version (e.g. 1.8.19) or Platform.io version
18-
* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v3.0.2 or ESP32 v2.0.4)
18+
* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v3.0.2 or ESP32 v2.0.5)
1919
* Contextual information (e.g. what you were trying to achieve)
2020
* Simplest possible steps to reproduce
2121
* Anything that might be relevant in your opinion, such as:
@@ -29,10 +29,10 @@ Please ensure to specify the following:
2929
Arduino IDE version: 1.8.19
3030
ESP8266 Core Version 3.0.2
3131
OS: Ubuntu 20.04 LTS
32-
Linux xy-Inspiron-3593 5.15.0-46-generic #49~20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
32+
Linux xy-Inspiron-3593 5.15.0-52-generic #58~20.04.1-Ubuntu SMP Thu Oct 13 13:09:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
3333
3434
Context:
35-
The board couldn't autoreconnect to Local Blynk Server after router power recycling.
35+
I encountered a crash while trying to use the library
3636
3737
Steps to reproduce:
3838
1. ...
@@ -41,12 +41,33 @@ Steps to reproduce:
4141
4. ...
4242
```
4343

44+
---
45+
4446
### Sending Feature Requests
4547

4648
Feel free to post feature requests. It's helpful if you can explain exactly why the feature would be useful.
4749

4850
There are usually some outstanding feature requests in the [existing issues list](https://github.com/khoih-prog/ESP_WiFiManager_Lite/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement), feel free to add comments to them.
4951

52+
---
53+
5054
### Sending Pull Requests
5155

5256
Pull Requests with changes and fixes are also welcome!
57+
58+
Please use the `astyle` to reformat the updated library code as follows (demo for Ubuntu Linux)
59+
60+
1. Change directory to the library GitHub
61+
62+
```
63+
xy@xy-Inspiron-3593:~$ cd Arduino/xy/ESP_WiFiManager_Lite_GitHub/
64+
xy@xy-Inspiron-3593:~/Arduino/xy/ESP_WiFiManager_Lite_GitHub$
65+
```
66+
67+
2. Issue astyle command
68+
69+
```
70+
xy@xy-Inspiron-3593:~/Arduino/xy/ESP_WiFiManager_Lite_GitHub$ bash utils/restyle.sh
71+
```
72+
73+

README.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
<a href="https://www.buymeacoffee.com/khoihprog6" title="Donate to my libraries using BuyMeACoffee"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Donate to my libraries using BuyMeACoffee" style="height: 50px !important;width: 181px !important;" ></a>
1010
<a href="https://www.buymeacoffee.com/khoihprog6" title="Donate to my libraries using BuyMeACoffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-orange.svg?logo=buy-me-a-coffee&logoColor=FFDD00" style="height: 20px !important;width: 200px !important;" ></a>
11+
<a href="https://profile-counter.glitch.me/khoih-prog/count.svg" title="Total khoih-prog Visitor count"><img src="https://profile-counter.glitch.me/khoih-prog/count.svg" style="height: 30px;width: 200px;"></a>
12+
<a href="https://profile-counter.glitch.me/khoih-prog-ESP_WiFiManager_Lite/count.svg" title="ESP_WiFiManager_Lite Visitor count"><img src="https://profile-counter.glitch.me/khoih-prog-ESP_WiFiManager_Lite/count.svg" style="height: 30px;width: 200px;"></a>
1113

1214
---
1315
---
@@ -169,10 +171,10 @@ This [**ESP_WiFiManager_Lite** library](https://github.com/khoih-prog/ESP_WiFiMa
169171
## Prerequisites
170172

171173
1. [`Arduino IDE 1.8.19+` for Arduino](https://github.com/arduino/Arduino). [![GitHub release](https://img.shields.io/github/release/arduino/Arduino.svg)](https://github.com/arduino/Arduino/releases/latest)
172-
2. [`ESP32 Core 2.0.4+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [![Latest release](https://img.shields.io/github/release/espressif/arduino-esp32.svg)](https://github.com/espressif/arduino-esp32/releases/latest/)
174+
2. [`ESP32 Core 2.0.5+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [![Latest release](https://img.shields.io/github/release/espressif/arduino-esp32.svg)](https://github.com/espressif/arduino-esp32/releases/latest/)
173175
3. [`ESP8266 Core 3.0.2+`](https://github.com/esp8266/Arduino) for ESP8266-based boards. [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/). SPIFFS is deprecated from ESP8266 core 2.7.1+, to use LittleFS.
174-
4. [`ESP_DoubleResetDetector v1.3.1+`](https://github.com/khoih-prog/ESP_DoubleResetDetector) if using DRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_DoubleResetDetector.svg?)](https://www.ardu-badge.com/ESP_DoubleResetDetector).
175-
5. [`ESP_MultiResetDetector v1.3.1+`](https://github.com/khoih-prog/ESP_MultiResetDetector) if using MRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_MultiResetDetector.svg?)](https://www.ardu-badge.com/ESP_MultiResetDetector).
176+
4. [`ESP_DoubleResetDetector v1.3.2+`](https://github.com/khoih-prog/ESP_DoubleResetDetector) if using DRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_DoubleResetDetector.svg?)](https://www.ardu-badge.com/ESP_DoubleResetDetector).
177+
5. [`ESP_MultiResetDetector v1.3.2+`](https://github.com/khoih-prog/ESP_MultiResetDetector) if using MRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_MultiResetDetector.svg?)](https://www.ardu-badge.com/ESP_MultiResetDetector).
176178
6. [`LittleFS_esp32 v1.0.6+`](https://github.com/lorol/LITTLEFS) for ESP32-based boards using LittleFS with ESP32 core **v1.0.5-**. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/LittleFS_esp32.svg?)](https://www.ardu-badge.com/LittleFS_esp32). **Notice**: This [`LittleFS_esp32 library`](https://github.com/lorol/LITTLEFS) has been integrated to Arduino [ESP32 core v1.0.6+](https://github.com/espressif/arduino-esp32/tree/master/libraries/LITTLEFS) and **you don't need to install it if using ESP32 core v1.0.6+**
177179

178180
---
@@ -214,13 +216,13 @@ In Platform IO, to fix the error when using [`LittleFS_esp32 v1.0`](https://gith
214216

215217
from
216218

217-
```
219+
```cpp
218220
//#define CONFIG_LITTLEFS_FOR_IDF_3_2 /* For old IDF - like in release 1.0.4 */
219221
```
220222

221223
to
222224

223-
```
225+
```cpp
224226
#define CONFIG_LITTLEFS_FOR_IDF_3_2 /* For old IDF - like in release 1.0.4 */
225227
```
226228
@@ -305,7 +307,7 @@ ESP_WiFiManager_Lite* ESP_WiFiManager;
305307

306308
- To add custom parameters, just add
307309

308-
```
310+
```cpp
309311
#include "defines.h"
310312

311313
// USE_DYNAMIC_PARAMETERS defined in defined.h
@@ -369,7 +371,7 @@ uint16_t NUM_MENU_ITEMS = 0;
369371

370372
- If you don't need to add dynamic parameters, use the following in sketch
371373

372-
```
374+
```cpp
373375
#define USE_DYNAMIC_PARAMETERS false
374376
```
375377

@@ -408,21 +410,21 @@ ESP_WiFiManager->setConfigPortalIP(IPAddress(xxx,xxx,xxx,xxx));
408410
409411
- To set custom DHCP HostName :
410412
411-
```
413+
```cpp
412414
// Set customized DHCP HostName
413415
ESP_WiFiManager->begin("ESP32-WIFI_ABCDEF");
414416
```
415417

416418
or just use the default Hostname, for example "ESP_ABCDEF"
417419

418-
```
420+
```cpp
419421
//Or use default Hostname "ESPC_ABCDEF"
420422
ESP_WiFiManager->begin();
421423
```
422424

423425
#### 8. To use custom HTML Style
424426

425-
```
427+
```cpp
426428
const char NewCustomsStyle[] /*PROGMEM*/ = "<style>div,input{padding:5px;font-size:1em;}input{width:95%;}body{text-align: center;}\
427429
button{background-color:blue;color:white;line-height:2.4rem;font-size:1.2rem;width:100%;}fieldset{border-radius:0.3rem;margin:0px;}</style>";
428430

@@ -434,13 +436,13 @@ ESP_WiFiManager->setCustomsStyle(NewCustomsStyle);
434436
#### 9. To use custom Head Elements
435437
436438
437-
```
439+
```cpp
438440
ESP_WiFiManager->setCustomsHeadElement("<style>html{filter: invert(10%);}</style>");
439441
```
440442

441443
#### 10. To use CORS Header
442444

443-
```
445+
```cpp
444446
ESP_WiFiManager->setCORSHeader("Your Access-Control-Allow-Origin");
445447
```
446448
@@ -455,7 +457,7 @@ Once Credentials / WiFi network information is saved in the host non-volatile me
455457
456458
#### 11.1 If you need to use and input only one set of WiFi SSID/PWD
457459
458-
```
460+
```cpp
459461
// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
460462
// Default is false (if not defined) => must input 2 sets of SSID/PWD
461463
#define REQUIRE_ONE_SET_SSID_PW true
@@ -464,7 +466,7 @@ But it's always advisable to use and input both sets for reliability.
464466

465467
#### 11.2 If you need to use both sets of WiFi SSID/PWD
466468

467-
```
469+
```cpp
468470
// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
469471
// Default is false (if not defined) => must input 2 sets of SSID/PWD
470472
#define REQUIRE_ONE_SET_SSID_PW false
@@ -475,15 +477,15 @@ But it's always advisable to use and input both sets for reliability.
475477
#### 12.1 Enable auto-scan of WiFi networks for selection in Configuration Portal
476478

477479

478-
```
480+
```cpp
479481
#define SCAN_WIFI_NETWORKS true
480482
```
481483

482484
The manual input of SSIDs is default enabled, so that users can input arbitrary SSID, not only from the scanned list. This is for the sample use-cases in which users can input the known SSIDs of another place, then send the boards to that place. The boards can connect to WiFi without users entering Config Portal to re-configure.
483485

484486
#### 12.2 Disable manually input SSIDs
485487

486-
```
488+
```cpp
487489
// To disable manually input SSID, only from a scanned SSID lists
488490
#define MANUAL_SSID_INPUT_ALLOWED false
489491
```
@@ -495,7 +497,7 @@ This is for normal use-cases in which users can only select an SSID from a scann
495497
The maximum number of SSIDs in the list is seletable from 2 to 15. If invalid number of SSIDs is selected, the default number of 10 will be used.
496498

497499

498-
```
500+
```cpp
499501
// From 2-15
500502
#define MAX_SSID_IN_LIST 8
501503
```
@@ -512,7 +514,7 @@ To use, uncomment in `defines.h`.
512514

513515
Check [retries block the main loop #18](https://github.com/khoih-prog/WiFiManager_NINA_Lite/issues/18#issue-1094004380)
514516

515-
```
517+
```cpp
516518
#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2
517519
```
518520

@@ -526,7 +528,7 @@ Only use whenever urgent tasks in loop() can't be delayed. But if so, it's bette
526528

527529
Check [retries block the main loop #18](https://github.com/khoih-prog/WiFiManager_NINA_Lite/issues/18#issuecomment-1006197561)
528530

529-
```
531+
```cpp
530532
#define WIFI_RECON_INTERVAL 30000 // 30s
531533
```
532534

@@ -608,7 +610,7 @@ See this example and modify as necessary
608610

609611
#### 1. To always load [Default Credentials](examples//Credentials.h) and override Config Portal data
610612

611-
```
613+
```cpp
612614
// Used mostly for development and debugging. FORCES default values to be loaded each run.
613615
// Config Portal data input will be ignored and overridden by DEFAULT_CONFIG_DATA
614616
bool LOAD_DEFAULT_CONFIG_DATA = true;
@@ -618,7 +620,7 @@ bool LOAD_DEFAULT_CONFIG_DATA = true;
618620

619621
Config Portal data input will be override DEFAULT_CONFIG_DATA
620622

621-
```
623+
```cpp
622624
// Used mostly once debugged. Assumes good data already saved in device.
623625
// Config Portal data input will be override DEFAULT_CONFIG_DATA
624626
bool LOAD_DEFAULT_CONFIG_DATA = false;
@@ -715,7 +717,7 @@ Example of [Default dynamicParams](examples/ESP_WiFi/dynamicParams.h)
715717

716718
- To add custom parameters, just modify the example below
717719

718-
```
720+
```cpp
719721
#include "defines.h"
720722

721723
// USE_DYNAMIC_PARAMETERS defined in defined.h
@@ -776,13 +778,13 @@ uint16_t NUM_MENU_ITEMS = 0;
776778
```
777779
- If you don't need to add dynamic parameters, use the following in sketch
778780

779-
```
781+
```cpp
780782
#define USE_DYNAMIC_PARAMETERS false
781783
```
782784

783785
or
784786

785-
```
787+
```cpp
786788
/////////////// Start dynamic Credentials ///////////////
787789

788790
MenuItem myMenuItems [] = {};

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
77
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/ESP_WiFiManager_Lite.svg)](http://github.com/khoih-prog/ESP_WiFiManager_Lite/issues)
88

9+
<a href="https://www.buymeacoffee.com/khoihprog6" title="Donate to my libraries using BuyMeACoffee"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Donate to my libraries using BuyMeACoffee" style="height: 50px !important;width: 181px !important;" ></a>
10+
<a href="https://www.buymeacoffee.com/khoihprog6" title="Donate to my libraries using BuyMeACoffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-orange.svg?logo=buy-me-a-coffee&logoColor=FFDD00" style="height: 20px !important;width: 200px !important;" ></a>
11+
<a href="https://profile-counter.glitch.me/khoih-prog/count.svg" title="Total khoih-prog Visitor count"><img src="https://profile-counter.glitch.me/khoih-prog/count.svg" style="height: 30px;width: 200px;"></a>
12+
<a href="https://profile-counter.glitch.me/khoih-prog-ESP_WiFiManager_Lite/count.svg" title="ESP_WiFiManager_Lite Visitor count"><img src="https://profile-counter.glitch.me/khoih-prog-ESP_WiFiManager_Lite/count.svg" style="height: 30px;width: 200px;"></a>
13+
914
---
1015
---
1116

library.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
{
2828
"owner": "khoih-prog",
2929
"name": "ESP_DoubleResetDetector",
30-
"version": "^1.3.1",
30+
"version": "^1.3.2",
3131
"platforms": ["espressif8266", "espressif32"]
3232
},
3333
{
3434
"owner": "khoih-prog",
3535
"name": "ESP_MultiResetDetector",
36-
"version": "^1.3.1",
36+
"version": "^1.3.2",
3737
"platforms": ["espressif8266", "espressif32"]
3838
}
3939
],

platformio/platformio.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ lib_ldf_mode = chain+
3434

3535
lib_deps =
3636
; PlatformIO 4.x
37-
; ESP_DoubleResetDetector@>=1.3.1
38-
; ESP_MultiResetDetector@>=1.3.1
37+
; ESP_DoubleResetDetector@>=1.3.2
38+
; ESP_MultiResetDetector@>=1.3.2
3939
; LittleFS_esp32@>=1.0.6
4040
; PlatformIO 5.x
41-
khoih-prog/ESP_DoubleResetDetector@>=1.3.1
42-
khoih-prog/ESP_MultiResetDetector@>=1.3.1
41+
khoih-prog/ESP_DoubleResetDetector@>=1.3.2
42+
khoih-prog/ESP_MultiResetDetector@>=1.3.2
4343
; lorol/LittleFS_esp32@>=1.0.6
4444

4545

0 commit comments

Comments
 (0)