Skip to content

Commit 07fc1d1

Browse files
authored
Add missing GPS Rescue Throttle PID debug fields (#859)
* Add GPS Rescue debug fields * Further updates
1 parent c9e1863 commit 07fc1d1

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

src/flightlog_fields_presenter.js

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@ FlightLogFieldPresenter.adjustDebugDefsList = function (
12521252
"debug[7]": "Not Used",
12531253
};
12541254
DEBUG_FRIENDLY_FIELD_NAMES.GPS_RESCUE_THROTTLE_PID = {
1255-
"debug[all]": "GPS Rescue Altitude",
1255+
"debug[all]": "GPS Rescue Throttle PID",
12561256
"debug[0]": "Throttle P",
12571257
"debug[1]": "Throttle D",
12581258
"debug[2]": "Altitude",
@@ -1287,17 +1287,6 @@ FlightLogFieldPresenter.adjustDebugDefsList = function (
12871287
"debug[6]": "Not Used",
12881288
"debug[7]": "Not Used",
12891289
};
1290-
DEBUG_FRIENDLY_FIELD_NAMES.GPS_RESCUE_THROTTLE_PID = {
1291-
"debug[all]": "GPS Rescue throttle PIDs",
1292-
"debug[0]": "Throttle P",
1293-
"debug[1]": "Throttle D",
1294-
"debug[2]": "Altitude",
1295-
"debug[3]": "Target altitude",
1296-
"debug[4]": "Not Used",
1297-
"debug[5]": "Not Used",
1298-
"debug[6]": "Not Used",
1299-
"debug[7]": "Not Used",
1300-
};
13011290
}
13021291

13031292
if (semver.gte(firmwareVersion, '4.5.0')) {
@@ -1312,6 +1301,17 @@ FlightLogFieldPresenter.adjustDebugDefsList = function (
13121301
"debug[6]": "Pitch forward angle",
13131302
"debug[7]": "dcmKp gain",
13141303
};
1304+
DEBUG_FRIENDLY_FIELD_NAMES.GPS_RESCUE_THROTTLE_PID = {
1305+
"debug[all]": "GPS Rescue throttle PID",
1306+
"debug[0]": "Throttle P",
1307+
"debug[1]": "Throttle D",
1308+
"debug[2]": "Altitude",
1309+
"debug[3]": "Target altitude",
1310+
"debug[4]": "Throttle I",
1311+
"debug[5]": "Tilt adjustment",
1312+
"debug[6]": "Throttle D before lp smoothing",
1313+
"debug[7]": "Throttle adjustment",
1314+
};
13151315
}
13161316

13171317
if (semver.gte(firmwareVersion, '2025.12.0')) {
@@ -2152,7 +2152,9 @@ FlightLogFieldPresenter.decodeDebugFieldToFriendly = function (
21522152
case "GPS_RESCUE_THROTTLE_PID":
21532153
switch (fieldName) {
21542154
case "debug[0]": // Throttle P added uS
2155-
case "debug[1]": // Throttle D added * uS
2155+
case "debug[1]": // Throttle D added uS
2156+
case "debug[4]": // Throttle I added uS
2157+
case "debug[6]": // Throttle D before lp smoothing uS
21562158
return `${value.toFixed(0)} uS`;
21572159
case "debug[2]": // current altitude in m
21582160
case "debug[3]": // TARGET altitude in m
@@ -2901,6 +2903,8 @@ FlightLogFieldPresenter.ConvertDebugFieldValue = function (
29012903
switch (fieldName) {
29022904
case "debug[0]": // Throttle P added uS
29032905
case "debug[1]": // Throttle D added * uS
2906+
case "debug[4]": // Throttle I added uS
2907+
case "debug[6]": // Throttle D before lp smoothing uS
29042908
return value; // ' uS';
29052909
case "debug[2]": // current altitude in m
29062910
case "debug[3]": // TARGET altitude in m

0 commit comments

Comments
 (0)