Skip to content

Commit 555f417

Browse files
committed
menuCommand: Add wifiAfterCommand
1 parent c7a41e8 commit 555f417

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

Firmware/RTK_Everywhere/WiFi.ino

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,14 @@ void wifiUpdateSettings()
12641264
wifiSoftApSsidSet = (wifiSoftApSsid && strlen(wifiSoftApSsid));
12651265
}
12661266

1267+
//*********************************************************************
1268+
// Determine if any of the WiFi station SSID values are set
1269+
bool wifiAfterCommand(int cmdIndex)
1270+
{
1271+
wifiUpdateSettings();
1272+
return true;
1273+
}
1274+
12671275
//*********************************************************************
12681276
// Verify the WiFi tables
12691277
void wifiVerifyTables()

Firmware/RTK_Everywhere/settings.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,6 +1209,9 @@ typedef enum
12091209

12101210
typedef bool (* AFTER_CMD)(int cmdIndex);
12111211

1212+
// Forward routines
1213+
bool wifiAfterCommand(int cmdIndex);
1214+
12121215
typedef struct
12131216
{
12141217
bool inWebConfig; //This setting is exposed during WiFi/Eth config
@@ -1804,10 +1807,10 @@ const RTK_Settings_Entry rtkSettingsEntries[] =
18041807
// WiFi
18051808
{ 0, 0, 0, 1, 1, 1, 1, 1, 1, ALL, 1, _bool, 0, & settings.debugWebServer, "debugWebServer", nullptr, },
18061809
{ 0, 0, 0, 1, 1, 1, 1, 1, 1, ALL, 1, _bool, 0, & settings.debugWifiState, "debugWifiState", nullptr, },
1807-
{ 0, 0, 0, 1, 1, 1, 1, 1, 1, ALL, 1, _bool, 0, & settings.enableCaptivePortal, "enableCaptivePortal", nullptr, },
1808-
{ 0, 1, 0, 1, 1, 1, 1, 1, 1, ALL, 1, _uint8_t, 0, & settings.wifiChannel, "wifiChannel", nullptr, },
1809-
{ 1, 0, 0, 1, 1, 1, 1, 1, 1, ALL, 1, _bool, 0, & settings.wifiConfigOverAP, "wifiConfigOverAP", nullptr, },
1810-
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, ALL, 1, tWiFiNet, MAX_WIFI_NETWORKS, & settings.wifiNetworks, "wifiNetwork_", nullptr, },
1810+
{ 0, 0, 0, 1, 1, 1, 1, 1, 1, ALL, 1, _bool, 0, & settings.enableCaptivePortal, "enableCaptivePortal", wifiAfterCommand, },
1811+
{ 0, 1, 0, 1, 1, 1, 1, 1, 1, ALL, 1, _uint8_t, 0, & settings.wifiChannel, "wifiChannel", wifiAfterCommand, },
1812+
{ 1, 0, 0, 1, 1, 1, 1, 1, 1, ALL, 1, _bool, 0, & settings.wifiConfigOverAP, "wifiConfigOverAP", wifiAfterCommand, },
1813+
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, ALL, 1, tWiFiNet, MAX_WIFI_NETWORKS, & settings.wifiNetworks, "wifiNetwork_", wifiAfterCommand, },
18111814
{ 0, 0, 0, 1, 1, 1, 1, 1, 1, ALL, 1, _uint32_t, 0, & settings.wifiConnectTimeoutMs, "wifiConnectTimeoutMs", nullptr, },
18121815

18131816
{ 0, 1, 0, 1, 1, 1, 1, 1, 1, ALL, 1, _bool, 0, & settings.outputTipAltitude, "outputTipAltitude", nullptr, },

0 commit comments

Comments
 (0)