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

Knowing when configuration mode is on or off #26

Closed
nicogou opened this issue Feb 20, 2022 · 2 comments
Closed

Knowing when configuration mode is on or off #26

nicogou opened this issue Feb 20, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@nicogou
Copy link

nicogou commented Feb 20, 2022

Is your feature request related to a problem? Please describe.

I would like to know if the Config Portal is on or off, so that I can change some LED display on my device. configuration_mode is private, so I can't access it.

Describe the solution you'd like

A method to get the configuration_mode.

Describe alternatives you've considered

Make configuration_mode public.

Thanks a lot for the great library!

@nicogou nicogou changed the title Knowing when configuration mode is on of off Knowing when configuration mode is on or off Feb 20, 2022
khoih-prog added a commit that referenced this issue Feb 21, 2022
### Release v1.6.3

1. Add optional `CONFIG_MODE_LED` to be `ON` when in Config Portal mode. Check [Knowing when configuration mode is on or off #26](#26)
2. Add function `isConfigMode()` to signal system is in Config Portal mode.
khoih-prog added a commit that referenced this issue Feb 21, 2022
### Release v1.6.3

1. Add optional `CONFIG_MODE_LED` to be `ON` when in Config Portal mode. Check [Knowing when configuration mode is on or off #26](#26)
2. Add function `isConfigMode()` to signal system is in Config Portal mode.
khoih-prog added a commit that referenced this issue Feb 21, 2022
### Release v1.6.3

1. Add optional `CONFIG_MODE_LED` to be `ON` when in Config Portal mode. Check [Knowing when configuration mode is on or off #26](#26)
2. Add function `isConfigMode()` to signal system is in Config Portal mode.
@khoih-prog
Copy link
Owner

Hi @nicogou

The new WiFiManager_NINA_Lite releases v1.6.3 has just been published. Your contribution is noted in Contributions and Thanks

Best Regards,


Release v1.6.3

  1. Add optional CONFIG_MODE_LED to be ON when in Config Portal mode. Check Knowing when configuration mode is on or off #26
  2. Add function isConfigMode() to signal system is in Config Portal mode.

How to use

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

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

@khoih-prog khoih-prog added the enhancement New feature or request label Feb 21, 2022
khoih-prog added a commit to khoih-prog/WiFiManager_Generic_Lite that referenced this issue Feb 21, 2022
### 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`
khoih-prog added a commit to khoih-prog/WiFiManager_Generic_Lite that referenced this issue Feb 21, 2022
### 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`
khoih-prog added a commit to khoih-prog/WiFiManager_Generic_Lite that referenced this issue Feb 21, 2022
### 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`
@nicogou
Copy link
Author

nicogou commented Feb 21, 2022

Quick and easy, thanks mate!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants