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

Commit 7969f1a

Browse files
authored
Update README.md and use allman astyle
1 parent 673b8af commit 7969f1a

21 files changed

+1317
-1133
lines changed

CONTRIBUTING.md

Lines changed: 24 additions & 4 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-
* Board Core Version (e.g. Arduino SAMDUE core v1.6.12, ESP8266 core v3.0.2, ArduinoCore-mbed v3.1.1, etc.)
18+
* Board Core Version (e.g. Arduino SAMDUE core v1.6.12, ESP8266 core v3.0.2, ArduinoCore-mbed v3.4.1, etc.)
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:
@@ -28,26 +28,46 @@ Please ensure to specify the following:
2828
```
2929
Arduino IDE version: 1.8.19
3030
RASPBERRY_PI_PICO board
31-
ArduinoCore-mbed v3.1.1
31+
ArduinoCore-mbed v3.4.1
3232
OS: Ubuntu 20.04 LTS
33-
Linux xy-Inspiron-3593 5.15.0-41-generic #44~20.04.1-Ubuntu SMP Fri Jun 24 13:27:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
33+
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
3434
3535
Context:
36-
I encountered a crash while trying to use the Timer Interrupt.
36+
I encountered a crash while using this library
3737
3838
Steps to reproduce:
3939
1. ...
4040
2. ...
4141
3. ...
4242
4. ...
4343
```
44+
45+
---
46+
4447
### Sending Feature Requests
4548

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

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

53+
---
54+
5055
### Sending Pull Requests
5156

5257
Pull Requests with changes and fixes are also welcome!
5358

59+
Please use the `astyle` to reformat the updated library code as follows (demo for Ubuntu Linux)
60+
61+
1. Change directory to the library GitHub
62+
63+
```
64+
xy@xy-Inspiron-3593:~$ cd Arduino/xy/WiFiMulti_Generic_GitHub/
65+
xy@xy-Inspiron-3593:~/Arduino/xy/WiFiMulti_Generic_GitHub$
66+
```
67+
68+
2. Issue astyle command
69+
70+
```
71+
xy@xy-Inspiron-3593:~/Arduino/xy/WiFiMulti_Generic_GitHub$ bash utils/restyle.sh
72+
```
73+

README.md

Lines changed: 92 additions & 61 deletions
Large diffs are not rendered by default.

changelog.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
## WiFiMulti_Generic
1+
## WiFiMulti_Generic Library
22

