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

Commit c878d5e

Browse files
authored
Update README.md and use allman astyle
1 parent 9ea9a16 commit c878d5e

File tree

12 files changed

+474
-257
lines changed

12 files changed

+474
-257
lines changed

CONTRIBUTING.md

+24-3
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,23 +29,44 @@ 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-53-generic #59~20.04.1-Ubuntu SMP Thu Oct 20 15:10:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
3333
3434
Context:
35-
I encountered a non-response while trying to press the reset button twice.
35+
I encountered a crash while using this library
3636
3737
Steps to reproduce:
3838
1. ...
3939
2. ...
4040
3. ...
4141
4. ...
4242
```
43+
44+
---
45+
4346
### Sending Feature Requests
4447

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

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

52+
---
53+
4954
### Sending Pull Requests
5055

5156
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_MultiResetDetector_GitHub/
64+
xy@xy-Inspiron-3593:~/Arduino/xy/ESP_MultiResetDetector_GitHub$
65+
```
66+
67+
2. Issue astyle command
68+
69+
```
70+
xy@xy-Inspiron-3593:~/Arduino/xy/ESP_MultiResetDetector_GitHub$ bash utils/restyle.sh
71+
```
72+

README.md

+26-21
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## ESP_MultiResetDetector
1+
## ESP_MultiResetDetector Library
22

