mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-23 22:06:11 +02:00
clean up mqtt stuff
fix workflow
This commit is contained in:
parent
65762a6e17
commit
24de3ac39b
8 changed files with 140 additions and 138 deletions
|
@ -8,6 +8,7 @@
|
|||
#define F(sl) (sl)
|
||||
#endif
|
||||
#include "ahoywifi.h"
|
||||
#include "../utils/ahoyTimer.h"
|
||||
|
||||
|
||||
// NTP CONFIG
|
||||
|
@ -71,7 +72,7 @@ bool ahoywifi::loop(void) {
|
|||
if(mApActive) {
|
||||
mDns->processNextRequest();
|
||||
#ifndef AP_ONLY
|
||||
if(mMain->checkTicker(&mNextTryTs, (WIFI_AP_ACTIVE_TIME * 1000))) {
|
||||
if(ah::checkTicker(&mNextTryTs, (WIFI_AP_ACTIVE_TIME * 1000))) {
|
||||
mApActive = (mStationWifiIsDef) ? true : setupStation(mWifiStationTimeout);
|
||||
if(mApActive) {
|
||||
if(strlen(WIFI_AP_PWD) < 8)
|
||||
|
@ -244,7 +245,7 @@ void ahoywifi::getAvailNetworks(JsonObject obj) {
|
|||
for (int i = 0; i < n; i++)
|
||||
for (int j = i + 1; j < n; j++)
|
||||
if (WiFi.RSSI(sort[j]) > WiFi.RSSI(sort[i]))
|
||||
std::swap(sort[i], sort[j]);
|
||||
std::swap(sort[i], sort[j]);
|
||||
for (int i = 0; i < n; ++i) {
|
||||
nets[i]["ssid"] = WiFi.SSID(sort[i]);
|
||||
nets[i]["rssi"] = WiFi.RSSI(sort[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue