Skip to content

Commit cdc43fe

Browse files
committed
Fix compile gates
1 parent 1347cfb commit cdc43fe

File tree

4 files changed

+51
-32
lines changed

4 files changed

+51
-32
lines changed

Firmware/RTK_Surveyor/Display.ino

Lines changed: 43 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -185,43 +185,43 @@ void updateDisplay()
185185

186186
case (STATE_ROVER_NOT_STARTED):
187187
icons = ICON_BATTERY //Top right
188-
| ICON_CROSS_HAIR //Center left
189-
| ICON_HORIZONTAL_ACCURACY //Center right
190-
| paintSIV() //Bottom left
191-
| ICON_LOGGING; //Bottom right
188+
| ICON_CROSS_HAIR //Center left
189+
| ICON_HORIZONTAL_ACCURACY //Center right
190+
| paintSIV() //Bottom left
191+
| ICON_LOGGING; //Bottom right
192192
iconsRadio = setRadioIcons(); //Top left
193193
break;
194194
case (STATE_ROVER_NO_FIX):
195195
icons = ICON_BATTERY //Top right
196-
| ICON_CROSS_HAIR //Center left
197-
| ICON_HORIZONTAL_ACCURACY //Center right
198-
| paintSIV() //Bottom left
199-
| ICON_LOGGING; //Bottom right
196+
| ICON_CROSS_HAIR //Center left
197+
| ICON_HORIZONTAL_ACCURACY //Center right
198+
| paintSIV() //Bottom left
199+
| ICON_LOGGING; //Bottom right
200200
iconsRadio = setRadioIcons(); //Top left
201201
break;
202202
case (STATE_ROVER_FIX):
203203
icons = ICON_BATTERY //Top right
204-
| ICON_CROSS_HAIR //Center left
205-
| ICON_HORIZONTAL_ACCURACY //Center right
206-
| paintSIV() //Bottom left
207-
| ICON_LOGGING; //Bottom right
204+
| ICON_CROSS_HAIR //Center left
205+
| ICON_HORIZONTAL_ACCURACY //Center right
206+
| paintSIV() //Bottom left
207+
| ICON_LOGGING; //Bottom right
208208
iconsRadio = setRadioIcons(); //Top left
209209
break;
210210
case (STATE_ROVER_RTK_FLOAT):
211211
blinking_icons ^= ICON_CROSS_HAIR_DUAL;
212212
icons = ICON_BATTERY //Top right
213-
| (blinking_icons & ICON_CROSS_HAIR_DUAL) //Center left
214-
| ICON_HORIZONTAL_ACCURACY //Center right
215-
| paintSIV() //Bottom left
216-
| ICON_LOGGING; //Bottom right
213+
| (blinking_icons & ICON_CROSS_HAIR_DUAL) //Center left
214+
| ICON_HORIZONTAL_ACCURACY //Center right
215+
| paintSIV() //Bottom left
216+
| ICON_LOGGING; //Bottom right
217217
iconsRadio = setRadioIcons(); //Top left
218218
break;
219219
case (STATE_ROVER_RTK_FIX):
220220
icons = ICON_BATTERY //Top right
221-
| ICON_CROSS_HAIR_DUAL//Center left
222-
| ICON_HORIZONTAL_ACCURACY //Center right
223-
| paintSIV() //Bottom left
224-
| ICON_LOGGING; //Bottom right
221+
| ICON_CROSS_HAIR_DUAL//Center left
222+
| ICON_HORIZONTAL_ACCURACY //Center right
223+
| paintSIV() //Bottom left
224+
| ICON_LOGGING; //Bottom right
225225
iconsRadio = setRadioIcons(); //Top left
226226
break;
227227

@@ -235,21 +235,21 @@ void updateDisplay()
235235
case (STATE_BASE_TEMP_SETTLE):
236236
blinking_icons ^= ICON_CROSS_HAIR;
237237
icons = ICON_BATTERY //Top right
238-
| (blinking_icons & ICON_CROSS_HAIR) //Center left
239-
| ICON_HORIZONTAL_ACCURACY //Center right
240-
| paintSIV() //Bottom left
241-
| ICON_LOGGING; //Bottom right
238+
| (blinking_icons & ICON_CROSS_HAIR) //Center left
239+
| ICON_HORIZONTAL_ACCURACY //Center right
240+
| paintSIV() //Bottom left
241+
| ICON_LOGGING; //Bottom right
242242
iconsRadio = setRadioIcons(); //Top left
243243
break;
244244
case (STATE_BASE_TEMP_SURVEY_STARTED):
245245
icons = ICON_BATTERY //Top right
246-
| ICON_LOGGING; //Bottom right
246+
| ICON_LOGGING; //Bottom right
247247
iconsRadio = setRadioIcons(); //Top left
248248
paintBaseTempSurveyStarted();
249249
break;
250250
case (STATE_BASE_TEMP_TRANSMITTING):
251251
icons = ICON_BATTERY //Top right
252-
| ICON_LOGGING; //Bottom right
252+
| ICON_LOGGING; //Bottom right
253253
iconsRadio = setRadioIcons(); //Top left
254254
paintRTCM();
255255
break;
@@ -259,7 +259,7 @@ void updateDisplay()
259259
break;
260260
case (STATE_BASE_FIXED_TRANSMITTING):
261261
icons = ICON_BATTERY //Top right
262-
| ICON_LOGGING; //Bottom right
262+
| ICON_LOGGING; //Bottom right
263263
iconsRadio = setRadioIcons(); //Top left
264264
paintRTCM();
265265
break;
@@ -884,7 +884,11 @@ uint32_t setWiFiIcon_TwoRadios()
884884

885885
if (firstRadioSpotBlink == false)
886886
{
887+
#ifdef COMPILE_WIFI
887888
int wifiRSSI = WiFi.RSSI();
889+
#else
890+
int wifiRSSI = -40; //Dummy
891+
#endif
888892
//Based on RSSI, select icon
889893
if (wifiRSSI >= -40)
890894
icons |= ICON_WIFI_SYMBOL_3_LEFT;
@@ -910,7 +914,11 @@ uint32_t setWiFiIcon_TwoRadios()
910914
}
911915
else
912916
{
917+
#ifdef COMPILE_WIFI
913918
int wifiRSSI = WiFi.RSSI();
919+
#else
920+
int wifiRSSI = -40; //Dummy
921+
#endif
914922
//Based on RSSI, select icon
915923
if (wifiRSSI >= -40)
916924
icons |= ICON_WIFI_SYMBOL_3_LEFT;
@@ -963,7 +971,11 @@ uint32_t setWiFiIcon_ThreeRadios()
963971

964972
if (thirdRadioSpotBlink == false)
965973
{
974+
#ifdef COMPILE_WIFI
966975
int wifiRSSI = WiFi.RSSI();
976+
#else
977+
int wifiRSSI = -40; //Dummy
978+
#endif
967979
//Based on RSSI, select icon
968980
if (wifiRSSI >= -40)
969981
icons |= ICON_WIFI_SYMBOL_3_RIGHT;
@@ -989,7 +1001,11 @@ uint32_t setWiFiIcon_ThreeRadios()
9891001
}
9901002
else
9911003
{
1004+
#ifdef COMPILE_WIFI
9921005
int wifiRSSI = WiFi.RSSI();
1006+
#else
1007+
int wifiRSSI = -40; //Dummy
1008+
#endif
9931009
//Based on RSSI, select icon
9941010
if (wifiRSSI >= -40)
9951011
icons |= ICON_WIFI_SYMBOL_3_RIGHT;

Firmware/RTK_Surveyor/Form.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,11 @@ void startWebServer()
139139
log_d("Web Server Started");
140140
reportHeapNow();
141141

142-
#endif
143-
#endif
142+
#endif //COMPILE_AP
144143

145144
wifiSetState(WIFI_NOTCONNECTED);
145+
#endif //COMPILE_WIFI
146+
146147
}
147148

148149
void stopWebServer()

Firmware/RTK_Surveyor/NtripServer.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,6 @@ void ntripServerSetState(byte newState)
313313
//This function gets called as each RTCM byte comes in
314314
void ntripServerProcessRTCM(uint8_t incoming)
315315
{
316-
uint32_t currentMilliseconds;
317-
static uint32_t previousMilliseconds = 0;
318-
319316
//Check for too many digits
320317
if (settings.enableResetDisplay == true)
321318
{
@@ -331,6 +328,9 @@ void ntripServerProcessRTCM(uint8_t incoming)
331328
}
332329

333330
#ifdef COMPILE_WIFI
331+
uint32_t currentMilliseconds;
332+
static uint32_t previousMilliseconds = 0;
333+
334334
if (online.rtc && (ntripServerState == NTRIP_SERVER_CASTING))
335335
{
336336
//Timestamp the RTCM messages

Firmware/RTK_Surveyor/settings.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ struct struct_online {
485485
bool i2c = false;
486486
} online;
487487

488+
#ifdef COMPILE_WIFI
488489
//AWS certificate for PointPerfect API
489490
static const char *AWS_PUBLIC_CERT = R"=====(
490491
-----BEGIN CERTIFICATE-----
@@ -508,3 +509,4 @@ o/ufQJVtMVT8QtPHRh8jrdkPSHCa2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU
508509
rqXRfboQnoZsG4q5WTP468SQvvG5
509510
-----END CERTIFICATE-----
510511
)=====";
512+
#endif

0 commit comments

Comments
 (0)