mirror of
https://github.com/lumapu/ahoy.git
synced 2025-04-28 17:56:21 +02:00
wifi bugfix with config_override
This commit is contained in:
parent
92e5f2693f
commit
1f90961305
3 changed files with 3 additions and 7 deletions
|
@ -16,9 +16,8 @@
|
|||
//-------------------------------------
|
||||
|
||||
// Fallback WiFi Info
|
||||
#define FB_WIFI_SSID "YOUR_WIFI_SSID"
|
||||
#define FB_WIFI_PWD "YOUR_WIFI_PWD"
|
||||
|
||||
#define FB_WIFI_SSID ""
|
||||
#define FB_WIFI_PWD ""
|
||||
|
||||
// Access Point Info
|
||||
// In case there is no WiFi Network or Ahoy can not connect to it, it will act as an Access Point
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
#ifndef __CONFIG_OVERRIDE_H__
|
||||
#define __CONFIG_OVERRIDE_H__
|
||||
|
||||
// override fallback WiFi info
|
||||
#define FB_WIFI_OVERRIDDEN
|
||||
|
||||
// each override must be preceded with an #undef statement
|
||||
#undef FB_WIFI_SSID
|
||||
#define FB_WIFI_SSID "MY_SSID"
|
||||
|
|
|
@ -17,7 +17,7 @@ class AhoyWifi : public AhoyNetwork {
|
|||
void begin() override {
|
||||
mAp.enable();
|
||||
|
||||
if(String(FB_WIFI_SSID) == mConfig->sys.stationSsid)
|
||||
if(strlen(mConfig->sys.stationSsid) == 0)
|
||||
return; // no station wifi defined
|
||||
|
||||
WiFi.disconnect(); // clean up
|
||||
|
|
Loading…
Add table
Reference in a new issue