Skip to content

Commit 9d38004

Browse files
committed
Add outputTipAltitude to menu
1 parent 9de52b6 commit 9d38004

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

Firmware/RTK_Everywhere/Tilt.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void tiltUpdate()
7272
{
7373
lastTiltCheck = millis();
7474

75-
if (settings.antennaHeight_mm < 0.5)
75+
if (settings.antennaHeight_mm < 500)
7676
systemPrintf("Warning: Short pole length detected: %0.3f\r\n", settings.antennaHeight_mm);
7777

7878
if (settings.enableImuDebug == true)
@@ -109,7 +109,7 @@ void tiltUpdate()
109109
{
110110
lastTiltCheck = millis();
111111

112-
if (settings.antennaHeight_mm < 0.5)
112+
if (settings.antennaHeight_mm < 500)
113113
systemPrintf("Warning: Short pole length detected: %0.3f\r\n", settings.antennaHeight_mm);
114114

115115
if (settings.enableImuDebug == true)

Firmware/RTK_Everywhere/menuSystem.ino

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,18 +1357,20 @@ void menuInstrument()
13571357
{
13581358
systemPrintln();
13591359
systemPrintln("Menu: Instrument Setup");
1360-
systemPrintln();
13611360

13621361
// Print the combined APC
13631362
systemPrintf("Combined Height of Instrument: %0.3fm\r\n", ((settings.antennaHeight_mm + settings.antennaPhaseCenter_mm) / 1000.0));
13641363

1365-
systemPrintf("1) Set Antenna Height (aka Pole Length): %dmm\r\n", settings.antennaHeight_mm);
1364+
systemPrintf("1) Set Antenna Height (aka Pole Length): %0.3fm\r\n", settings.antennaHeight_mm / 1000.0);
13661365

13671366
systemPrintf("2) Set Antenna Phase Center (aka ARP): %0.1fmm\r\n", settings.antennaPhaseCenter_mm);
13681367

1368+
systemPrint("3) Report Tip Altitude: ");
1369+
systemPrintf("%s\r\n", settings.outputTipAltitude ? "Enabled" : "Disabled");
1370+
13691371
if(present.imu_im19)
13701372
{
1371-
systemPrint("3) Tilt Compensation: ");
1373+
systemPrint("4) Tilt Compensation: ");
13721374
systemPrintf("%s\r\n", settings.enableTiltCompensation ? "Enabled" : "Disabled");
13731375
}
13741376

@@ -1378,16 +1380,23 @@ void menuInstrument()
13781380

13791381
if (incoming == 1)
13801382
{
1381-
getNewSetting("Enter the antenna height (a.k.a. pole length) in millimeters", -15000, 15000,
1382-
&settings.antennaHeight_mm);
1383+
float antennaHeight = 0;
1384+
1385+
if(getNewSetting("Enter the antenna height (a.k.a. pole length) in meters", -15.0, 15.0,
1386+
&antennaHeight) == INPUT_RESPONSE_VALID)
1387+
settings.antennaHeight_mm = antennaHeight * 1000.0;
13831388
}
13841389
else if (incoming == 2)
13851390
{
13861391
getNewSetting("Enter the antenna phase center (a.k.a. ARP) in millimeters. Common antennas "
13871392
"Torch=116mm",
13881393
-200.0, 200.0, &settings.antennaPhaseCenter_mm);
13891394
}
1390-
else if (incoming == 3 && present.imu_im19)
1395+
else if (incoming == 3)
1396+
{
1397+
settings.outputTipAltitude ^= 1;
1398+
}
1399+
else if (incoming == 4 && present.imu_im19)
13911400
{
13921401
settings.enableTiltCompensation ^= 1;
13931402
}

Firmware/RTK_Everywhere/settings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ struct Settings
13621362
};
13631363
uint32_t wifiConnectTimeoutMs = 20000; // Wait this long for a WiFiMulti connection
13641364

1365-
bool outputTipAltitude = false; // If enabled, subtract the pole length and ARP from the GNSS receiver's reported altitude
1365+
bool outputTipAltitude = false; // If enabled, subtract the pole length and APC from the GNSS receiver's reported altitude
13661366

13671367
// Add new settings to appropriate group above or create new group
13681368
// Then also add to the same group in rtkSettingsEntries below

0 commit comments

Comments
 (0)