Skip to content

Commit fed9547

Browse files
authored
Merge pull request #234 from LeeLeahy2/f
Remove F() from around strings
2 parents ac76d57 + 8bb899d commit fed9547

21 files changed

+573
-573
lines changed

Firmware/RTK_Surveyor/Base.ino

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ bool configureUbloxModuleBase()
2323
response &= i2cGNSS.setNavigationFrequency(1, maxWait);
2424
// response &= i2cGNSS.setNavigationFrequency(4, maxWait);
2525
if (response == false)
26-
Serial.println(F("Set rate failed"));
26+
Serial.println("Set rate failed");
2727

2828
i2cGNSS.checkUblox(); //Regularly poll to get latest data and any RTCM
2929

@@ -32,14 +32,14 @@ bool configureUbloxModuleBase()
3232

3333
response = i2cGNSS.setSurveyMode(0, 0, 0); //Disable Survey-In or Fixed Mode
3434
if (response == false)
35-
Serial.println(F("Disable TMODE3 failed"));
35+
Serial.println("Disable TMODE3 failed");
3636

3737
//In base mode we force 1Hz
3838
if (i2cGNSS.getNavigationFrequency(maxWait) != 1)
3939
response &= i2cGNSS.setNavigationFrequency(1, maxWait);
4040
if (response == false)
4141
{
42-
Serial.println(F("configureUbloxModuleBase: Set rate failed"));
42+
Serial.println("configureUbloxModuleBase: Set rate failed");
4343
return (false);
4444
}
4545

@@ -49,7 +49,7 @@ bool configureUbloxModuleBase()
4949
response &= i2cGNSS.setDynamicModel(DYN_MODEL_STATIONARY, maxWait);
5050
if (response == false)
5151
{
52-
Serial.println(F("setDynamicModel failed"));
52+
Serial.println("setDynamicModel failed");
5353
return (false);
5454
}
5555
}
@@ -75,13 +75,13 @@ bool configureUbloxModuleBase()
7575

7676
if (response == false)
7777
{
78-
Serial.println(F("RTCM settings failed to enable"));
78+
Serial.println("RTCM settings failed to enable");
7979
return (false);
8080
}
8181

8282
response &= i2cGNSS.saveConfiguration(); //Save the current settings to flash and BBR
8383
if (response == false)
84-
Serial.println(F("Module failed to save."));
84+
Serial.println("Module failed to save.");
8585

8686
return (response);
8787
}
@@ -100,18 +100,18 @@ bool beginSurveyIn()
100100

101101
if (resetSurvey() == false)
102102
{
103-
Serial.println(F("Survey reset failed"));
103+
Serial.println("Survey reset failed");
104104
if (resetSurvey() == false)
105105
{
106-
Serial.println(F("Survey reset failed - 2nd attempt"));
106+
Serial.println("Survey reset failed - 2nd attempt");
107107
}
108108
}
109109
}
110110

111111
bool response = i2cGNSS.enableSurveyMode(settings.observationSeconds, settings.observationPositionAccuracy, 5000); //Enable Survey in, with user parameters. Wait up to 5s.
112112
if (response == false)
113113
{
114-
Serial.println(F("Survey start failed"));
114+
Serial.println("Survey start failed");
115115
return (false);
116116
}
117117

Firmware/RTK_Surveyor/Begin.ino

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -173,17 +173,17 @@ void beginBoard()
173173
Serial.print("Reset reason: ");
174174
switch (esp_reset_reason())
175175
{
176-
case ESP_RST_UNKNOWN: Serial.println(F("ESP_RST_UNKNOWN")); break;
177-
case ESP_RST_POWERON : Serial.println(F("ESP_RST_POWERON")); break;
178-
case ESP_RST_SW : Serial.println(F("ESP_RST_SW")); break;
179-
case ESP_RST_PANIC : Serial.println(F("ESP_RST_PANIC")); break;
180-
case ESP_RST_INT_WDT : Serial.println(F("ESP_RST_INT_WDT")); break;
181-
case ESP_RST_TASK_WDT : Serial.println(F("ESP_RST_TASK_WDT")); break;
182-
case ESP_RST_WDT : Serial.println(F("ESP_RST_WDT")); break;
183-
case ESP_RST_DEEPSLEEP : Serial.println(F("ESP_RST_DEEPSLEEP")); break;
184-
case ESP_RST_BROWNOUT : Serial.println(F("ESP_RST_BROWNOUT")); break;
185-
case ESP_RST_SDIO : Serial.println(F("ESP_RST_SDIO")); break;
186-
default : Serial.println(F("Unknown"));
176+
case ESP_RST_UNKNOWN: Serial.println("ESP_RST_UNKNOWN"); break;
177+
case ESP_RST_POWERON : Serial.println("ESP_RST_POWERON"); break;
178+
case ESP_RST_SW : Serial.println("ESP_RST_SW"); break;
179+
case ESP_RST_PANIC : Serial.println("ESP_RST_PANIC"); break;
180+
case ESP_RST_INT_WDT : Serial.println("ESP_RST_INT_WDT"); break;
181+
case ESP_RST_TASK_WDT : Serial.println("ESP_RST_TASK_WDT"); break;
182+
case ESP_RST_WDT : Serial.println("ESP_RST_WDT"); break;
183+
case ESP_RST_DEEPSLEEP : Serial.println("ESP_RST_DEEPSLEEP"); break;
184+
case ESP_RST_BROWNOUT : Serial.println("ESP_RST_BROWNOUT"); break;
185+
case ESP_RST_SDIO : Serial.println("ESP_RST_SDIO"); break;
186+
default : Serial.println("Unknown");
187187
}
188188
}
189189
}
@@ -259,7 +259,7 @@ void beginSD()
259259

260260
if (tries == maxTries)
261261
{
262-
Serial.println(F("SD init failed. Is card present? Formatted?"));
262+
Serial.println("SD init failed. Is card present? Formatted?");
263263
digitalWrite(pin_microSD_CS, HIGH); //Be sure SD is deselected
264264
break;
265265
}
@@ -268,21 +268,21 @@ void beginSD()
268268
//Change to root directory. All new file creation will be in root.
269269
if (sd->chdir() == false)
270270
{
271-
Serial.println(F("SD change directory failed"));
271+
Serial.println("SD change directory failed");
272272
break;
273273
}
274274

275275
if (createTestFile() == false)
276276
{
277-
Serial.println(F("Failed to create test file. Format SD card with 'SD Card Formatter'."));
277+
Serial.println("Failed to create test file. Format SD card with 'SD Card Formatter'.");
278278
displaySDFail(5000);
279279
break;
280280
}
281281

282282
//Load firmware file from the microSD card if it is present
283283
scanForFirmware();
284284

285-
Serial.println(F("microSD: Online"));
285+
Serial.println("microSD: Online");
286286
online.microSD = true;
287287
break;
288288
}
@@ -302,7 +302,7 @@ void endSD(bool alreadyHaveSemaphore, bool releaseSemaphore)
302302
{
303303
sd->end();
304304
online.microSD = false;
305-
Serial.println(F("microSD: Offline"));
305+
Serial.println("microSD: Offline");
306306
}
307307

308308
//Free the caches for the microSD card
@@ -493,20 +493,20 @@ void configureGNSS()
493493
if (response == false)
494494
{
495495
//Try once more
496-
Serial.println(F("Failed to configure GNSS module. Trying again."));
496+
Serial.println("Failed to configure GNSS module. Trying again.");
497497
delay(1000);
498498
response = configureUbloxModule();
499499

500500
if (response == false)
501501
{
502-
Serial.println(F("Failed to configure GNSS module."));
502+
Serial.println("Failed to configure GNSS module.");
503503
displayGNSSFail(1000);
504504
online.gnss = false;
505505
return;
506506
}
507507
}
508508

509-
Serial.println(F("GNSS configuration complete"));
509+
Serial.println("GNSS configuration complete");
510510
}
511511

512512
//Set LEDs for output and configure PWM
@@ -547,15 +547,15 @@ void beginFuelGauge()
547547
// Set up the MAX17048 LiPo fuel gauge
548548
if (lipo.begin() == false)
549549
{
550-
Serial.println(F("MAX17048 not detected. Continuing."));
550+
Serial.println("MAX17048 not detected. Continuing.");
551551
return;
552552
}
553553

554554
//Always use hibernate mode
555555
if (lipo.getHIBRTActThr() < 0xFF) lipo.setHIBRTActThr((uint8_t)0xFF);
556556
if (lipo.getHIBRTHibThr() < 0xFF) lipo.setHIBRTHibThr((uint8_t)0xFF);
557557

558-
Serial.println(F("MAX17048 configuration complete"));
558+
Serial.println("MAX17048 configuration complete");
559559

560560
checkBatteryLevels(); //Force check so you see battery level immediately at power on
561561

@@ -591,7 +591,7 @@ void beginAccelerometer()
591591
//accel.setDataRate(LIS2DH12_ODR_100Hz); //6 measurements a second
592592
accel.setDataRate(LIS2DH12_ODR_400Hz); //25 measurements a second
593593

594-
Serial.println(F("Accelerometer configuration complete"));
594+
Serial.println("Accelerometer configuration complete");
595595

596596
online.accelerometer = true;
597597
}
@@ -704,7 +704,7 @@ bool beginExternalTriggers()
704704

705705
bool response = i2cGNSS.saveConfiguration(); //Save the current settings to flash and BBR
706706
if (response == false)
707-
Serial.println(F("Module failed to save."));
707+
Serial.println("Module failed to save.");
708708

709709
return (response);
710710
}

Firmware/RTK_Surveyor/Bluetooth.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ static volatile byte bluetoothState = BT_OFF;
4040
//Used for updating the bluetoothState state machine
4141
void bluetoothCallback(esp_spp_cb_event_t event, esp_spp_cb_param_t *param) {
4242
if (event == ESP_SPP_SRV_OPEN_EVT) {
43-
Serial.println(F("Client Connected"));
43+
Serial.println("Client Connected");
4444
bluetoothState = BT_CONNECTED;
4545
if (productVariant == RTK_SURVEYOR)
4646
digitalWrite(pin_bluetoothStatusLED, HIGH);
4747
}
4848

4949
if (event == ESP_SPP_CLOSE_EVT ) {
50-
Serial.println(F("Client disconnected"));
50+
Serial.println("Client disconnected");
5151
bluetoothState = BT_NOTCONNECTED;
5252
if (productVariant == RTK_SURVEYOR)
5353
digitalWrite(pin_bluetoothStatusLED, LOW);
@@ -121,7 +121,7 @@ void bluetoothStart()
121121

122122
if (bluetoothSerial.begin(deviceName, false, settings.sppRxQueueSize, settings.sppTxQueueSize) == false) //localName, isMaster, rxBufferSize, txBufferSize
123123
{
124-
Serial.println(F("An error occurred initializing Bluetooth"));
124+
Serial.println("An error occurred initializing Bluetooth");
125125

126126
if (productVariant == RTK_SURVEYOR)
127127
digitalWrite(pin_bluetoothStatusLED, LOW);
@@ -151,7 +151,7 @@ void bluetoothStart()
151151
bluetoothSerial.register_callback(bluetoothCallback); //Controls BT Status LED on Surveyor
152152
bluetoothSerial.setTimeout(250);
153153

154-
Serial.print(F("Bluetooth broadcasting as: "));
154+
Serial.print("Bluetooth broadcasting as: ");
155155
Serial.println(deviceName);
156156

157157
//Start task for controlling Bluetooth pair LED

0 commit comments

Comments
 (0)