Skip to content

Commit 143c4ad

Browse files
authored
Merge pull request #624 from LeeLeahy2/web-server
WebServer: Fix halt, start serial WEB_CONFIG then mode button WEB_CONFIG
2 parents 5c11f4f + 9bd1324 commit 143c4ad

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

Firmware/RTK_Everywhere/WebServer.ino

+16-8
Original file line numberDiff line numberDiff line change
@@ -1128,15 +1128,23 @@ void webServerStart()
11281128
// Display the heap state
11291129
reportHeapNow(settings.debugWebServer);
11301130

1131-
if (settings.debugWebServer)
1132-
systemPrintln("Web Server: Starting");
1133-
1134-
// Start the network
1135-
if (settings.wifiConfigOverAP == false)
1136-
networkConsumerAdd(NETCONSUMER_WEB_CONFIG, NETWORK_ANY, __FILE__, __LINE__);
1131+
if (webServerState != WEBSERVER_STATE_OFF)
1132+
{
1133+
if (settings.debugWebServer)
1134+
systemPrintln("Web Server: Already running!");
1135+
}
11371136
else
1138-
networkSoftApConsumerAdd(NETCONSUMER_WEB_CONFIG, __FILE__, __LINE__);
1139-
webServerSetState(WEBSERVER_STATE_WAIT_FOR_NETWORK);
1137+
{
1138+
if (settings.debugWebServer)
1139+
systemPrintln("Web Server: Starting");
1140+
1141+
// Start the network
1142+
if (settings.wifiConfigOverAP == false)
1143+
networkConsumerAdd(NETCONSUMER_WEB_CONFIG, NETWORK_ANY, __FILE__, __LINE__);
1144+
else
1145+
networkSoftApConsumerAdd(NETCONSUMER_WEB_CONFIG, __FILE__, __LINE__);
1146+
webServerSetState(WEBSERVER_STATE_WAIT_FOR_NETWORK);
1147+
}
11401148
}
11411149

11421150
//----------------------------------------

0 commit comments

Comments
 (0)