33
[![arduino-library-badge](https://www.ardu-badge.com/badge/WiFiMulti_Generic.svg?)](https://www.ardu-badge.com/WiFiMulti_Generic)
44
[![GitHub release](https://img.shields.io/github/release/khoih-prog/WiFiMulti_Generic.svg)](https://github.com/khoih-prog/WiFiMulti_Generic/releases)
55
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
66
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/WiFiMulti_Generic.svg)](http://github.com/khoih-prog/WiFiMulti_Generic/issues)
77

8+
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-WiFiMulti_Generic/count.svg" title="WiFiMulti_Generic Visitor count"><img src="https://profile-counter.glitch.me/khoih-prog-WiFiMulti_Generic/count.svg" style="height: 30px;width: 200px;"></a>
813
---
914
---
1015

@@ -26,7 +31,7 @@
2631

2732
#### Releases v1.2.2
2833

29-
1. Better workaround for RP2040W WiFi.status() bug using ping() to local gateway. Check [WiFi.status() wrongly reports WL_CONNECTED even when WiFi is lost and RSSI is always 0 dBm #762](https://github.com/earlephilhower/arduino-pico/issues/762)
34+
1. Better workaround for RP2040W WiFi.status() bug using `ping()` to local gateway. Check [WiFi.status() wrongly reports WL_CONNECTED even when WiFi is lost and RSSI is always 0 dBm #762](https://github.com/earlephilhower/arduino-pico/issues/762)
3035

3136
#### Releases v1.2.1
3237

examples/WiFiMulti/WiFiMulti.ino

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
/**************************************************************************************************************************************
22
WiFiMulti.ino
33
For any WiFi shields, such as ESP32, ESP8266, Portenta_H7, WiFiNINA W101, W102, W13x, or custom, such as ESP8266/ESP32-AT, etc
4-
4+
55
WiFiMulti_Generic is a library to adapt the ESP32/ESP8266 WiFiMulti feature to other WiFi modules
6-
6+
77
Based on and modified from WiFiMulti of ESP32 core: https://github.com/espressif/arduino-esp32
88
Based on and modified from WiFiMulti of ESP8266 core: https://github.com/esp8266/Arduino
9-
9+
1010
Built by Khoi Hoang https://github.com/khoih-prog/WiFiMulti_Generic
11-
11+
1212
License under GPL-3.0
13-
14-
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
13+
14+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
1515
as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version.
1616
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
1717
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -60,26 +60,26 @@ void heartBeatPrint()
6060
else if (num++ % 10 == 0)
6161
{
6262
Serial.print(F(" "));
63-
}
63+
}
6464
}
6565

6666
uint8_t connectMultiWiFi()
6767
{
6868
#if defined(ESP32)
6969
// For ESP32, this better be 0 to shorten the connect time.
7070
// For ESP32-S2/C3, must be > 500
71-
#if ( USING_ESP32_S2 || USING_ESP32_C3 )
72-
#define WIFI_MULTI_1ST_CONNECT_WAITING_MS 500L
73-
#else
74-
// For ESP32 core v1.0.6, must be >= 500
75-
#define WIFI_MULTI_1ST_CONNECT_WAITING_MS 800L
76-
#endif
71+
#if ( USING_ESP32_S2 || USING_ESP32_C3 )
72+
#define WIFI_MULTI_1ST_CONNECT_WAITING_MS 500L
73+
#else
74+
// For ESP32 core v1.0.6, must be >= 500
75+
#define WIFI_MULTI_1ST_CONNECT_WAITING_MS 800L
76+
#endif
7777
#elif (defined(ESP8266))
7878
// For ESP8266, this better be 2200 to enable connect the 1st time
79-
#define WIFI_MULTI_1ST_CONNECT_WAITING_MS 2200L
79+
#define WIFI_MULTI_1ST_CONNECT_WAITING_MS 2200L
8080
#else
8181
// For general board, this better be 1000 to enable connect the 1st time
82-
#define WIFI_MULTI_1ST_CONNECT_WAITING_MS 1000L
82+
#define WIFI_MULTI_1ST_CONNECT_WAITING_MS 1000L
8383
#endif
8484

8585
#define WIFI_MULTI_CONNECT_WAITING_MS 500L
@@ -132,6 +132,7 @@ uint8_t connectMultiWiFi()
132132
void check_WiFi()
133133
{
134134
#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) )
135+
135136
// Workaround for bug in https://github.com/arduino/ArduinoCore-mbed/issues/381
136137
if ( (WiFi.status() != WL_CONNECTED) || (WiFi.RSSI() == 0) )
137138
#elif ( defined(ARDUINO_RASPBERRY_PI_PICO_W) )
@@ -155,9 +156,9 @@ void check_status()
155156
#if ( defined(ARDUINO_RASPBERRY_PI_PICO_W) )
156157
// You can change longer or shorter depending on your network response
157158
// Shorter => more responsive, but more ping traffic
158-
#define WIFICHECK_INTERVAL 1000L
159+
#define WIFICHECK_INTERVAL 1000L
159160
#else
160-
#define WIFICHECK_INTERVAL 1000L
161+
#define WIFICHECK_INTERVAL 1000L
161162
#endif
162163

163164
#define HEARTBEAT_INTERVAL 10000L
@@ -185,9 +186,11 @@ void check_status()
185186
void setup()
186187
{
187188
Serial.begin(115200);
189+
188190
while (!Serial && millis() < 5000);
189191

190-
Serial.print(F("\nStarting WiFiMulti on ")); Serial.println(BOARD_NAME);
192+
Serial.print(F("\nStarting WiFiMulti on "));
193+
Serial.println(BOARD_NAME);
191194
Serial.println(WIFIMULTI_GENERIC_VERSION);
192195

193196
#if WIFI_USING_ESP_AT

0 commit comments

Comments
 (0)