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

Commit

Permalink
v1.6.0 to optimize code, etc.
Browse files Browse the repository at this point in the history
### Release v1.6.0

1. Optimize code by passing by `reference` instead of `value`
2. Optional `Board_Name` in Config Portal. Check [option to remove board name from web page #25](khoih-prog/WiFiManager_NINA_Lite#25)
3. Add optional `CONFIG_MODE_LED` to be `ON` when in Config Portal mode. Check [Knowing when configuration mode is on or off #26](khoih-prog/WiFiManager_NINA_Lite#26)
4. Add function `isConfigMode()` to signal system is in Config Portal mode.
5. Update `Packages' Patches`
  • Loading branch information
khoih-prog committed Feb 21, 2022
1 parent a864a9c commit 49c1aff
Show file tree
Hide file tree
Showing 42 changed files with 1,074 additions and 283 deletions.
4 changes: 2 additions & 2 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
* Board Core Version (e.g. Arduino SAMDUE core v1.6.12, ESP8266 core v3.0.2, ArduinoCore-mbed v2.6.1, etc.)
* Board Core Version (e.g. Arduino SAMDUE core v1.6.12, ESP8266 core v3.0.2, ArduinoCore-mbed v2.7.2, etc.)
* 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 @@ -30,7 +30,7 @@ Arduino IDE version: 1.8.19
Nano_RP2040_Connect board
ArduinoCore-mbed v2.6.1
OS: Ubuntu 20.04 LTS
Linux xy-Inspiron-3593 5.4.0-96-generic #109-Ubuntu SMP Wed Jan 12 16:49:16 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Linux xy-Inspiron-3593 5.4.0-100-generic #113-Ubuntu SMP Thu Feb 3 18:43:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Context:
The board couldn't autoreconnect to Local Blynk Server after router power recycling.
Expand Down
125 changes: 92 additions & 33 deletions README.md

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
## Table of Contents

* [Changelog](#changelog)
* [Release v1.6.0](#release-v160)
* [Release v1.5.1](#release-v151)
* [Major Release v1.5.0](#major-release-v150)
* [Release v1.4.1](#release-v141)
Expand All @@ -31,6 +32,14 @@

## Changelog

### Release v1.6.0

1. Optimize code by passing by `reference` instead of `value`
2. Optional `Board_Name` in Config Portal. Check [option to remove board name from web page #25](https://github.com/khoih-prog/WiFiManager_NINA_Lite/issues/25)
3. Add optional `CONFIG_MODE_LED` to be `ON` when in Config Portal mode. Check [Knowing when configuration mode is on or off #26](https://github.com/khoih-prog/WiFiManager_NINA_Lite/issues/26)
4. Add function `isConfigMode()` to signal system is in Config Portal mode.
5. Update `Packages' Patches`

### Release v1.5.1

1. Update to be compatible with new `FlashStorage_SAMD`
Expand Down
13 changes: 9 additions & 4 deletions examples/MKR1000_WiFi101/MKR1000_WiFi101.ino
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,21 @@
#include "Credentials.h"
#include "dynamicParams.h"

WiFiManager_Generic_Lite* WiFiManager_Generic;

void heartBeatPrint(void)
{
static int num = 1;

if (WiFi.status() == WL_CONNECTED)
Serial.print(F("H")); // H means connected to WiFi
Serial.print("H"); // H means connected to WiFi
else
Serial.print(F("F")); // F means not connected to WiFi
{
if (WiFiManager_Generic->isConfigMode())
Serial.print("C"); // C means in Config Mode
else
Serial.print("F"); // F means not connected to WiFi
}

if (num == 80)
{
Expand All @@ -48,8 +55,6 @@ void check_status()
}
}

WiFiManager_Generic_Lite* WiFiManager_Generic;

#if USING_CUSTOMS_STYLE
const char NewCustomsStyle[] /*PROGMEM*/ = "<style>div,input{padding:5px;font-size:1em;}input{width:95%;}body{text-align: center;}\
button{background-color:blue;color:white;line-height:2.4rem;font-size:1.2rem;width:100%;}fieldset{border-radius:0.3rem;margin:0px;}</style>";
Expand Down
22 changes: 22 additions & 0 deletions examples/MKR1000_WiFi101/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,28 @@

/////////////////////////////////////////////

// Optional, to use Board Name in Menu
#define USING_BOARD_NAME true

/////////////////////////////////////////////

// Optional, to use Board Name in Menu
#define USING_CONFIG_MODE_LED true

#if USING_CONFIG_MODE_LED
#if defined(LED_BUILTIN)
#define CONFIG_MODE_LED LED_BUILTIN
#else
// Using default pin 13 for CONFIG_MODE_LED. To be changed as necessary
#define CONFIG_MODE_LED 13
#endif

#define LED_ON HIGH
#define LED_OFF LOW
#endif

/////////////////////////////////////////////

#include <WiFiManager_Generic_Lite_SAMD.h>

#define HOST_NAME "SAMD-Master-Controller"
Expand Down
9 changes: 7 additions & 2 deletions examples/MKR1000_WiFi101_MQTT/MKR1000_WiFi101_MQTT.ino
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,14 @@ void heartBeatPrint()
static int num = 1;

if (WiFi.status() == WL_CONNECTED)
Serial.print("W"); // W means connected to WiFi
Serial.print("H"); // H means connected to WiFi
else
Serial.print("N"); // N means not connected to WiFi
{
if (WiFiManager_Generic->isConfigMode())
Serial.print("C"); // C means in Config Mode
else
Serial.print("F"); // F means not connected to WiFi
}

if (num == 40)
{
Expand Down
22 changes: 22 additions & 0 deletions examples/MKR1000_WiFi101_MQTT/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,28 @@

/////////////////////////////////////////////

// Optional, to use Board Name in Menu
#define USING_BOARD_NAME true

/////////////////////////////////////////////

// Optional, to use Board Name in Menu
#define USING_CONFIG_MODE_LED true

#if USING_CONFIG_MODE_LED
#if defined(LED_BUILTIN)
#define CONFIG_MODE_LED LED_BUILTIN
#else
// Using default pin 13 for CONFIG_MODE_LED. To be changed as necessary
#define CONFIG_MODE_LED 13
#endif

#define LED_ON HIGH
#define LED_OFF LOW
#endif

/////////////////////////////////////////////

#include <WiFiManager_Generic_Lite_SAMD.h>

#define HOST_NAME "SAMD-MQTT-Controller"
Expand Down
13 changes: 9 additions & 4 deletions examples/RP2040_WiFi/RP2040_WiFi.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,21 @@
#include "Credentials.h"
#include "dynamicParams.h"

WiFiManager_Generic_Lite* WiFiManager_Generic;

void heartBeatPrint()
{
static int num = 1;

if (WiFi.status() == WL_CONNECTED)
Serial.print(F("H")); // H means connected to WiFi
Serial.print("H"); // H means connected to WiFi
else
Serial.print(F("F")); // F means not connected to WiFi
{
if (WiFiManager_Generic->isConfigMode())
Serial.print("C"); // C means in Config Mode
else
Serial.print("F"); // F means not connected to WiFi
}

if (num == 80)
{
Expand All @@ -47,8 +54,6 @@ void check_status()
}
}

WiFiManager_Generic_Lite* WiFiManager_Generic;

#if USING_CUSTOMS_STYLE
const char NewCustomsStyle[] /*PROGMEM*/ = "<style>div,input{padding:5px;font-size:1em;}input{width:95%;}body{text-align: center;}\
button{background-color:blue;color:white;line-height:2.4rem;font-size:1.2rem;width:100%;}fieldset{border-radius:0.3rem;margin:0px;}</style>";
Expand Down
22 changes: 22 additions & 0 deletions examples/RP2040_WiFi/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,28 @@

/////////////////////////////////////////////

// Optional, to use Board Name in Menu
#define USING_BOARD_NAME true

/////////////////////////////////////////////

// Optional, to use Board Name in Menu
#define USING_CONFIG_MODE_LED true

#if USING_CONFIG_MODE_LED
#if defined(LED_BUILTIN)
#define CONFIG_MODE_LED LED_BUILTIN
#else
// Using default pin 13 for CONFIG_MODE_LED. To be changed as necessary
#define CONFIG_MODE_LED 13
#endif

#define LED_ON HIGH
#define LED_OFF LOW
#endif

/////////////////////////////////////////////

#include <WiFiManager_Generic_Lite_RP2040.h>

#define HOST_NAME "RP2040-Master-Controller"
Expand Down
9 changes: 7 additions & 2 deletions examples/RP2040_WiFi_MQTT/RP2040_WiFi_MQTT.ino
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,14 @@ void heartBeatPrint()
static int num = 1;

if (WiFi.status() == WL_CONNECTED)
Serial.print("W"); // W means connected to WiFi
Serial.print("H"); // H means connected to WiFi
else
Serial.print("N"); // N means not connected to WiFi
{
if (WiFiManager_Generic->isConfigMode())
Serial.print("C"); // C means in Config Mode
else
Serial.print("F"); // F means not connected to WiFi
}

if (num == 40)
{
Expand Down
22 changes: 22 additions & 0 deletions examples/RP2040_WiFi_MQTT/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,28 @@

/////////////////////////////////////////////

// Optional, to use Board Name in Menu
#define USING_BOARD_NAME true

/////////////////////////////////////////////

// Optional, to use Board Name in Menu
#define USING_CONFIG_MODE_LED true

#if USING_CONFIG_MODE_LED
#if defined(LED_BUILTIN)
#define CONFIG_MODE_LED LED_BUILTIN
#else
// Using default pin 13 for CONFIG_MODE_LED. To be changed as necessary
#define CONFIG_MODE_LED 13
#endif

#define LED_ON HIGH
#define LED_OFF LOW
#endif

/////////////////////////////////////////////

#include <WiFiManager_Generic_Lite_RP2040.h>

#define HOST_NAME "RP2040-MQTT-Controller"
Expand Down
13 changes: 9 additions & 4 deletions examples/SAMD_WiFi/SAMD_WiFi.ino
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,21 @@
#include "Credentials.h"
#include "dynamicParams.h"

WiFiManager_Generic_Lite* WiFiManager_Generic;

void heartBeatPrint(void)
{
static int num = 1;

if (WiFi.status() == WL_CONNECTED)
Serial.print(F("H")); // H means connected to WiFi
Serial.print("H"); // H means connected to WiFi
else
Serial.print(F("F")); // F means not connected to WiFi
{
if (WiFiManager_Generic->isConfigMode())
Serial.print("C"); // C means in Config Mode
else
Serial.print("F"); // F means not connected to WiFi
}

if (num == 80)
{
Expand All @@ -48,8 +55,6 @@ void check_status()
}
}

WiFiManager_Generic_Lite* WiFiManager_Generic;

#if USING_CUSTOMS_STYLE
const char NewCustomsStyle[] /*PROGMEM*/ = "<style>div,input{padding:5px;font-size:1em;}input{width:95%;}body{text-align: center;}\
button{background-color:blue;color:white;line-height:2.4rem;font-size:1.2rem;width:100%;}fieldset{border-radius:0.3rem;margin:0px;}</style>";
Expand Down
22 changes: 22 additions & 0 deletions examples/SAMD_WiFi/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,28 @@

/////////////////////////////////////////////

// Optional, to use Board Name in Menu
#define USING_BOARD_NAME true

/////////////////////////////////////////////

// Optional, to use Board Name in Menu
#define USING_CONFIG_MODE_LED true

#if USING_CONFIG_MODE_LED
#if defined(LED_BUILTIN)
#define CONFIG_MODE_LED LED_BUILTIN
#else
// Using default pin 13 for CONFIG_MODE_LED. To be changed as necessary
#define CONFIG_MODE_LED 13
#endif

#define LED_ON HIGH
#define LED_OFF LOW
#endif

/////////////////////////////////////////////

#include <WiFiManager_Generic_Lite_SAMD.h>

#define HOST_NAME "SAMD-Master-Controller"
Expand Down
9 changes: 7 additions & 2 deletions examples/SAMD_WiFi_MQTT/SAMD_WiFi_MQTT.ino
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,14 @@ void heartBeatPrint()
static int num = 1;

if (WiFi.status() == WL_CONNECTED)
Serial.print("W"); // W means connected to WiFi
Serial.print("H"); // H means connected to WiFi
else
Serial.print("N"); // N means not connected to WiFi
{
if (WiFiManager_Generic->isConfigMode())
Serial.print("C"); // C means in Config Mode
else
Serial.print("F"); // F means not connected to WiFi
}

if (num == 40)
{
Expand Down
22 changes: 22 additions & 0 deletions examples/SAMD_WiFi_MQTT/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,28 @@

/////////////////////////////////////////////

// Optional, to use Board Name in Menu
#define USING_BOARD_NAME true

/////////////////////////////////////////////

// Optional, to use Board Name in Menu
#define USING_CONFIG_MODE_LED true

#if USING_CONFIG_MODE_LED
#if defined(LED_BUILTIN)
#define CONFIG_MODE_LED LED_BUILTIN
#else
// Using default pin 13 for CONFIG_MODE_LED. To be changed as necessary
#define CONFIG_MODE_LED 13
#endif

#define LED_ON HIGH
#define LED_OFF LOW
#endif

/////////////////////////////////////////////

#include <WiFiManager_Generic_Lite_SAMD.h>

#define HOST_NAME "SAMD-MQTT-Controller"
Expand Down
13 changes: 9 additions & 4 deletions examples/SAM_DUE_WiFi/SAM_DUE_WiFi.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,21 @@
#include "Credentials.h"
#include "dynamicParams.h"

WiFiManager_Generic_Lite* WiFiManager_Generic;

void heartBeatPrint()
{
static int num = 1;

if (WiFi.status() == WL_CONNECTED)
Serial.print(F("H")); // H means connected to WiFi
Serial.print("H"); // H means connected to WiFi
else
Serial.print(F("F")); // F means not connected to WiFi
{
if (WiFiManager_Generic->isConfigMode())
Serial.print("C"); // C means in Config Mode
else
Serial.print("F"); // F means not connected to WiFi
}

if (num == 80)
{
Expand All @@ -47,8 +54,6 @@ void check_status()
}
}

WiFiManager_Generic_Lite* WiFiManager_Generic;

#if USING_CUSTOMS_STYLE
const char NewCustomsStyle[] /*PROGMEM*/ = "<style>div,input{padding:5px;font-size:1em;}input{width:95%;}body{text-align: center;}\
button{background-color:blue;color:white;line-height:2.4rem;font-size:1.2rem;width:100%;}fieldset{border-radius:0.3rem;margin:0px;}</style>";
Expand Down
Loading

0 comments on commit 49c1aff

Please sign in to comment.