Skip to content

Commit 7aa3b4e

Browse files
committed
Change coordinateIdentifyInputType userEntryOriginal parameter to const char *
1 parent f5a3259 commit 7aa3b4e

File tree

4 files changed

+1657
-1643
lines changed

4 files changed

+1657
-1643
lines changed

Firmware/RTK_Surveyor/AP-Config/src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1768,7 +1768,7 @@ function identifyInputType(userEntry) {
17681768

17691769
var negativeSign = false;
17701770
if (userEntry[0] == '-') {
1771-
userEntry = setCharAt(userEntry, 0, ''); //Remove leading space
1771+
userEntry = setCharAt(userEntry, 0, ''); //Remove leading minus
17721772
negativeSign = true;
17731773
dashCount--; //Use dashCount as the internal dashes only, not the leading negative sign
17741774
}

Firmware/RTK_Surveyor/Form.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,6 +1162,7 @@ void updateSettingWithValue(const char *settingName, const char *settingValueStr
11621162
}
11631163
else if (strcmp(settingName, "fixedLongText") == 0)
11641164
{
1165+
// Lat defines the settings.coordinateInputType. Don't update it here
11651166
double newCoordinate = 0.0;
11661167
if (coordinateIdentifyInputType((char *)settingValueStr, &newCoordinate) ==
11671168
COORDINATE_INPUT_TYPE_INVALID_UNKNOWN)

Firmware/RTK_Surveyor/System.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ void printPosition()
884884
}
885885

886886
// Given a user's string, try to identify the type and return the coordinate in DD.ddddddddd format
887-
CoordinateInputType coordinateIdentifyInputType(char *userEntryOriginal, double *coordinate)
887+
CoordinateInputType coordinateIdentifyInputType(const char *userEntryOriginal, double *coordinate)
888888
{
889889
char userEntry[50];
890890
strncpy(userEntry, userEntryOriginal,

0 commit comments

Comments
 (0)