mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-01 18:21:39 +02:00
Merge branch 'lumapu:development03' into development03
This commit is contained in:
commit
61fa452800
8 changed files with 88 additions and 205 deletions
42
.github/ISSUE_TEMPLATE/report-ahoy.md
vendored
42
.github/ISSUE_TEMPLATE/report-ahoy.md
vendored
|
@ -22,58 +22,22 @@ Retailer URL: ______
|
|||
|
||||
### Antenna:
|
||||
* [ ] circuit board
|
||||
* [ ] external antenna
|
||||
* [ ] external antenna (SMA)
|
||||
|
||||
### Power Stabilization:
|
||||
* [ ] 100uF Electrolytic Capacitor
|
||||
connected between +3.3V and GND (Pin 1 & 2) of the NRF Module
|
||||
* [ ] Voltage stabilizing motherboard
|
||||
|
||||
### Connection diagram:
|
||||
* [ ] Image of the your wiring attached
|
||||
|
||||
### Connection diagram I used:
|
||||
| nRF24L01+ Pin | ESP8266 GPIO |
|
||||
| ------------- | -------------- |
|
||||
| Pin 1 GND [*] | GND |
|
||||
| Pin 2 +3.3V | +3.3V |
|
||||
| Pin 3 CE | GPIO2 CE D4 |
|
||||
| Pin 4 CSN | GPIO15 CS D8 |
|
||||
| Pin 5 SCK | GPIO14 SCLK D5 |
|
||||
| Pin 6 MOSI | GPIO13 MOSI D7 |
|
||||
| Pin 7 MISO | GPIO12 MISO D6 |
|
||||
| Pin 8 IRQ | GPIO0 IRQ D3 |
|
||||
|
||||
| nRF24L01+ Pin | ESP32 GPIO |
|
||||
| ------------- | --------------- |
|
||||
| Pin 1 GND [*] | GND |
|
||||
| Pin 2 +3.3V | +3.3V |
|
||||
| Pin 3 CE | GPIO4 CE D4 |
|
||||
| Pin 4 CSN | GPIO5 CS D5 |
|
||||
| Pin 5 SCK | GPIO18 SCLK D18 |
|
||||
| Pin 6 MOSI | GPIO23 MOSI D23 |
|
||||
| Pin 7 MISO | GPIO19 MISO D19 |
|
||||
| Pin 8 IRQ | GPIO0 IRQ D0 |
|
||||
|
||||
Note: [*] GND Pin 1 has a square mark on the nRF24L01+ module
|
||||
|
||||
## Software
|
||||
* [ ] AhoyDTU
|
||||
* [ ] OpenDTU
|
||||
|
||||
### Version / Git SHA:
|
||||
Version: _._.__
|
||||
Github Hash: _______
|
||||
|
||||
### Build & Flash Method:
|
||||
* [ ] AhoyDTU Webinstaller
|
||||
* [ ] VSCode - Platform IO
|
||||
* [ ] Arduino
|
||||
* [ ] ESP Tools
|
||||
* [ ] Platform IO
|
||||
|
||||
### Desktop OS:
|
||||
* [ ] Linux
|
||||
* [ ] Windows
|
||||
* [ ] Mac OS
|
||||
|
||||
### Debugging:
|
||||
* [ ] USB Serial Log (attached)
|
||||
|
|
132
.github/ISSUE_TEMPLATE/report.yaml
vendored
132
.github/ISSUE_TEMPLATE/report.yaml
vendored
|
@ -1,18 +1,20 @@
|
|||
name: "AhoyDTU bug"
|
||||
description: "File a bug report"
|
||||
title: "[ESP8266/ESP32/RaspberryPi] Problem Description / Beschreibung"
|
||||
title: "[Bug]"
|
||||
labels: ["bug", "needs-triage"]
|
||||
assignees:
|
||||
- stefan123t
|
||||
- lumapu
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Bitte die Posting Guide lines lesen, Vorlage kopieren und ausfüllen und in Eurem Support Forum Eintrag posten.
|
||||
Wir lesen auch gerne Deutsch, bitte fülle die u.a. Fragen aus damit wir Dir bestmöglich helfen können Danke!
|
||||
Bitte unser FAQ als Hilfestellung prüfen: https://ahoydtu.de/faq
|
||||
|
||||
Please read, copy & fill in the template from our Posting Guide lines into your Support Forum post.
|
||||
We do enjoy the english language, but we need a couple of things to best support you in your goal, please fill in all / most of the details given below. Thanks!
|
||||
Check our FAQ: https://ahoydtu.de/faq
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "## Hardware"
|
||||
|
@ -35,11 +37,21 @@ body:
|
|||
placeholder:
|
||||
validations:
|
||||
required: false
|
||||
- type: dropdown
|
||||
id: assembly-type
|
||||
attributes:
|
||||
label: Assembly
|
||||
description:
|
||||
options:
|
||||
- I did the assebly by myself
|
||||
- the DTU was already assembled
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: nrf24l01-module
|
||||
attributes:
|
||||
label: nRF24L01+ Module
|
||||
description: |
|
||||
description: |
|
||||
What type of nRF24L01+ chip is on your nRF24L01+ module ?
|
||||
* you verified this is a **nRF24L01+ plus** model capable of the required 256kBit/s mode ?
|
||||
* **square dot** indicates original Nordic Semicon chip ?
|
||||
|
@ -69,43 +81,11 @@ body:
|
|||
* special **voltage stabilizing board**
|
||||
* **nothing** (yet)
|
||||
options:
|
||||
- ~100uF Elko
|
||||
- Elko (~100uF)
|
||||
- board
|
||||
- nothing
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: connection-diagram
|
||||
attributes:
|
||||
label: Connection diagram
|
||||
description: Tell us which connection diagram you used?
|
||||
value: |
|
||||
## Connection diagram I used:
|
||||
| nRF24L01+ Pin | ESP8266 GPIO |
|
||||
| ------------- | -------------- |
|
||||
| Pin 1 GND [*] | GND |
|
||||
| Pin 2 +3.3V | +3.3V |
|
||||
| Pin 3 CE | GPIO2 CE D4 |
|
||||
| Pin 4 CSN | GPIO15 CS D8 |
|
||||
| Pin 5 SCK | GPIO14 SCLK D5 |
|
||||
| Pin 6 MOSI | GPIO13 MOSI D7 |
|
||||
| Pin 7 MISO | GPIO12 MISO D6 |
|
||||
| Pin 8 IRQ | GPIO0 IRQ D3 |
|
||||
|
||||
| nRF24L01+ Pin | ESP32 GPIO |
|
||||
| ------------- | --------------- |
|
||||
| Pin 1 GND [*] | GND |
|
||||
| Pin 2 +3.3V | +3.3V |
|
||||
| Pin 3 CE | GPIO4 CE D4 |
|
||||
| Pin 4 CSN | GPIO5 CS D5 |
|
||||
| Pin 5 SCK | GPIO18 SCLK D18 |
|
||||
| Pin 6 MOSI | GPIO23 MOSI D23 |
|
||||
| Pin 7 MISO | GPIO19 MISO D19 |
|
||||
| Pin 8 IRQ | GPIO0 IRQ D0 |
|
||||
|
||||
Note: [*] GND Pin 1 has a square mark on the nRF24L01+ module
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
id: connection-picture
|
||||
attributes:
|
||||
|
@ -123,7 +103,7 @@ body:
|
|||
attributes:
|
||||
label: Version
|
||||
description: What version of our software are you running ?
|
||||
placeholder: 0.5.17
|
||||
placeholder: 0.6.0
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
|
@ -131,7 +111,7 @@ body:
|
|||
attributes:
|
||||
label: Github Hash
|
||||
description: Which GitHub hash has the build of our software ?
|
||||
placeholder: 5402e9b
|
||||
placeholder: 0000000
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
|
@ -140,19 +120,11 @@ body:
|
|||
label: Build & Flash Method
|
||||
description: What software do you use to flash / build & flash our firmware images ?
|
||||
options:
|
||||
- AhoyDTU Webinstaller
|
||||
- VSCode - Platform IO (build & flash)
|
||||
- ESP Tools (flash)
|
||||
- Platform IO (build & flash)
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: desktop-os
|
||||
attributes:
|
||||
label: Desktop
|
||||
description: Which operating system are you using on your desktop to build & flash ?
|
||||
options:
|
||||
- Linux
|
||||
- Mac OS
|
||||
- Windows
|
||||
- Arduino IDE
|
||||
- was already installed
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
|
@ -160,49 +132,12 @@ body:
|
|||
attributes:
|
||||
label: Setup
|
||||
description: |
|
||||
Which settings are configured under http://ahoy-dtu/setup ?
|
||||
Document any relevant setup values correctly.
|
||||
Copy and paste the Inverter Section if you have multiple Inverters.
|
||||
value: |
|
||||
### Device Host Name
|
||||
- Device Name: AHOY-DTU
|
||||
### WiFi
|
||||
- SSID: YOUR_WIFI_SSID *don't paste here*
|
||||
- Password: YOUR_WIFI_PWD *don't paste here*
|
||||
### Inverter
|
||||
#### Inverter 0
|
||||
- Address: 1141752123456
|
||||
- Name: HM-600
|
||||
- Active Power Limit: 65535
|
||||
- Active Power Limit Control Type: no powerlimit
|
||||
- Max Module Power (Wp): 375, 375
|
||||
- Module Name: link, rech
|
||||
### General
|
||||
- Interval [s]: 30
|
||||
- Max retries per Payload: 5
|
||||
### NTP Server
|
||||
- NTP Server / IP: pool.ntp.org
|
||||
- NTP Port: 123
|
||||
### MQTT
|
||||
- Broker / Server IP:
|
||||
- Port: 1883
|
||||
- Username (optional):
|
||||
- Password (optional):
|
||||
- Topic: inverter
|
||||
### System Config
|
||||
#### Pinout (Wemos)
|
||||
- CS: D8 (GPIO15)
|
||||
- CE: D4 (GPIO2)
|
||||
- IRQ: D3 (GPIO0)
|
||||
#### Radio (NRF24L01+)
|
||||
- Amplifier Power Level: LOW
|
||||
#### Serial Console
|
||||
- print inverter data: [x]
|
||||
- Serial Debug: [x]
|
||||
- Interval [s]: 5
|
||||
|
||||
- Reboot device after successful save: [x]
|
||||
- SAVE
|
||||
Which settings were modified to which values? Check this page on your DTU: http://ahoy-dtu/setup
|
||||
Do not post private data here (SSID / passwords / serial numbers)!
|
||||
placeholder: |
|
||||
Some examples:
|
||||
- MqTT: only broker was added
|
||||
- Inverter: set intervall to 5 seconds ..
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
|
@ -219,12 +154,9 @@ body:
|
|||
attributes:
|
||||
label: Error description
|
||||
description: Please describe what you expected and what happened instead.
|
||||
value: |
|
||||
1) Go to http://ahoy-dtu/setup
|
||||
2) configure above settings
|
||||
3) Reboot
|
||||
4) I did this
|
||||
5) I expected that
|
||||
6) and something completely differen happened
|
||||
placeholder: |
|
||||
1) I went to https://ahoy-dtu.de/web_install and installed latest release
|
||||
2) I did some configurations, especially ...
|
||||
...
|
||||
validations:
|
||||
required: true
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# Development Changes
|
||||
|
||||
## 0.6.3 - 2023-04-04
|
||||
* fix login, password length was not checked #852
|
||||
* merge PR #854 optimize browser caching, thx @tastendruecker123 #828
|
||||
* fix WiFi reconnect not working #851
|
||||
* updated issue templates #822
|
||||
|
||||
## 0.6.2 - 2023-04-04
|
||||
* fix login from multiple clients #819
|
||||
* fix login screen on small displays
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//-------------------------------------
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 6
|
||||
#define VERSION_PATCH 2
|
||||
#define VERSION_PATCH 3
|
||||
|
||||
//-------------------------------------
|
||||
typedef struct {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<link rel="stylesheet" type="text/css" href="colors.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="style.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="style.css?v={#VERSION}"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="UTF-8">
|
||||
<script type="text/javascript" src="api.js"></script>
|
||||
<script type="text/javascript" src="api.js?v={#VERSION}"></script>
|
||||
<link rel="stylesheet" type="text/css" href="colors.css?v={#VERSION}"/>
|
|
@ -1,21 +1,21 @@
|
|||
<div class="topnav">
|
||||
<a href="/" class="title">AhoyDTU</a>
|
||||
<a href="/?v={#VERSION}" class="title">AhoyDTU</a>
|
||||
<a href="javascript:void(0);" class="icon" onclick="topnav()">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</a>
|
||||
<div id="topnav" class="mobile">
|
||||
<a id="nav3" class="hide" href="/live">Live</a>
|
||||
<a id="nav4" class="hide" href="/serial">Serial / Control</a>
|
||||
<a id="nav5" class="hide" href="/setup">Settings</a>
|
||||
<a id="nav3" class="hide" href="/live?v={#VERSION}">Live</a>
|
||||
<a id="nav4" class="hide" href="/serial?v={#VERSION}">Serial / Control</a>
|
||||
<a id="nav5" class="hide" href="/setup?v={#VERSION}">Settings</a>
|
||||
<span class="seperator"></span>
|
||||
<a id="nav6" class="hide" href="/update">Update</a>
|
||||
<a id="nav7" class="hide" href="/system">System</a>
|
||||
<a id="nav6" class="hide" href="/update?v={#VERSION}">Update</a>
|
||||
<a id="nav7" class="hide" href="/system?v={#VERSION}">System</a>
|
||||
<span class="seperator"></span>
|
||||
<a id="nav8" href="/api" target="_blank">REST API</a>
|
||||
<a id="nav9" href="https://ahoydtu.de" target="_blank">Documentation</a>
|
||||
<a id="nav10" href="/about">About</a>
|
||||
<a id="nav10" href="/about?v={#VERSION}">About</a>
|
||||
<span class="seperator"></span>
|
||||
<a id="nav0" class="hide" href="/login">Login</a>
|
||||
<a id="nav1" class="hide" href="/logout">Logout</a>
|
||||
|
|
|
@ -130,11 +130,13 @@ class Web {
|
|||
bool prot;
|
||||
prot = mProtected;
|
||||
if(!prot) {
|
||||
uint8_t ip[4];
|
||||
ah::ip2Arr(ip, request->client()->remoteIP().toString().c_str());
|
||||
for(uint8_t i = 0; i < 4; i++) {
|
||||
if(mLoginIp[i] != ip[i])
|
||||
prot = true;
|
||||
if(strlen(mConfig->sys.adminPwd) > 0) {
|
||||
uint8_t ip[4];
|
||||
ah::ip2Arr(ip, request->client()->remoteIP().toString().c_str());
|
||||
for(uint8_t i = 0; i < 4; i++) {
|
||||
if(mLoginIp[i] != ip[i])
|
||||
prot = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -247,17 +249,22 @@ class Web {
|
|||
}
|
||||
}
|
||||
|
||||
void onUpdate(AsyncWebServerRequest *request) {
|
||||
DPRINTLN(DBG_VERBOSE, F("onUpdate"));
|
||||
|
||||
if (CHECK_MASK(mConfig->sys.protectionMask, PROT_MASK_UPDATE))
|
||||
void getPage(AsyncWebServerRequest *request, uint8_t mask, const uint8_t *zippedHtml, uint32_t len) {
|
||||
if (CHECK_MASK(mConfig->sys.protectionMask, mask))
|
||||
checkProtection(request);
|
||||
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), update_html, update_html_len);
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), zippedHtml, len);
|
||||
response->addHeader(F("Content-Encoding"), "gzip");
|
||||
response->addHeader(F("content-type"), "text/html; charset=UTF-8");
|
||||
if(request->hasParam("v"))
|
||||
response->addHeader(F("Cache-Control"), F("max-age=604800"));
|
||||
request->send(response);
|
||||
}
|
||||
|
||||
void onUpdate(AsyncWebServerRequest *request) {
|
||||
getPage(request, PROT_MASK_UPDATE, update_html, update_html_len);
|
||||
}
|
||||
|
||||
void showUpdate(AsyncWebServerRequest *request) {
|
||||
bool reboot = (!Update.hasError());
|
||||
|
||||
|
@ -302,14 +309,7 @@ class Web {
|
|||
}
|
||||
|
||||
void onIndex(AsyncWebServerRequest *request) {
|
||||
DPRINTLN(DBG_VERBOSE, F("onIndex"));
|
||||
|
||||
if (CHECK_MASK(mConfig->sys.protectionMask, PROT_MASK_INDEX))
|
||||
checkProtection(request);
|
||||
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), index_html, index_html_len);
|
||||
response->addHeader(F("Content-Encoding"), "gzip");
|
||||
request->send(response);
|
||||
getPage(request, PROT_MASK_INDEX, index_html, index_html_len);
|
||||
}
|
||||
|
||||
void onLogin(AsyncWebServerRequest *request) {
|
||||
|
@ -348,6 +348,9 @@ class Web {
|
|||
else
|
||||
response = request->beginResponse_P(200, F("text/css"), colorBright_css, colorBright_css_len);
|
||||
response->addHeader(F("Content-Encoding"), "gzip");
|
||||
if(request->hasParam("v")) {
|
||||
response->addHeader(F("Cache-Control"), F("max-age=604800"));
|
||||
}
|
||||
request->send(response);
|
||||
}
|
||||
|
||||
|
@ -356,6 +359,9 @@ class Web {
|
|||
mLogoutTimeout = LOGOUT_TIMEOUT;
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/css"), style_css, style_css_len);
|
||||
response->addHeader(F("Content-Encoding"), "gzip");
|
||||
if(request->hasParam("v")) {
|
||||
response->addHeader(F("Cache-Control"), F("max-age=604800"));
|
||||
}
|
||||
request->send(response);
|
||||
}
|
||||
|
||||
|
@ -364,6 +370,8 @@ class Web {
|
|||
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/javascript"), api_js, api_js_len);
|
||||
response->addHeader(F("Content-Encoding"), "gzip");
|
||||
if(request->hasParam("v"))
|
||||
response->addHeader(F("Cache-Control"), F("max-age=604800"));
|
||||
request->send(response);
|
||||
}
|
||||
|
||||
|
@ -422,14 +430,7 @@ class Web {
|
|||
}
|
||||
|
||||
void onSetup(AsyncWebServerRequest *request) {
|
||||
DPRINTLN(DBG_VERBOSE, F("onSetup"));
|
||||
|
||||
if (CHECK_MASK(mConfig->sys.protectionMask, PROT_MASK_SETUP))
|
||||
checkProtection(request);
|
||||
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), setup_html, setup_html_len);
|
||||
response->addHeader(F("Content-Encoding"), "gzip");
|
||||
request->send(response);
|
||||
getPage(request, PROT_MASK_SETUP, setup_html, setup_html_len);
|
||||
}
|
||||
|
||||
void showSave(AsyncWebServerRequest *request) {
|
||||
|
@ -596,22 +597,16 @@ class Web {
|
|||
}
|
||||
|
||||
void onLive(AsyncWebServerRequest *request) {
|
||||
DPRINTLN(DBG_VERBOSE, F("onLive"));
|
||||
|
||||
if (CHECK_MASK(mConfig->sys.protectionMask, PROT_MASK_LIVE))
|
||||
checkProtection(request);
|
||||
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), visualization_html, visualization_html_len);
|
||||
response->addHeader(F("Content-Encoding"), "gzip");
|
||||
response->addHeader(F("content-type"), "text/html; charset=UTF-8");
|
||||
|
||||
request->send(response);
|
||||
getPage(request, PROT_MASK_LIVE, visualization_html, visualization_html_len);
|
||||
}
|
||||
|
||||
void onAbout(AsyncWebServerRequest *request) {
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), about_html, about_html_len);
|
||||
response->addHeader(F("Content-Encoding"), "gzip");
|
||||
response->addHeader(F("content-type"), "text/html; charset=UTF-8");
|
||||
if(request->hasParam("v")) {
|
||||
response->addHeader(F("Cache-Control"), F("max-age=604800"));
|
||||
}
|
||||
|
||||
request->send(response);
|
||||
}
|
||||
|
@ -623,25 +618,11 @@ class Web {
|
|||
}
|
||||
|
||||
void onSerial(AsyncWebServerRequest *request) {
|
||||
DPRINTLN(DBG_VERBOSE, F("onSerial"));
|
||||
|
||||
if (CHECK_MASK(mConfig->sys.protectionMask, PROT_MASK_SERIAL))
|
||||
checkProtection(request);
|
||||
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), serial_html, serial_html_len);
|
||||
response->addHeader(F("Content-Encoding"), "gzip");
|
||||
request->send(response);
|
||||
getPage(request, PROT_MASK_SERIAL, serial_html, serial_html_len);
|
||||
}
|
||||
|
||||
void onSystem(AsyncWebServerRequest *request) {
|
||||
DPRINTLN(DBG_VERBOSE, F("onSystem"));
|
||||
|
||||
if (CHECK_MASK(mConfig->sys.protectionMask, PROT_MASK_SYSTEM))
|
||||
checkProtection(request);
|
||||
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), system_html, system_html_len);
|
||||
response->addHeader(F("Content-Encoding"), "gzip");
|
||||
request->send(response);
|
||||
getPage(request, PROT_MASK_SYSTEM, system_html, system_html_len);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ void ahoywifi::setup(settings_t *config, uint32_t *utcTimestamp, appWifiCb cb) {
|
|||
mStaConn = DISCONNECTED;
|
||||
mCnt = 0;
|
||||
mScanActive = false;
|
||||
mScanCnt = 0;
|
||||
|
||||
#if defined(ESP8266)
|
||||
wifiConnectHandler = WiFi.onStationModeConnected(std::bind(&ahoywifi::onConnect, this, std::placeholders::_1));
|
||||
|
@ -109,7 +110,7 @@ void ahoywifi::tickWifiLoop() {
|
|||
DBGPRINTLN(F(" seconds"));
|
||||
if(mScanActive) {
|
||||
getBSSIDs();
|
||||
if(!mScanActive) // scan completed
|
||||
if((!mScanActive) && (!mBSSIDList.empty())) // scan completed
|
||||
if ((mCnt % timeout) < timeout - 2)
|
||||
mCnt = timeout - 2;
|
||||
}
|
||||
|
@ -297,8 +298,7 @@ void ahoywifi::getAvailNetworks(JsonObject obj) {
|
|||
void ahoywifi::getBSSIDs() {
|
||||
int n = WiFi.scanComplete();
|
||||
if (n < 0) {
|
||||
mScanCnt++;
|
||||
if (mScanCnt < 20)
|
||||
if (++mScanCnt < 20)
|
||||
return;
|
||||
}
|
||||
if(n > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue