Skip to content

Commit 5ead5d9

Browse files
committed
Add missing coordinate type print (main.js)
1 parent a4d2264 commit 5ead5d9

File tree

2 files changed

+795
-780
lines changed

2 files changed

+795
-780
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1782,6 +1782,12 @@ function identifyInputType(userEntry) {
17821782
if (dashCount > 3) return (CoordinateTypes.COORDINATE_INPUT_TYPE_INVALID_UNKNOWN); //Only 0, 1, 2, or 3 allowed. -105-11-05.1629 is valid.
17831783
if (lengthOfLeadingNumber > 7) return (CoordinateTypes.COORDINATE_INPUT_TYPE_INVALID_UNKNOWN); //Only 7 or fewer. -1051105.188992 (DDDMMSS or DDMMSS) is valid
17841784

1785+
console.log("userEntry: " + userEntry);
1786+
console.log("decimalCount: " + decimalCount);
1787+
console.log("spaceCount: " + spaceCount);
1788+
console.log("dashCount: " + dashCount);
1789+
console.log("lengthOfLeadingNumber: " + lengthOfLeadingNumber);
1790+
17851791
var negativeSign = false;
17861792
if (userEntry[0] == '-') {
17871793
userEntry = setCharAt(userEntry, 0, ''); //Remove leading minus
@@ -1880,7 +1886,8 @@ function identifyInputType(userEntry) {
18801886
if (negativeSign) convertedCoordinate *= -1;
18811887
}
18821888

1883-
//console.log("convertedCoordinate: " + convertedCoordinate.toFixed(9));
1889+
console.log("convertedCoordinate: " + Number(convertedCoordinate).toFixed(9));
1890+
console.log("Detected type: " + printableInputType(coordinateInputType));
18841891
return (coordinateInputType);
18851892
}
18861893

@@ -1985,6 +1992,9 @@ function printableInputType(coordinateInputType) {
19851992
case (CoordinateTypes.COORDINATE_INPUT_TYPE_DD_MM_SS):
19861993
return ("DD MM SS.ssssss");
19871994
break;
1995+
case (CoordinateTypes.COORDINATE_INPUT_TYPE_DD_MM_SS_DASH):
1996+
return ("DD-MM-SS.ssssss");
1997+
break;
19881998
case (CoordinateTypes.COORDINATE_INPUT_TYPE_DDMMSS_NO_DECIMAL):
19891999
return ("DDMMSS");
19902000
break;

0 commit comments

Comments
 (0)