@@ -82,7 +82,6 @@ NtripServer.ino
82
82
/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
83
83
NTRIP Server States:
84
84
NTRIP_SERVER_OFF: Network off or using NTRIP Client
85
- NTRIP_SERVER_ON: WIFI_STATE_START state
86
85
NTRIP_SERVER_WAIT_FOR_NETWORK: Connecting to the network
87
86
NTRIP_SERVER_NETWORK_CONNECTED: Connected to the network
88
87
NTRIP_SERVER_WAIT_GNSS_DATA: Waiting for correction data from GNSS
@@ -94,12 +93,8 @@ NtripServer.ino
94
93
| ^
95
94
ntripServerStart | | ntripServerShutdown()
96
95
v |
97
- .---------> NTRIP_SERVER_ON <------- ------------.
96
+ .--> NTRIP_SERVER_WAIT_FOR_NETWORK < ------------.
98
97
| | |
99
- | | | ntripServerRestart()
100
- | v Fail |
101
- | NTRIP_SERVER_WAIT_FOR_NETWORK ------------->+
102
- | | ^
103
98
| | |
104
99
| v Fail |
105
100
| NTRIP_SERVER_NETWORK_CONNECTED ----------->+
@@ -145,7 +140,6 @@ static const int NTRIP_SERVER_CONNECTION_TIME = 5 * 60 * 1000;
145
140
enum NTRIPServerState
146
141
{
147
142
NTRIP_SERVER_OFF = 0 , // Using Bluetooth or NTRIP client
148
- NTRIP_SERVER_ON, // WIFI_STATE_START state
149
143
NTRIP_SERVER_WAIT_FOR_NETWORK, // Connecting to WiFi access point
150
144
NTRIP_SERVER_NETWORK_CONNECTED, // WiFi connected to an access point
151
145
NTRIP_SERVER_WAIT_GNSS_DATA, // Waiting for correction data from GNSS
@@ -157,7 +151,6 @@ enum NTRIPServerState
157
151
};
158
152
159
153
const char *const ntripServerStateName[] = {" NTRIP_SERVER_OFF" ,
160
- " NTRIP_SERVER_ON" ,
161
154
" NTRIP_SERVER_WAIT_FOR_NETWORK" ,
162
155
" NTRIP_SERVER_NETWORK_CONNECTED" ,
163
156
" NTRIP_SERVER_WAIT_GNSS_DATA" ,
@@ -351,7 +344,6 @@ void ntripServerPrintStateSummary(int serverIndex)
351
344
case NTRIP_SERVER_OFF:
352
345
systemPrint (" Disconnected" );
353
346
break ;
354
- case NTRIP_SERVER_ON:
355
347
case NTRIP_SERVER_WAIT_FOR_NETWORK:
356
348
case NTRIP_SERVER_NETWORK_CONNECTED:
357
349
case NTRIP_SERVER_WAIT_GNSS_DATA:
@@ -579,7 +571,7 @@ void ntripServerStop(int serverIndex, bool shutdown)
579
571
}
580
572
581
573
// Increase timeouts if we started the network
582
- if (ntripServer->state > NTRIP_SERVER_ON )
574
+ if (ntripServer->state > NTRIP_SERVER_OFF )
583
575
// Mark the Server stop so that we don't immediately attempt re-connect to Caster
584
576
ntripServer->timer = millis ();
585
577
@@ -648,12 +640,11 @@ void ntripServerUpdate(int serverIndex)
648
640
{
649
641
case NTRIP_SERVER_OFF:
650
642
if (enabled)
643
+ {
644
+ // Start the network
651
645
ntripServerStart (serverIndex);
652
- break ;
653
-
654
- // Start the network
655
- case NTRIP_SERVER_ON:
656
- ntripServerSetState (serverIndex, NTRIP_SERVER_WAIT_FOR_NETWORK);
646
+ ntripServerSetState (serverIndex, NTRIP_SERVER_WAIT_FOR_NETWORK);
647
+ }
657
648
break ;
658
649
659
650
// Wait for a network media connection
0 commit comments