Skip to content

Commit 19e53ca

Browse files
committed
Move WiFi connect timeout to Debug Software menu
1 parent 3ecb0b8 commit 19e53ca

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

Firmware/RTK_Everywhere/WiFi.ino

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ void menuWiFi()
9292
systemPrint("m) MDNS: ");
9393
systemPrintf("%s\r\n", settings.mdnsEnable ? "Enabled" : "Disabled");
9494

95-
systemPrintf("t) Connect Timeout (ms): %d\r\n", settings.wifiConnectTimeoutMs);
96-
9795
systemPrintln("x) Exit");
9896

9997
byte incoming = getUserInputCharacterNumber();
@@ -130,18 +128,6 @@ void menuWiFi()
130128
{
131129
settings.mdnsEnable ^= 1;
132130
}
133-
else if (incoming == 't')
134-
{
135-
systemPrint("Enter connect timeout in ms (1000 - 120000): ");
136-
long newTimeout = getUserInputNumber(); // Returns EXIT, TIMEOUT, or long
137-
if ((newTimeout != INPUT_RESPONSE_GETNUMBER_EXIT) && (newTimeout != INPUT_RESPONSE_GETNUMBER_TIMEOUT))
138-
{
139-
if ((newTimeout >= 1000) && (newTimeout <= 120000))
140-
{
141-
settings.wifiConnectTimeoutMs = newTimeout;
142-
}
143-
}
144-
}
145131
else if (incoming == 'x')
146132
break;
147133
else if (incoming == INPUT_RESPONSE_GETCHARACTERNUMBER_EMPTY)

Firmware/RTK_Everywhere/menuSystem.ino

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,8 @@ void menuDebugSoftware()
736736

737737
systemPrintf("2) Set level to use PSRAM (bytes): %d\r\n", settings.psramMallocLevel);
738738

739+
systemPrintf("3) WiFi Connect Timeout (ms): %d\r\n", settings.wifiConnectTimeoutMs);
740+
739741
// Ring buffer - ZED Tx
740742
systemPrint("10) Print ring buffer offsets: ");
741743
systemPrintf("%s\r\n", settings.enablePrintRingBufferOffsets ? "Enabled" : "Disabled");
@@ -810,6 +812,10 @@ void menuDebugSoftware()
810812
{
811813
getNewSetting("Enter level to use PSRAM in bytes", 0, 65535, &settings.psramMallocLevel);
812814
}
815+
else if (incoming == 3)
816+
{
817+
getNewSetting("Enter WiFi connect timeout in ms", 1000, 120000, &settings.wifiConnectTimeoutMs);
818+
}
813819
else if (incoming == 10)
814820
settings.enablePrintRingBufferOffsets ^= 1;
815821
else if (incoming == 11)

Firmware/RTK_Everywhere/settings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ struct Settings
13531353
{"", ""},
13541354
{"", ""},
13551355
};
1356-
uint32_t wifiConnectTimeoutMs = 10000; // Wait this long for a WiFiMulti connection
1356+
uint32_t wifiConnectTimeoutMs = 20000; // Wait this long for a WiFiMulti connection
13571357

13581358
// Add new settings to appropriate group above or create new group
13591359
// Then also add to the same group in rtkSettingsEntries below

0 commit comments

Comments
 (0)