Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/flightlog_fielddefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,12 @@ export function adjustFieldDefsList(firmwareType, firmwareVersion) {
DEBUG_MODE.push('WING_SETPOINT');
DEBUG_MODE.push('AUTOPILOT_POSITION');
}
if (semver.gte(firmwareVersion, "4.6.0")) {
//rename DUAL_GYRO_ to MULTI_GYRO
DEBUG_MODE.splice(DEBUG_MODE.indexOf("DUAL_GYRO_RAW"), 1, "MULTI_GYRO_RAW");
DEBUG_MODE.splice(DEBUG_MODE.indexOf("DUAL_GYRO_DIFF"), 1, "MULTI_GYRO_DIFF");
DEBUG_MODE.splice(DEBUG_MODE.indexOf("DUAL_GYRO_SCALED"), 1, "MULTI_GYRO_SCALED");
}

ACC_HARDWARE = makeReadOnly(ACC_HARDWARE);
DEBUG_MODE = makeReadOnly(DEBUG_MODE);
Expand Down
39 changes: 39 additions & 0 deletions src/flightlog_fields_presenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -1397,6 +1397,39 @@ FlightLogFieldPresenter.adjustDebugDefsList = function (
'debug[4]': 'Processed flow rates Y',
'debug[5]': 'Delta time',
};
DEBUG_FRIENDLY_FIELD_NAMES.MULTI_GYRO_RAW = {
'debug[all]': 'Debug Multi Gyro Raw',
'debug[0]': 'Gyro 1 Raw [roll]',
'debug[1]': 'Gyro 1 Raw [pitch]',
'debug[2]': 'Gyro 2 Raw [roll]',
'debug[3]': 'Gyro 2 Raw [pitch]',
'debug[4]': 'Gyro 3 Raw [roll]',
'debug[5]': 'Gyro 3 Raw [pitch]',
'debug[6]': 'Gyro 4 Raw [roll]',
'debug[7]': 'Gyro 4 Raw [pitch]',
};
DEBUG_FRIENDLY_FIELD_NAMES.MULTI_GYRO_DIFF = {
'debug[all]': 'Debug Multi Gyro Diff',
'debug[0]': 'Gyro 1 Diff [roll]',
'debug[1]': 'Gyro 1 Diff [pitch]',
'debug[2]': 'Gyro 2 Diff [roll]',
'debug[3]': 'Gyro 2 Diff [pitch]',
'debug[4]': 'Gyro 3 Diff [roll]',
'debug[5]': 'Gyro 3 Diff [pitch]',
'debug[6]': 'Gyro 4 Diff [roll]',
'debug[7]': 'Gyro 4 Diff [pitch]',
};
DEBUG_FRIENDLY_FIELD_NAMES.MULTI_GYRO_SCALED = {
'debug[all]': 'Multi Gyro Scaled',
'debug[0]': 'Gyro 1 [roll]',
'debug[1]': 'Gyro 1 [pitch]',
'debug[2]': 'Gyro 2 [roll]',
'debug[3]': 'Gyro 2 [pitch]',
'debug[4]': 'Gyro 3 [roll]',
'debug[5]': 'Gyro 3 [pitch]',
'debug[6]': 'Gyro 4 [roll]',
'debug[7]': 'Gyro 4 [pitch]',
};
DEBUG_FRIENDLY_FIELD_NAMES.AUTOPILOT_POSITION = {
'debug[all]': 'Autopilot Position',
'debug[0]': 'Distance',
Expand Down Expand Up @@ -1840,6 +1873,9 @@ FlightLogFieldPresenter.decodeDebugFieldToFriendly = function (
case "DUAL_GYRO_COMBINED":
case "DUAL_GYRO_DIFF":
case "DUAL_GYRO_RAW":
case "MULTI_GYRO_DIFF":
case "MULTI_GYRO_RAW":
case "MULTI_GYRO_SCALED":
case "NOTCH":
case "GYRO_SAMPLE":
return `${Math.round(flightLog.gyroRawToDegreesPerSecond(value))} °/s`;
Expand Down Expand Up @@ -2538,6 +2574,9 @@ FlightLogFieldPresenter.ConvertDebugFieldValue = function (
case "DUAL_GYRO_COMBINED":
case "DUAL_GYRO_DIFF":
case "DUAL_GYRO_RAW":
case "MULTI_GYRO_DIFF":
case "MULTI_GYRO_RAW":
case "MULTI_GYRO_SCALED":
case "NOTCH":
case "GYRO_SAMPLE":
return toFriendly
Expand Down
6 changes: 6 additions & 0 deletions src/flightlog_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,12 @@ export function FlightLogParser(logData) {
chirp_frequency_start_deci_hz : "chirp_frequency_start_deci_hz",
chirp_frequency_end_deci_hz : "chirp_frequency_end_deci_hz",
chirp_time_seconds : "chirp_time_seconds",
// MULTI_GYRO to DUAL_GYRO debug mode aliases
multi_gyro: "dual_gyro",
multi_gyro_raw: "dual_gyro_raw",
multi_gyro_combined: "dual_gyro_combined",
multi_gyro_diff: "dual_gyro_diff",
multi_gyro_scaled: "dual_gyro_scaled",
},
frameTypes,
// Blackbox state:
Expand Down