Compare commits

...

2 Commits

Author SHA1 Message Date
richonguzman
92572245cd beacon Freq on digi mod 2025-10-12 21:45:23 -03:00
richonguzman
152217e71c startup delay added 2025-10-12 14:21:51 -03:00
9 changed files with 65 additions and 22 deletions

View File

@@ -110,6 +110,7 @@
"rememberStationTime": 30,
"backupDigiMode": false,
"rebootMode": false,
"rebootModeTime": 6
"rebootModeTime": 6,
"startupDelay": 0
}
}

View File

@@ -344,6 +344,28 @@
</button>
</div>
</div>
<div class="col-6">
<label
for="startupDelay"
class="form-label"
>Startup Delay<small>(To Allow Router/Modem to start WiFiAP before connection)</small></label
>
<div class="input-group">
<input
type="number"
name="startupDelay"
id="startupDelay"
placeholder="0"
class="form-control"
step="1"
min="0"
max="5"
/>
<span class="input-group-text"
>minutes</span
>
</div>
</div>
</div>
</div>
<hr>
@@ -717,19 +739,26 @@
</select>
</div>
<div class="col-12 mt-3">
<div class="form-check form-switch">
<input
type="checkbox"
name="digi.beaconOnRxFreq"
id="digi.beaconOnRxFreq"
class="form-check-input"
/>
<label
for="digi.beaconOnRxFreq"
class="form-label"
>Which Frequency to send Beacon: <small>(Disable: Tx Freq / Enable: Rx Freq)</small>
</label>
</div>
<label
for="digi.beaconOnRxFreq"
class="form-label"
>Digipeater Beacon Frequency
<small
>(If Rx Freq different from Tx Freq).</small
></label
>
<select
class="form-select form-select"
name="digi.beaconOnRxFreq"
id="digi.beaconOnRxFreq"
>
<option value="false">
Beacon on Tx Freq
</option>
<option value="true">
Beacon on Rx Freq
</option>
</select>
</div>
</div>
</div>

View File

@@ -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;

View File

@@ -169,6 +169,7 @@ public:
bool backupDigiMode;
bool rebootMode;
int rebootModeTime;
int startupDelay;
String personalNote;
String blacklist;
std::vector<WiFi_AP> wifiAPs;

View File

@@ -46,6 +46,7 @@ namespace Utils {
void checkRebootTime();
void checkSleepByLowBatteryVoltage(uint8_t mode);
bool checkValidCallsign(const String& callsign);
void startupDelay();
}

View File

@@ -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();

View File

@@ -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;

View File

@@ -436,4 +436,11 @@ namespace Utils {
return true;
}
void startupDelay() {
if (Config.startupDelay > 0) {
displayShow("", " STARTUP DELAY ...", "", "", 0);
delay(Config.startupDelay * 60 * 1000);
}
}
}

View File

@@ -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);