mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-13 08:53:57 +01:00
startup delay added
This commit is contained in:
parent
d334164b6f
commit
152217e71c
|
|
@ -110,6 +110,7 @@
|
|||
"rememberStationTime": 30,
|
||||
"backupDigiMode": false,
|
||||
"rebootMode": false,
|
||||
"rebootModeTime": 6
|
||||
"rebootModeTime": 6,
|
||||
"startupDelay": 0
|
||||
}
|
||||
}
|
||||
|
|
@ -344,6 +344,24 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<label
|
||||
for="startupDelay"
|
||||
class="form-label"
|
||||
>Startup Delay in minutes <small>(To Allow Router/Modem to start WiFiAP before connection)</small></label
|
||||
>
|
||||
<input
|
||||
type="number"
|
||||
name="startupDelay"
|
||||
id="startupDelay"
|
||||
placeholder="0"
|
||||
class="form-control"
|
||||
value="0"
|
||||
step="1"
|
||||
min="0"
|
||||
max="5"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ function loadSettings(settings) {
|
|||
networksContainer.appendChild(networkElement);
|
||||
networkCount++;
|
||||
});
|
||||
document.getElementById("startupDelay").value = settings.startupDelay;
|
||||
|
||||
// APRS-IS
|
||||
document.getElementById("aprs_is.active").checked = settings.aprs_is.active;
|
||||
|
|
|
|||
|
|
@ -169,6 +169,7 @@ public:
|
|||
bool backupDigiMode;
|
||||
bool rebootMode;
|
||||
int rebootModeTime;
|
||||
int startupDelay;
|
||||
String personalNote;
|
||||
String blacklist;
|
||||
std::vector<WiFi_AP> wifiAPs;
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ namespace Utils {
|
|||
void checkRebootTime();
|
||||
void checkSleepByLowBatteryVoltage(uint8_t mode);
|
||||
bool checkValidCallsign(const String& callsign);
|
||||
void startupDelay();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ ___________________________________________________________________*/
|
|||
#endif
|
||||
|
||||
|
||||
String versionDate = "2025-10-11";
|
||||
String versionDate = "2025-10-12";
|
||||
String versionNumber = "3.1.3";
|
||||
Configuration Config;
|
||||
WiFiClient aprsIsClient;
|
||||
|
|
@ -97,7 +97,6 @@ bool modemLoggedToAPRSIS = false;
|
|||
std::vector<ReceivedPacket> receivedPackets;
|
||||
|
||||
String firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine;
|
||||
//#define STARTUP_DELAY 5 //min
|
||||
|
||||
|
||||
void setup() {
|
||||
|
|
@ -108,12 +107,7 @@ void setup() {
|
|||
Utils::validateFreqs();
|
||||
GPS_Utils::setup();
|
||||
STATION_Utils::loadBlacklistAndManagers();
|
||||
|
||||
#ifdef STARTUP_DELAY // (TEST) just to wait for WiFi init of Routers
|
||||
displayShow("", " STARTUP DELAY ...", "", "", 0);
|
||||
delay(STARTUP_DELAY * 60 * 1000);
|
||||
#endif
|
||||
|
||||
Utils::startupDelay();
|
||||
SLEEP_Utils::setup();
|
||||
WIFI_Utils::setup();
|
||||
NTP_Utils::setup();
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ bool Configuration::writeFile() {
|
|||
}
|
||||
}
|
||||
|
||||
data["other"]["startupDelay"] = startupDelay;
|
||||
|
||||
data["wifi"]["autoAP"]["password"] = wifiAutoAP.password;
|
||||
data["wifi"]["autoAP"]["timeout"] = wifiAutoAP.timeout;
|
||||
|
||||
|
|
@ -186,6 +188,9 @@ bool Configuration::readFile() {
|
|||
wifiAPs.push_back(wifiap);
|
||||
}
|
||||
|
||||
if (!data["other"].containsKey("startupDelay")) needsRewrite = true;
|
||||
startupDelay = data["other"]["startupDelay"] | 0;
|
||||
|
||||
if (!data["wifi"]["autoAP"].containsKey("password") ||
|
||||
!data["wifi"]["autoAP"].containsKey("timeout")) needsRewrite = true;
|
||||
wifiAutoAP.password = data["wifi"]["autoAP"]["password"] | "1234567890";
|
||||
|
|
@ -401,6 +406,8 @@ void Configuration::setDefaultValues() {
|
|||
|
||||
wifiAPs.push_back(wifiap);
|
||||
|
||||
startupDelay = 0;
|
||||
|
||||
wifiAutoAP.password = "1234567890";
|
||||
wifiAutoAP.timeout = 10;
|
||||
|
||||
|
|
|
|||
|
|
@ -436,4 +436,11 @@ namespace Utils {
|
|||
return true;
|
||||
}
|
||||
|
||||
void startupDelay() {
|
||||
if (Config.startupDelay > 0) {
|
||||
displayShow("", " STARTUP DELAY ...", "", "", 0);
|
||||
delay(Config.startupDelay * 60 * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -157,6 +157,8 @@ namespace WEB_Utils {
|
|||
Config.wifiAPs.push_back(wifiap);
|
||||
}
|
||||
|
||||
Config.startupDelay = getParamIntSafe("startupDelay", Config.startupDelay);
|
||||
|
||||
Config.callsign = getParamStringSafe("callsign", Config.callsign);
|
||||
|
||||
Config.wifiAutoAP.password = getParamStringSafe("wifi.autoAP.password", Config.wifiAutoAP.password);
|
||||
|
|
|
|||
Loading…
Reference in a new issue