ready for test
This commit is contained in:
parent
982d8de2cb
commit
20a2ad09ed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -49,7 +49,7 @@ TinyGPSPlus gps;
|
|||
OneButton userButton = OneButton(BUTTON_PIN, true, true);
|
||||
#endif
|
||||
|
||||
String versionDate = "2024.09.30";
|
||||
String versionDate = "2024.10.01";
|
||||
|
||||
uint8_t myBeaconsIndex = 0;
|
||||
int myBeaconsSize = Config.beacons.size();
|
||||
|
|
@ -116,21 +116,7 @@ void setup() {
|
|||
STATION_Utils::nearTrackerInit();
|
||||
startupScreen(loraIndex, versionDate);
|
||||
|
||||
if (Config.wifiAP.active){
|
||||
displayShow(" LoRa APRS", " ** WEB-CONF **","", "WiFiAP:LoRaTracker-AP", "IP : 192.168.4.1","");
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, "Main", "WebConfiguration Started!");
|
||||
WIFI_Utils::startAutoAP();
|
||||
WEB_Utils::setup();
|
||||
|
||||
while (true) { // comienza web config
|
||||
// algo
|
||||
}
|
||||
|
||||
} else {
|
||||
WiFi.mode(WIFI_OFF);
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, "Main", "WiFi controller stopped");
|
||||
}
|
||||
|
||||
WIFI_Utils::checkIfWiFiAP();
|
||||
|
||||
MSG_Utils::loadNumMessages();
|
||||
GPS_Utils::setup();
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ namespace WEB_Utils {
|
|||
|
||||
// WiFi AP
|
||||
Config.wifiAP.password = request->getParam("wifiAP.password", true)->value();
|
||||
//Config.wifiAP.active = false; // when Configuration is finished Tracker returns to normal mode.
|
||||
Config.wifiAP.active = false; // when Configuration is finished Tracker returns to normal mode.
|
||||
|
||||
Config.writeFile();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
#include <logger.h>
|
||||
#include <WiFi.h>
|
||||
#include "configuration.h"
|
||||
#include "web_utils.h"
|
||||
#include "display.h"
|
||||
|
||||
|
||||
extern Configuration Config;
|
||||
extern logging::Logger logger;
|
||||
|
||||
//uint32_t WiFiAutoAPTime = millis();
|
||||
|
||||
|
|
@ -15,28 +20,16 @@ namespace WIFI_Utils {
|
|||
//WiFiAutoAPTime = millis();
|
||||
}
|
||||
|
||||
/*void killAutoAP() {
|
||||
WiFi.disconnect();
|
||||
WiFi.mode(WIFI_OFF);
|
||||
}*/
|
||||
|
||||
/*void checkIfAutoAPShouldPowerOff() {
|
||||
if (WiFiAutoAPStarted && Config.wifiAutoAP.powerOff > 0) {
|
||||
if (WiFi.softAPgetStationNum() > 0) {
|
||||
WiFiAutoAPTime = 0;
|
||||
} else {
|
||||
if (WiFiAutoAPTime == 0) {
|
||||
WiFiAutoAPTime = millis();
|
||||
} else if ((millis() - WiFiAutoAPTime) > Config.wifiAutoAP.powerOff * 60 * 1000) {
|
||||
Serial.println("Stopping auto AP");
|
||||
|
||||
WiFiAutoAPStarted = false;
|
||||
WiFi.softAPdisconnect(true);
|
||||
|
||||
Serial.println("Auto AP stopped (timeout)");
|
||||
}
|
||||
}
|
||||
void checkIfWiFiAP() {
|
||||
if (Config.wifiAP.active || Config.beacons[0].callsign == "NOCALL-7"){
|
||||
displayShow(" LoRa APRS", " ** WEB-CONF **","", "WiFiAP:LoRaTracker-AP", "IP : 192.168.4.1","");
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, "Main", "WebConfiguration Started!");
|
||||
startAutoAP();
|
||||
WEB_Utils::setup();
|
||||
while (true) {}
|
||||
} else {
|
||||
WiFi.mode(WIFI_OFF);
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, "Main", "WiFi controller stopped");
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
namespace WIFI_Utils {
|
||||
|
||||
void startAutoAP();
|
||||
void checkIfWiFiAP();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue