Skip to content

Commit fa18eac

Browse files
committed
Fixes to reduce compiler warnings.
1 parent b96b362 commit fa18eac

File tree

7 files changed

+38
-40
lines changed

7 files changed

+38
-40
lines changed

Firmware/RTK_Surveyor/Buttons.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ void checkSetupButton()
4343
}
4444
else
4545
{
46-
//TODO maybe create a custom fixed base fail screen
47-
Serial.println(F("Fixed base start failed!"));
46+
Serial.println(F("Fixed base start failed"));
4847
displayBaseFail();
4948
delay(1000);
5049
return;

Firmware/RTK_Surveyor/Display.ino

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void displaySplash()
8787
int textY = 25;
8888
int textKerning = 9;
8989
oled.setFontType(1);
90-
printTextwithKerning("Express", textX, textY, textKerning);
90+
printTextwithKerning((char*)"Express", textX, textY, textKerning);
9191

9292
oled.setCursor(20, 41);
9393
oled.setFontType(0); //Set font to smallest
@@ -110,14 +110,14 @@ void displayShutdown()
110110
int textY = 10;
111111
int textKerning = 8;
112112

113-
printTextwithKerning("Shutting", textX, textY, textKerning);
113+
printTextwithKerning((char*)"Shutting", textX, textY, textKerning);
114114

115115
textX = 4;
116116
textY = 25;
117117
textKerning = 9;
118118
oled.setFontType(1);
119119

120-
printTextwithKerning("Down...", textX, textY, textKerning);
120+
printTextwithKerning((char*)"Down...", textX, textY, textKerning);
121121

122122
oled.display();
123123
}
@@ -542,7 +542,7 @@ void paintBaseTempTransmitting()
542542
int textY = 17;
543543
int textKerning = 8;
544544
oled.setFontType(1);
545-
printTextwithKerning("Xmitting", textX, textY, textKerning);
545+
printTextwithKerning((char*)"Xmitting", textX, textY, textKerning);
546546

547547
oled.setCursor(0, 39); //x, y
548548
oled.setFontType(0);
@@ -576,7 +576,7 @@ void paintBaseTempWiFiStarted()
576576
int textY = 17;
577577
int textKerning = 8;
578578
oled.setFontType(1);
579-
printTextwithKerning("Xmitting", textX, textY, textKerning);
579+
printTextwithKerning((char*)"Xmitting", textX, textY, textKerning);
580580

581581
oled.setCursor(0, 39); //x, y
582582
oled.setFontType(0);
@@ -611,7 +611,7 @@ void paintBaseTempWiFiConnected()
611611
int textY = 17;
612612
int textKerning = 8;
613613
oled.setFontType(1);
614-
printTextwithKerning("Xmitting", textX, textY, textKerning);
614+
printTextwithKerning((char*)"Xmitting", textX, textY, textKerning);
615615

616616
oled.setCursor(0, 39); //x, y
617617
oled.setFontType(0);
@@ -645,14 +645,14 @@ void paintBaseTempCasterStarted()
645645
int textY = 17;
646646
int textKerning = 8;
647647

648-
printTextwithKerning("Caster", textX, textY, textKerning);
648+
printTextwithKerning((char*)"Caster", textX, textY, textKerning);
649649

650650
textX = 3;
651651
textY = 33;
652652
textKerning = 6;
653653
oled.setFontType(1);
654654

655-
printTextwithKerning("Connecting", textX, textY, textKerning);
655+
printTextwithKerning((char*)"Connecting", textX, textY, textKerning);
656656
}
657657
}
658658

@@ -672,7 +672,7 @@ void paintBaseTempCasterConnected()
672672
int textY = 17;
673673
int textKerning = 8;
674674
oled.setFontType(1);
675-
printTextwithKerning("Casting", textX, textY, textKerning);
675+
printTextwithKerning((char*)"Casting", textX, textY, textKerning);
676676

677677
oled.setCursor(0, 39); //x, y
678678
oled.setFontType(0);
@@ -705,7 +705,7 @@ void paintBaseFixedTransmitting()
705705
int textY = 17;
706706
int textKerning = 8;
707707
oled.setFontType(1);
708-
printTextwithKerning("Xmitting", textX, textY, textKerning);
708+
printTextwithKerning((char*)"Xmitting", textX, textY, textKerning);
709709

710710
oled.setCursor(0, 39); //x, y
711711
oled.setFontType(0);
@@ -739,7 +739,7 @@ void paintBaseFixedWiFiStarted()
739739
int textY = 17;
740740
int textKerning = 8;
741741
oled.setFontType(1);
742-
printTextwithKerning("Xmitting", textX, textY, textKerning);
742+
printTextwithKerning((char*)"Xmitting", textX, textY, textKerning);
743743

744744
oled.setCursor(0, 39); //x, y
745745
oled.setFontType(0);
@@ -774,7 +774,7 @@ void paintBaseFixedWiFiConnected()
774774
int textY = 17;
775775
int textKerning = 8;
776776
oled.setFontType(1);
777-
printTextwithKerning("Xmitting", textX, textY, textKerning);
777+
printTextwithKerning((char*)"Xmitting", textX, textY, textKerning);
778778

779779
oled.setCursor(0, 39); //x, y
780780
oled.setFontType(0);
@@ -808,14 +808,14 @@ void paintBaseFixedCasterStarted()
808808
int textY = 18;
809809
int textKerning = 8;
810810

811-
printTextwithKerning("Caster", textX, textY, textKerning);
811+
printTextwithKerning((char*)"Caster", textX, textY, textKerning);
812812

813813
textX = 3;
814814
textY = 33;
815815
textKerning = 6;
816816
oled.setFontType(1);
817817

818-
printTextwithKerning("Connecting", textX, textY, textKerning);
818+
printTextwithKerning((char*)"Connecting", textX, textY, textKerning);
819819
}
820820
}
821821

@@ -835,7 +835,7 @@ void paintBaseFixedCasterConnected()
835835
int textY = 17;
836836
int textKerning = 8;
837837
oled.setFontType(1);
838-
printTextwithKerning("Casting", textX, textY, textKerning);
838+
printTextwithKerning((char*)"Casting", textX, textY, textKerning);
839839

840840
oled.setCursor(0, 39); //x, y
841841
oled.setFontType(0);
@@ -874,7 +874,7 @@ void displayBaseStart()
874874
int textY = 10;
875875
int textKerning = 8;
876876

877-
printTextwithKerning("Base", textX, textY, textKerning);
877+
printTextwithKerning((char*)"Base", textX, textY, textKerning);
878878

879879
oled.display();
880880
}
@@ -893,14 +893,14 @@ void displayBaseSuccess()
893893
int textY = 10;
894894
int textKerning = 8;
895895

896-
printTextwithKerning("Base", textX, textY, textKerning);
896+
printTextwithKerning((char*)"Base", textX, textY, textKerning);
897897

898898
textX = 5;
899899
textY = 25;
900900
textKerning = 8;
901901
oled.setFontType(1);
902902

903-
printTextwithKerning("Started", textX, textY, textKerning);
903+
printTextwithKerning((char*)"Started", textX, textY, textKerning);
904904
oled.display();
905905
}
906906
}
@@ -918,14 +918,14 @@ void displayBaseFail()
918918
int textY = 10;
919919
int textKerning = 8;
920920

921-
printTextwithKerning("Base", textX, textY, textKerning);
921+
printTextwithKerning((char*)"Base", textX, textY, textKerning);
922922

923923
textX = 10;
924924
textY = 25;
925925
textKerning = 8;
926926
oled.setFontType(1);
927927

928-
printTextwithKerning("Failed", textX, textY, textKerning);
928+
printTextwithKerning((char*)"Failed", textX, textY, textKerning);
929929
oled.display();
930930
}
931931
}
@@ -943,7 +943,7 @@ void displayRoverStart()
943943
int textY = 10;
944944
int textKerning = 8;
945945

946-
printTextwithKerning("Rover", textX, textY, textKerning);
946+
printTextwithKerning((char*)"Rover", textX, textY, textKerning);
947947

948948
oled.display();
949949
}
@@ -962,14 +962,14 @@ void displayRoverSuccess()
962962
int textY = 10;
963963
int textKerning = 8;
964964

965-
printTextwithKerning("Rover", textX, textY, textKerning);
965+
printTextwithKerning((char*)"Rover", textX, textY, textKerning);
966966

967967
textX = 5;
968968
textY = 25;
969969
textKerning = 8;
970970
oled.setFontType(1);
971971

972-
printTextwithKerning("Started", textX, textY, textKerning);
972+
printTextwithKerning((char*)"Started", textX, textY, textKerning);
973973
oled.display();
974974
}
975975
}
@@ -987,14 +987,14 @@ void displayRoverFail()
987987
int textY = 10;
988988
int textKerning = 8;
989989

990-
printTextwithKerning("Rover", textX, textY, textKerning);
990+
printTextwithKerning((char*)"Rover", textX, textY, textKerning);
991991

992992
textX = 10;
993993
textY = 25;
994994
textKerning = 8;
995995
oled.setFontType(1);
996996

997-
printTextwithKerning("Failed", textX, textY, textKerning);
997+
printTextwithKerning((char*)"Failed", textX, textY, textKerning);
998998
oled.display();
999999
}
10001000
}
@@ -1013,14 +1013,14 @@ void displaySerialConfig()
10131013
int textY = 10;
10141014
int textKerning = 8;
10151015

1016-
printTextwithKerning("Serial", textX, textY, textKerning);
1016+
printTextwithKerning((char*)"Serial", textX, textY, textKerning);
10171017

10181018
textX = 10;
10191019
textY = 25;
10201020
textKerning = 8;
10211021
oled.setFontType(1);
10221022

1023-
printTextwithKerning("Config", textX, textY, textKerning);
1023+
printTextwithKerning((char*)"Config", textX, textY, textKerning);
10241024
oled.display();
10251025
}
10261026
}
@@ -1038,7 +1038,7 @@ void displaySurveyStart()
10381038
int textY = 10;
10391039
int textKerning = 8;
10401040

1041-
printTextwithKerning("Survey", textX, textY, textKerning);
1041+
printTextwithKerning((char*)"Survey", textX, textY, textKerning);
10421042

10431043
oled.display();
10441044
}
@@ -1057,14 +1057,14 @@ void displaySurveyStarted()
10571057
int textY = 10;
10581058
int textKerning = 8;
10591059

1060-
printTextwithKerning("Survey", textX, textY, textKerning);
1060+
printTextwithKerning((char*)"Survey", textX, textY, textKerning);
10611061

10621062
textX = 6;
10631063
textY = 25;
10641064
textKerning = 8;
10651065
oled.setFontType(1);
10661066

1067-
printTextwithKerning("Started", textX, textY, textKerning);
1067+
printTextwithKerning((char*)"Started", textX, textY, textKerning);
10681068
oled.display();
10691069
}
10701070
}
@@ -1095,14 +1095,14 @@ void displaySDFail()
10951095
int textY = 10;
10961096
int textKerning = 8;
10971097

1098-
printTextwithKerning("Format", textX, textY, textKerning);
1098+
printTextwithKerning((char*)"Format", textX, textY, textKerning);
10991099

11001100
textX = 7;
11011101
textY = 25;
11021102
textKerning = 8;
11031103
oled.setFontType(1);
11041104

1105-
printTextwithKerning("SD Card", textX, textY, textKerning);
1105+
printTextwithKerning((char*)"SD Card", textX, textY, textKerning);
11061106
oled.display();
11071107
}
11081108
}

Firmware/RTK_Surveyor/States.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ void updateSystemState()
246246
while (caster.available())
247247
{
248248
response[responseSpot++] = caster.read();
249-
if (strstr(response, "200") > 0) //Look for 'ICY 200 OK'
249+
if (strstr(response, "200") != NULL) //Look for 'ICY 200 OK'
250250
connectionSuccess = true;
251251
if (responseSpot == 512 - 1) break;
252252
}
@@ -384,7 +384,7 @@ void updateSystemState()
384384
while (caster.available())
385385
{
386386
response[responseSpot++] = caster.read();
387-
if (strstr(response, "200") > 0) //Look for 'ICY 200 OK'
387+
if (strstr(response, "200") != NULL) //Look for 'ICY 200 OK'
388388
connectionSuccess = true;
389389
if (responseSpot == 512 - 1) break;
390390
}

Firmware/RTK_Surveyor/begin.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ bool beginBluetooth()
306306
}
307307

308308
//Turn off BT so we can go into WiFi mode
309-
bool endBluetooth()
309+
void endBluetooth()
310310
{
311311
//Delete tasks if running
312312
// if (F9PSerialReadTaskHandle != NULL)

Firmware/RTK_Surveyor/menuGNSS.ino

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ void menuGNSS()
88
Serial.println(F("Menu: GNSS Menu"));
99

1010
float currentHz = getMeasurementFrequency(); //Get measRate and navRate from module.
11-
uint16_t currentHzInt = (uint16_t)currentHz;
1211
float currentSeconds = 1.0 / currentHz;
1312

1413
Serial.print(F("1) Set measurement rate in Hz: "));

Firmware/RTK_Surveyor/nvm.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ bool parseLine(char* str) {
273273

274274
//Check to see if this setting file is compatible with this version of RTK Surveyor
275275
if (d != sizeof(settings))
276-
Serial.printf("Warning: Settings size is %d but current firmware expects %d. Attempting to use settings from file.\r\n", d, sizeof(settings));
276+
Serial.printf("Warning: Settings size is %d but current firmware expects %d. Attempting to use settings from file.\r\n", (int)d, sizeof(settings));
277277

278278
}
279279
else if (strcmp(settingName, "rtkIdentifier") == 0)

Firmware/RTK_Surveyor/settings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ volatile byte radioState = RADIO_OFF;
4949
enum returnStatus {
5050
STATUS_GETBYTE_TIMEOUT = 255,
5151
STATUS_GETNUMBER_TIMEOUT = -123455555,
52-
STATUS_PRESSED_X,
52+
STATUS_PRESSED_X = 254,
5353
};
5454

5555
//These are the allowable messages to either broadcast over SPP or log to UBX file

0 commit comments

Comments
 (0)