33
[![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_MultiResetDetector.svg?)](https://www.ardu-badge.com/ESP_MultiResetDetector)
44
[![GitHub release](https://img.shields.io/github/release/khoih-prog/ESP_MultiResetDetector.svg)](https://github.com/khoih-prog/ESP_MultiResetDetector/releases)
@@ -9,6 +9,8 @@
99

1010
<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>
1111
<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>
12+
<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>
13+
<a href="https://profile-counter.glitch.me/khoih-prog-ESP_MultiResetDetector/count.svg" title="ESP_MultiResetDetector Visitor count"><img src="https://profile-counter.glitch.me/khoih-prog-ESP_MultiResetDetector/count.svg" style="height: 30px;width: 200px;"></a>
1214

1315
---
1416
---
@@ -124,10 +126,11 @@ This [**ESP_MultiResetDetector** library](https://github.com/khoih-prog/ESP_Mult
124126
## Prerequisites
125127

126128
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)
127-
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/)
129+
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/)
128130
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.
129131
4. [`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+**
130132

133+
---
131134
---
132135

133136
## Installation
@@ -324,7 +327,7 @@ This is terminal debug output when running [ESP32_FSWebServer_DRD](https://githu
324327

325328
```cpp
326329
Starting ESP32_FSWebServer_DRD with DoubleResetDetect using SPIFFS on ESP32_DEV
327-
ESP_WiFiManager v1.11.0
330+
ESP_WiFiManager v1.12.1
328331
ESP_MultiResetDetector v1.3.2
329332
FS File: /ConfigSW.json, size: 150B
330333
FS File: /CanadaFlag_1.png, size: 40.25KB
@@ -390,7 +393,7 @@ This is terminal debug output when running [minimal](examples/minimal) on ***ESP
390393

391394
#### 2.1 Data Corrupted => reset to 0
392395

393-
```
396+
```cpp
394397
Starting ESP_MultiResetDetector minimal on ESP32_DEV using LittleFS
395398
ESP_MultiResetDetector v1.3.2
396399
/home/kh/Arduino/libraries/LITTLEFS-master/src/lfs.c:1003:error: Corrupted dir pair at {0x0, 0x1}
@@ -411,7 +414,7 @@ Saving config file OK
411414
412415
#### 2.2 Reset Detected => Reporting 1
413416
414-
```
417+
```cpp
415418
Starting ESP_MultiResetDetector minimal on ESP32_DEV using LittleFS
416419
ESP_MultiResetDetector v1.3.2
417420
LittleFS Flag read = 0xFFFE0001
@@ -426,7 +429,7 @@ No Multi Reset Detected
426429

427430
#### 2.3 Reset Detected => Reporting 2
428431

429-
```
432+
```cpp
430433
Starting ESP_MultiResetDetector minimal on ESP32_DEV using LittleFS
431434
ESP_MultiResetDetector v1.3.2
432435
LittleFS Flag read = 0xFFFD0002
@@ -441,7 +444,7 @@ No Multi Reset Detected
441444

442445
#### 2.4 Reset Detected => Reporting 3
443446

444-
```
447+
```cpp
445448
Starting ESP_MultiResetDetector minimal on ESP32_DEV using LittleFS
446449
ESP_MultiResetDetector v1.3.2
447450
LittleFS Flag read = 0xFFFC0003
@@ -456,7 +459,7 @@ No Multi Reset Detected
456459

457460
#### 2.5 Reset Detected => Reporting 4
458461

459-
```
462+
```cpp
460463
Starting ESP_MultiResetDetector minimal on ESP32_DEV using LittleFS
461464
ESP_MultiResetDetector v1.3.2
462465
LittleFS Flag read = 0xFFFB0004
@@ -471,7 +474,7 @@ No Multi Reset Detected
471474

472475
#### 2.6 Reset Detected => Reporting 5. Multi Reset Detected
473476

474-
```
477+
```cpp
475478
Starting ESP_MultiResetDetector minimal on ESP32_DEV using LittleFS
476479
ESP_MultiResetDetector v1.3.2
477480
LittleFS Flag read = 0xFFFA0005
@@ -485,7 +488,7 @@ Multi Reset Detected
485488

486489
#### 2.7 Timed out => reset to 1
487490

488-
```
491+
```cpp
489492
Starting ESP_MultiResetDetector minimal on ESP32_DEV using LittleFS
490493
ESP_MultiResetDetector v1.3.2
491494
LittleFS Flag read = 0xFFFB0004
@@ -503,7 +506,7 @@ Saving config file OK
503506

504507
#### 2.8 Reset Detected => Reporting 1
505508

506-
```
509+
```cpp
507510

508511
Starting ESP_MultiResetDetector minimal on ESP32_DEV using LittleFS
509512
ESP_MultiResetDetector v1.3.2
@@ -527,7 +530,7 @@ This is terminal debug output when running [minimal](examples/minimal) on ***ESP
527530

528531
#### 3.1 Data Corrupted => reset to 0
529532

530-
```
533+
```cpp
531534
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCU using LittleFS
532535
ESP_MultiResetDetector v1.3.2
533536
multiResetDetectorFlag = 0x00000000
@@ -542,7 +545,7 @@ No Multi Reset Detected
542545

543546
#### 3.2 Reset Detected => Reporting 1
544547

545-
```
548+
```cpp
546549
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCU using LittleFS
547550
ESP_MultiResetDetector v1.3.2
548551
LittleFS Flag read = 0xFFFE0001
@@ -557,7 +560,7 @@ No Multi Reset Detected
557560

558561
#### 3.3 Reset Detected => Reporting 2
559562

560-
```
563+
```cpp
561564
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCU using LittleFS
562565
ESP_MultiResetDetector v1.3.2
563566
LittleFS Flag read = 0xFFFD0002
@@ -572,7 +575,7 @@ No Multi Reset Detected
572575

573576
#### 3.4 Reset Detected => Reporting 3
574577

575-
```
578+
```cpp
576579
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCU using LittleFS
577580
ESP_MultiResetDetector v1.3.2
578581
LittleFS Flag read = 0xFFFC0003
@@ -587,7 +590,7 @@ No Multi Reset Detected
587590

588591
#### 3.5 Reset Detected => Reporting 4
589592

590-
```
593+
```cpp
591594
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCU using LittleFS
592595
ESP_MultiResetDetector v1.3.2
593596
LittleFS Flag read = 0xFFFB0004
@@ -601,7 +604,7 @@ Saving config file OK
601604

602605
#### 3.6 Reset Detected => Reporting 5. Multi Reset Detected
603606

604-
```
607+
```cpp
605608
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCU using LittleFS
606609
ESP_MultiResetDetector v1.3.2
607610
LittleFS Flag read = 0xFFFA0005
@@ -615,7 +618,7 @@ Multi Reset Detected
615618

616619
#### 3.7 Timed out => reset to 1
617620

618-
```
621+
```cpp
619622
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCU using LittleFS
620623
ESP_MultiResetDetector v1.3.2
621624
LittleFS Flag read = 0xFFFB0004
@@ -633,7 +636,7 @@ Saving config file OK
633636

634637
#### 3.8 Reset Detected => Reporting 1
635638

636-
```
639+
```cpp
637640
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCU using LittleFS
638641
ESP_MultiResetDetector v1.3.2
639642
LittleFS Flag read = 0xFFFE0001
@@ -653,7 +656,7 @@ No Multi Reset Detected
653656
This is terminal debug output when running [ESPAsync_WiFi](https://github.com/khoih-prog/ESPAsync_WiFiManager_Lite/tree/main/examples/ESPAsync_WiFi) on ***ESP32 ESP32S3_DEV.***. Config Portal was requested by MRD to input and save Credentials.
654657

655658

656-
```
659+
```cpp
657660
Starting ESPAsync_WiFi using LittleFS on ESP32S3_DEV
658661
ESPAsync_WiFiManager_Lite v1.9.0
659662
ESP_MultiResetDetector v1.3.2
@@ -776,6 +779,8 @@ Submit issues to: [ESP_MultiResetDetector issues](https://github.com/khoih-prog/
776779
4. Add waitingForMRD() function to signal in MRD waiting period.
777780
6. Fix ESP32 chipID for example`ConfigOnMultiReset`
778781
7. Remove dependency on `LittleFS_esp32` library to prevent PIO error when using new ESP32 core v1.0.6+
782+
8. Add astyle using `allman` style. Restyle the library
783+
779784

780785
---
781786
---
@@ -812,5 +817,5 @@ If you want to contribute to this project:
812817

813818
### Copyright
814819

815-
Copyright 2020- Khoi Hoang
820+
Copyright (c) 2020- Khoi Hoang
816821

changelog.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
## ESP_MultiResetDetector
1+
## ESP_MultiResetDetector Library
22

33
[![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_MultiResetDetector.svg?)](https://www.ardu-badge.com/ESP_MultiResetDetector)
44
[![GitHub release](https://img.shields.io/github/release/khoih-prog/ESP_MultiResetDetector.svg)](https://github.com/khoih-prog/ESP_MultiResetDetector/releases)
55
[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/khoih-prog/ESP_MultiResetDetector/blob/main/LICENSE)
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_MultiResetDetector.svg)](http://github.com/khoih-prog/ESP_MultiResetDetector/issues)
88

9+
10+
<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>
11+
<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>
12+
<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>
13+
<a href="https://profile-counter.glitch.me/khoih-prog-ESP_MultiResetDetector/count.svg" title="ESP_MultiResetDetector Visitor count"><img src="https://profile-counter.glitch.me/khoih-prog-ESP_MultiResetDetector/count.svg" style="height: 30px;width: 200px;"></a>
14+
915
---
1016
---
1117

0 commit comments

Comments
 (0)