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

Commit

Permalink
Update README.md and use allman astyle
Browse files Browse the repository at this point in the history
  • Loading branch information
khoih-prog committed Nov 25, 2022
1 parent 9ea9a16 commit c878d5e
Show file tree
Hide file tree
Showing 12 changed files with 474 additions and 257 deletions.
27 changes: 24 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
Please ensure to specify the following:

* Arduino IDE version (e.g. 1.8.19) or Platform.io version
* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v3.0.2 or ESP32 v2.0.4)
* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v3.0.2 or ESP32 v2.0.5)
* Contextual information (e.g. what you were trying to achieve)
* Simplest possible steps to reproduce
* Anything that might be relevant in your opinion, such as:
Expand All @@ -29,23 +29,44 @@ Please ensure to specify the following:
Arduino IDE version: 1.8.19
ESP8266 Core Version 3.0.2
OS: Ubuntu 20.04 LTS
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
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
Context:
I encountered a non-response while trying to press the reset button twice.
I encountered a crash while using this library
Steps to reproduce:
1. ...
2. ...
3. ...
4. ...
```

---

### Sending Feature Requests

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

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.

---

### Sending Pull Requests

Pull Requests with changes and fixes are also welcome!

Please use the `astyle` to reformat the updated library code as follows (demo for Ubuntu Linux)

1. Change directory to the library GitHub

```
xy@xy-Inspiron-3593:~$ cd Arduino/xy/ESP_MultiResetDetector_GitHub/
xy@xy-Inspiron-3593:~/Arduino/xy/ESP_MultiResetDetector_GitHub$
```

2. Issue astyle command

```
xy@xy-Inspiron-3593:~/Arduino/xy/ESP_MultiResetDetector_GitHub$ bash utils/restyle.sh
```

47 changes: 26 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## ESP_MultiResetDetector
## ESP_MultiResetDetector Library

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

<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>
<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>
<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>
<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>

---
---
Expand Down Expand Up @@ -124,10 +126,11 @@ This [**ESP_MultiResetDetector** library](https://github.com/khoih-prog/ESP_Mult
## Prerequisites

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)
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/)
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/)
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.
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+**

---
---

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

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

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

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

#### 2.3 Reset Detected => Reporting 2

```
```cpp
Starting ESP_MultiResetDetector minimal on ESP32_DEV using LittleFS
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFD0002
Expand All @@ -441,7 +444,7 @@ No Multi Reset Detected

#### 2.4 Reset Detected => Reporting 3

```
```cpp
Starting ESP_MultiResetDetector minimal on ESP32_DEV using LittleFS
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFC0003
Expand All @@ -456,7 +459,7 @@ No Multi Reset Detected

#### 2.5 Reset Detected => Reporting 4

```
```cpp
Starting ESP_MultiResetDetector minimal on ESP32_DEV using LittleFS
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFB0004
Expand All @@ -471,7 +474,7 @@ No Multi Reset Detected

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

```
```cpp
Starting ESP_MultiResetDetector minimal on ESP32_DEV using LittleFS
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFA0005
Expand All @@ -485,7 +488,7 @@ Multi Reset Detected

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

```
```cpp
Starting ESP_MultiResetDetector minimal on ESP32_DEV using LittleFS
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFB0004
Expand All @@ -503,7 +506,7 @@ Saving config file OK

#### 2.8 Reset Detected => Reporting 1

```
```cpp

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

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

```
```cpp
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCU using LittleFS
ESP_MultiResetDetector v1.3.2
multiResetDetectorFlag = 0x00000000
Expand All @@ -542,7 +545,7 @@ No Multi Reset Detected

#### 3.2 Reset Detected => Reporting 1

```
```cpp
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCU using LittleFS
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFE0001
Expand All @@ -557,7 +560,7 @@ No Multi Reset Detected

#### 3.3 Reset Detected => Reporting 2

```
```cpp
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCU using LittleFS
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFD0002
Expand All @@ -572,7 +575,7 @@ No Multi Reset Detected

#### 3.4 Reset Detected => Reporting 3

```
```cpp
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCU using LittleFS
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFC0003
Expand All @@ -587,7 +590,7 @@ No Multi Reset Detected

#### 3.5 Reset Detected => Reporting 4

```
```cpp
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCU using LittleFS
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFB0004
Expand All @@ -601,7 +604,7 @@ Saving config file OK

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

```
```cpp
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCU using LittleFS
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFA0005
Expand All @@ -615,7 +618,7 @@ Multi Reset Detected

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

```
```cpp
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCU using LittleFS
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFB0004
Expand All @@ -633,7 +636,7 @@ Saving config file OK

#### 3.8 Reset Detected => Reporting 1

```
```cpp
Starting ESP_MultiResetDetector minimal on ESP8266_NODEMCU using LittleFS
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFE0001
Expand All @@ -653,7 +656,7 @@ No Multi Reset Detected
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.


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


---
---
Expand Down Expand Up @@ -812,5 +817,5 @@ If you want to contribute to this project:

### Copyright

Copyright 2020- Khoi Hoang
Copyright (c) 2020- Khoi Hoang

8 changes: 7 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
## ESP_MultiResetDetector
## ESP_MultiResetDetector Library

[![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_MultiResetDetector.svg?)](https://www.ardu-badge.com/ESP_MultiResetDetector)
[![GitHub release](https://img.shields.io/github/release/khoih-prog/ESP_MultiResetDetector.svg)](https://github.com/khoih-prog/ESP_MultiResetDetector/releases)
[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/khoih-prog/ESP_MultiResetDetector/blob/main/LICENSE)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/ESP_MultiResetDetector.svg)](http://github.com/khoih-prog/ESP_MultiResetDetector/issues)


<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>
<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>
<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>
<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>

---
---

Expand Down
Loading

0 comments on commit c878d5e

Please sign in to comment.