mirror of
https://github.com/lumapu/ahoy.git
synced 2025-08-06 09:58:23 +02:00
fix #480 AP Mode on fresh ESP
included #483 improvements fix #468 last_success MQTT fix #468 update available status at sunset fix #447 reorderd enqueue commands to not have same payload length in a row added ssd1306 and nokia display to build script
This commit is contained in:
parent
9da0fc4058
commit
d9290d9fdf
15 changed files with 285 additions and 206 deletions
|
@ -8,8 +8,6 @@
|
|||
#define F(sl) (sl)
|
||||
#endif
|
||||
#include "ahoywifi.h"
|
||||
#include "../utils/ahoyTimer.h"
|
||||
|
||||
|
||||
// NTP CONFIG
|
||||
#define NTP_PACKET_SIZE 48
|
||||
|
@ -25,17 +23,16 @@ ahoywifi::ahoywifi() {
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
void ahoywifi::setup(settings_t *config, uint32_t *utcTimestamp) {
|
||||
char ipSta[16];
|
||||
mConfig = config;
|
||||
mUtcTimestamp = utcTimestamp;
|
||||
|
||||
#if !defined(FB_WIFI_OVERRIDDEN)
|
||||
if(strncmp(mConfig->sys.stationSsid, FB_WIFI_SSID, 14) != 0)
|
||||
if(strncmp(mConfig->sys.stationSsid, FB_WIFI_SSID, 14) == 0)
|
||||
setupAp();
|
||||
#endif
|
||||
#if !defined(AP_ONLY)
|
||||
setupStation();
|
||||
ah::ip2Char(mConfig->sys.ip.ip, ipSta);
|
||||
if(mConfig->valid)
|
||||
setupStation();
|
||||
#endif
|
||||
|
||||
#if defined(ESP8266)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue