Skip to content

Commit 96da734

Browse files
committed
Fixes for ESP core v2.0.6
1 parent 2adbc4b commit 96da734

File tree

10 files changed

+28
-21
lines changed

10 files changed

+28
-21
lines changed

Firmware/RTK_Surveyor/Form.ino

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -501,11 +501,13 @@ void createSettingsString(char* newSettings)
501501
stringRecord(newSettings, "maxLogTime_minutes", settings.maxLogTime_minutes);
502502
stringRecord(newSettings, "maxLogLength_minutes", settings.maxLogLength_minutes);
503503

504-
char sdSpace[30];
505-
sprintf(sdSpace, "%s", stringHumanReadableSize(sdFreeSpace));
506-
stringRecord(newSettings, "sdFreeSpace", sdSpace);
507-
sprintf(sdSpace, "%s", stringHumanReadableSize(sdCardSize));
508-
stringRecord(newSettings, "sdSize", sdSpace);
504+
char sdCardSizeChar[20];
505+
stringHumanReadableSize(sdCardSize).toCharArray(sdCardSizeChar, sizeof(sdCardSizeChar));
506+
char sdFreeSpaceChar[20];
507+
stringHumanReadableSize(sdFreeSpace).toCharArray(sdFreeSpaceChar, sizeof(sdFreeSpaceChar));
508+
509+
stringRecord(newSettings, "sdFreeSpace", sdCardSizeChar);
510+
stringRecord(newSettings, "sdSize", sdFreeSpaceChar);
509511

510512
stringRecord(newSettings, "enableResetDisplay", settings.enableResetDisplay);
511513

Firmware/RTK_Surveyor/Tasks.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ void F9PSerialReadTask(void *e)
115115
{
116116
static PARSE_STATE parse = {waitForPreamble, processUart1Message, "Log"};
117117

118-
bool newDataLost = false; //Goes true at the first instance of 0 bytes available
119118
uint8_t incomingData = 0;
120119

121120
availableHandlerSpace = settings.gnssHandlerBufferSize;
@@ -949,7 +948,7 @@ void sdSizeCheckTask(void *e)
949948

950949
xSemaphoreGive(sdCardSemaphore);
951950

952-
uint64_t sdUsedSpace = sdCardSize - sdFreeSpace; //Don't think of it as used, think of it as unusable
951+
//uint64_t sdUsedSpace = sdCardSize - sdFreeSpace; //Don't think of it as used, think of it as unusable
953952

954953
systemPrintf("SD card size: %s / Free space: %s\r\n",
955954
stringHumanReadableSize(sdCardSize),

Firmware/RTK_Surveyor/WiFi.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ static const int MAX_WIFI_CONNECTION_ATTEMPTS = 500;
4646
//ms - Max of 4,294,967,295 or 4.3M seconds or 71,000 minutes or 1193 hours or 49 days between attempts
4747
static int wifiConnectionAttempts = 0; //Count the number of connection attempts between restarts
4848
static uint32_t wifiConnectionAttemptsTotal; //Count the number of connection attempts absolutely
49-
static uint32_t wifiLastConnectionAttempt = 0;
5049
static uint32_t wifiConnectionAttemptTimeout = 0;
5150

5251
//----------------------------------------
@@ -55,6 +54,8 @@ static uint32_t wifiConnectionAttemptTimeout = 0;
5554

5655
#ifdef COMPILE_WIFI
5756

57+
static uint32_t wifiLastConnectionAttempt = 0;
58+
5859
//WiFi Timer usage:
5960
// * Measure interval to display IP address
6061
static unsigned long wifiDisplayTimer = 0;

Firmware/RTK_Surveyor/menuFirmware.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void menuFirmware()
101101
}
102102
else if (incoming == 'x')
103103
break;
104-
else if (incoming == INPUT_RESPONSE_EMPTY)
104+
else if (incoming == INPUT_RESPONSE_GETCHARACTERNUMBER_EMPTY)
105105
break;
106106
else if (incoming == INPUT_RESPONSE_GETCHARACTERNUMBER_TIMEOUT)
107107
break;
@@ -414,7 +414,6 @@ bool otaCheckVersion(char *versionAvailable, uint8_t versionAvailableLength)
414414
//Exits by either updating firmware and resetting, or failing to connect
415415
void otaUpdate()
416416
{
417-
bool updateAvailable = false;
418417
#ifdef COMPILE_WIFI
419418
bool previouslyConnected = wifiIsConnected();
420419

Firmware/RTK_Surveyor/menuMain.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ void menuMain()
5555

5656
systemPrintln("5) Configure Logging");
5757

58+
#ifdef COMPILE_WIFI
5859
systemPrintln("6) Configure WiFi");
60+
#else
61+
systemPrintln("6) **WiFi Not Compiled**");
62+
#endif
5963

6064
systemPrintln("p) Configure User Profiles");
6165

@@ -114,7 +118,7 @@ void menuMain()
114118
}
115119
else if (incoming == 'x')
116120
break;
117-
else if (incoming == INPUT_RESPONSE_EMPTY)
121+
else if (incoming == INPUT_RESPONSE_GETCHARACTERNUMBER_EMPTY)
118122
break;
119123
else if (incoming == INPUT_RESPONSE_GETCHARACTERNUMBER_TIMEOUT)
120124
break;

Firmware/RTK_Surveyor/menuMessages.ino

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,16 @@ void menuLog()
1010

1111
if (settings.enableSD && online.microSD)
1212
{
13+
char sdCardSizeChar[20];
14+
stringHumanReadableSize(sdCardSize).toCharArray(sdCardSizeChar, sizeof(sdCardSizeChar));
15+
char sdFreeSpaceChar[20];
16+
stringHumanReadableSize(sdFreeSpace).toCharArray(sdFreeSpaceChar, sizeof(sdFreeSpaceChar));
17+
1318
char myString[200];
1419
snprintf(myString, sizeof(myString),
1520
"SD card size: %s / Free space: %s",
16-
stringHumanReadableSize(sdCardSize),
17-
stringHumanReadableSize(sdFreeSpace)
21+
sdCardSizeChar,
22+
sdFreeSpaceChar
1823
);
1924
systemPrintln(myString);
2025
}

Firmware/RTK_Surveyor/menuPP.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ void menuPointPerfect()
992992
}
993993
else if (incoming == 'x')
994994
break;
995-
else if (incoming == INPUT_RESPONSE_EMPTY)
995+
else if (incoming == INPUT_RESPONSE_GETCHARACTERNUMBER_EMPTY)
996996
break;
997997
else if (incoming == INPUT_RESPONSE_GETCHARACTERNUMBER_TIMEOUT)
998998
break;

Firmware/RTK_Surveyor/menuSystem.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ void menuSystem()
358358
}
359359
else if (incoming == 'x')
360360
break;
361-
else if (incoming == INPUT_RESPONSE_EMPTY)
361+
else if (incoming == INPUT_RESPONSE_GETCHARACTERNUMBER_EMPTY)
362362
break;
363363
else if (incoming == INPUT_RESPONSE_GETCHARACTERNUMBER_TIMEOUT)
364364
break;
@@ -464,7 +464,7 @@ void menuWiFi()
464464
}
465465
else if (incoming == 'x')
466466
break;
467-
else if (incoming == INPUT_RESPONSE_EMPTY)
467+
else if (incoming == INPUT_RESPONSE_GETCHARACTERNUMBER_EMPTY)
468468
break;
469469
else if (incoming == INPUT_RESPONSE_GETCHARACTERNUMBER_TIMEOUT)
470470
break;
@@ -858,7 +858,7 @@ void menuDebug()
858858
}
859859
else if (incoming == 'x')
860860
break;
861-
else if (incoming == INPUT_RESPONSE_EMPTY)
861+
else if (incoming == INPUT_RESPONSE_GETCHARACTERNUMBER_EMPTY)
862862
break;
863863
else if (incoming == INPUT_RESPONSE_GETCHARACTERNUMBER_TIMEOUT)
864864
break;

Firmware/RTK_Surveyor/settings.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ typedef enum
255255
INPUT_RESPONSE_GETNUMBER_EXIT = -9999999, //Less than min ECEF. User may be prompted for number but wants to exit without entering data
256256
INPUT_RESPONSE_GETNUMBER_TIMEOUT = -9999998,
257257
INPUT_RESPONSE_GETCHARACTERNUMBER_TIMEOUT = 255,
258+
INPUT_RESPONSE_GETCHARACTERNUMBER_EMPTY = 254,
258259
INPUT_RESPONSE_TIMEOUT = -3,
259260
INPUT_RESPONSE_OVERFLOW = -2,
260261
INPUT_RESPONSE_EMPTY = -1,

Firmware/RTK_Surveyor/support.ino

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -776,8 +776,6 @@ uint8_t nmeaFindFirstComma(PARSE_STATE * parse, uint8_t data)
776776
//Read the CRC
777777
uint8_t rtcmReadCrc(PARSE_STATE * parse, uint8_t data)
778778
{
779-
uint16_t dataSent;
780-
781779
//Account for this data byte
782780
parse->bytesRemaining -= 1;
783781

@@ -823,8 +821,6 @@ uint8_t rtcmReadCrc(PARSE_STATE * parse, uint8_t data)
823821
//Read the rest of the message
824822
uint8_t rtcmReadData(PARSE_STATE * parse, uint8_t data)
825823
{
826-
uint16_t dataSent;
827-
828824
//Account for this data byte
829825
parse->bytesRemaining -= 1;
830826

0 commit comments

Comments
 (0)