Skip to content

Commit 16bf517

Browse files
authored
Deprecate gps-rescue-throttle-pid and replace with autopilot-altitude (#784)
Change gps-rescue-throttle-pid to ap-altitude
1 parent d5bd7a7 commit 16bf517

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

src/flightlog_fielddefs.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,9 @@ export function adjustFieldDefsList(firmwareType, firmwareVersion) {
526526
if (semver.lt(firmwareVersion, "4.6.0")) {
527527
DEBUG_MODE.splice(DEBUG_MODE.indexOf("D_MAX"), 1, "D_MIN");
528528
}
529+
if (semver.gte(firmwareVersion, "4.6.0")) {
530+
DEBUG_MODE.splice(DEBUG_MODE.indexOf('GPS_RESCUE_THROTTLE_PID'), 1, 'AUTOPILOT_ALTITUDE');
531+
}
529532

530533
DEBUG_MODE = makeReadOnly(DEBUG_MODE);
531534

src/flightlog_fields_presenter.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,17 +1307,26 @@ FlightLogFieldPresenter.adjustDebugDefsList = function (
13071307
'debug[6]':'Notch 6 Center Freq [dbg-axis]',
13081308
'debug[7]':'Notch 7 Center Freq [dbg-axis]',
13091309
};
1310+
DEBUG_FRIENDLY_FIELD_NAMES.AUTOPILOT_ALTITUDE = {
1311+
'debug[all]': 'Autopilot Altitude',
1312+
'debug[0]': 'Autopilot Throttle',
1313+
'debug[1]': 'Tilt Multiplier',
1314+
'debug[2]': 'Zero Altitude cm',
1315+
'debug[3]': 'Altitude cm',
1316+
'debug[4]': 'Altitude P',
1317+
'debug[5]': 'Altitude I',
1318+
'debug[6]': 'Altitude D',
1319+
'debug[7]': 'Altitude F',
1320+
};
13101321
}
13111322
}
13121323
};
13131324

13141325
FlightLogFieldPresenter.presentFlags = function (flags, flagNames) {
13151326
let printedFlag = false,
1316-
i,
1327+
i = 0,
13171328
result = "";
13181329

1319-
i = 0;
1320-
13211330
while (flags > 0) {
13221331
if ((flags & 1) != 0) {
13231332
if (printedFlag) {

0 commit comments

Comments
 (0)