Skip to content

Commit f98c2ee

Browse files
committed
feat: rename DUAL_GYRO debug modes to MULTI_GYRO
- Renamed all DUAL_GYRO_* entries to MULTI_GYRO_* in field definitions - Updated field presentations and graph config to use new names - Maintains backward compatibility via existing translation aliases
1 parent 9b40aef commit f98c2ee

File tree

3 files changed

+13
-90
lines changed

3 files changed

+13
-90
lines changed

src/flightlog_fielddefs.js

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -283,14 +283,10 @@ export const DEBUG_MODE_COMPLETE = makeReadOnly([
283283
"FFT_FREQ",
284284
"RX_FRSKY_SPI",
285285
"GYRO_RAW", // deprecated
286-
"DUAL_GYRO", // deprecated
287-
"DUAL_GYRO_RAW",
288-
"DUAL_GYRO_COMBINED", // deprecated
289-
"DUAL_GYRO_DIFF",
290-
"MULTI_GYRO", // replaces DUAL_GYRO
291-
"MULTI_GYRO_RAW",
292-
"MULTI_GYRO_COMBINED", // replaces DUAL_GYRO_COMBINED
293-
"MULTI_GYRO_DIFF",
286+
"MULTI_GYRO", // was DUAL_GYRO
287+
"MULTI_GYRO_RAW", // was DUAL_GYRO_RAW
288+
"MULTI_GYRO_COMBINED", // was DUAL_GYRO_COMBINED
289+
"MULTI_GYRO_DIFF", // was DUAL_GYRO_DIFF
294290
"MAX7456_SIGNAL",
295291
"MAX7456_SPICLOCK",
296292
"SBUS",
@@ -318,8 +314,7 @@ export const DEBUG_MODE_COMPLETE = makeReadOnly([
318314
"D_MAX",
319315
"AC_CORRECTION",
320316
"AC_ERROR",
321-
"DUAL_GYRO_SCALED",
322-
"MULTI_GYRO_SCALED", // replaces DUAL_GYRO_SCALED
317+
"MULTI_GYRO_SCALED", // was DUAL_GYRO_SCALED
323318
"DSHOT_RPM_ERRORS",
324319
"CRSF_LINK_STATISTICS_UPLINK",
325320
"CRSF_LINK_STATISTICS_PWR",
@@ -527,8 +522,8 @@ export function adjustFieldDefsList(firmwareType, firmwareVersion) {
527522
DEBUG_MODE.splice(DEBUG_MODE.indexOf("GYRO_RAW"), 0, "RX_SFHSS_SPI");
528523
}
529524
if (semver.gte(firmwareVersion, "4.1.0")) {
530-
DEBUG_MODE.splice(DEBUG_MODE.indexOf("DUAL_GYRO"), 1);
531-
DEBUG_MODE.splice(DEBUG_MODE.indexOf("DUAL_GYRO_COMBINED"), 1);
525+
DEBUG_MODE.splice(DEBUG_MODE.indexOf("MULTI_GYRO"), 1);
526+
DEBUG_MODE.splice(DEBUG_MODE.indexOf("MULTI_GYRO_COMBINED"), 1);
532527
}
533528
if (semver.gte(firmwareVersion, "4.3.0")) {
534529
DEBUG_MODE.splice(DEBUG_MODE.indexOf("FF_INTERPOLATED"), 1, "FEEDFORWARD");
@@ -611,7 +606,7 @@ export function adjustFieldDefsList(firmwareType, firmwareVersion) {
611606
);
612607
}
613608
}
614-
609+
615610
FLIGHT_LOG_FLIGHT_MODE_NAME = makeReadOnly(FLIGHT_LOG_FLIGHT_MODE_NAME);
616611
} else {
617612
DEBUG_MODE = DEBUG_MODE_COMPLETE;

src/flightlog_fields_presenter.js

Lines changed: 5 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -414,19 +414,8 @@ const DEBUG_FRIENDLY_FIELD_NAMES_INITIAL = {
414414
"debug[6]": "Not Used",
415415
"debug[7]": "Not Used",
416416
},
417-
DUAL_GYRO: {
418-
"debug[all]": "Debug Dual Gyro",
419-
"debug[0]": "Gyro 1 Filtered [roll]",
420-
"debug[1]": "Gyro 1 Filtered [pitch]",
421-
"debug[2]": "Gyro 2 Filtered [roll]",
422-
"debug[3]": "Gyro 2 Filtered [pitch]",
423-
"debug[4]": "Not Used",
424-
"debug[5]": "Not Used",
425-
"debug[6]": "Not Used",
426-
"debug[7]": "Not Used",
427-
},
428417
MULTI_GYRO: {
429-
"debug[all]": "Debug Multi Gyro",
418+
"debug[all]": "Debug Dual Gyro",
430419
"debug[0]": "Gyro 1 Filtered [roll]",
431420
"debug[1]": "Gyro 1 Filtered [pitch]",
432421
"debug[2]": "Gyro 2 Filtered [roll]",
@@ -436,19 +425,8 @@ const DEBUG_FRIENDLY_FIELD_NAMES_INITIAL = {
436425
"debug[6]": "Not Used",
437426
"debug[7]": "Not Used",
438427
},
439-
DUAL_GYRO_RAW: {
440-
"debug[all]": "Debug Dual Gyro Raw",
441-
"debug[0]": "Gyro 1 Raw [roll]",
442-
"debug[1]": "Gyro 1 Raw [pitch]",
443-
"debug[2]": "Gyro 2 Raw [roll]",
444-
"debug[3]": "Gyro 2 Raw [pitch]",
445-
"debug[4]": "Not Used",
446-
"debug[5]": "Not Used",
447-
"debug[6]": "Not Used",
448-
"debug[7]": "Not Used",
449-
},
450428
MULTI_GYRO_RAW: {
451-
"debug[all]": "Debug Multi Gyro Raw",
429+
"debug[all]": "Debug Dual Gyro Raw",
452430
"debug[0]": "Gyro 1 Raw [roll]",
453431
"debug[1]": "Gyro 1 Raw [pitch]",
454432
"debug[2]": "Gyro 2 Raw [roll]",
@@ -458,19 +436,8 @@ const DEBUG_FRIENDLY_FIELD_NAMES_INITIAL = {
458436
"debug[6]": "Not Used",
459437
"debug[7]": "Not Used",
460438
},
461-
DUAL_GYRO_COMBINED: {
462-
"debug[all]": "Debug Dual Combined",
463-
"debug[0]": "Not Used",
464-
"debug[1]": "Gyro Filtered [roll]",
465-
"debug[2]": "Gyro Filtered [pitch]",
466-
"debug[3]": "Not Used",
467-
"debug[4]": "Not Used",
468-
"debug[5]": "Not Used",
469-
"debug[6]": "Not Used",
470-
"debug[7]": "Not Used",
471-
},
472439
MULTI_GYRO_COMBINED: {
473-
"debug[all]": "Debug Multi Combined",
440+
"debug[all]": "Debug Dual Combined",
474441
"debug[0]": "Not Used",
475442
"debug[1]": "Gyro Filtered [roll]",
476443
"debug[2]": "Gyro Filtered [pitch]",
@@ -480,19 +447,8 @@ const DEBUG_FRIENDLY_FIELD_NAMES_INITIAL = {
480447
"debug[6]": "Not Used",
481448
"debug[7]": "Not Used",
482449
},
483-
DUAL_GYRO_DIFF: {
484-
"debug[all]": "Debug Dual Gyro Diff",
485-
"debug[0]": "Gyro Diff [roll]",
486-
"debug[1]": "Gyro Diff [pitch]",
487-
"debug[2]": "Gyro Diff [yaw]",
488-
"debug[3]": "Not Used",
489-
"debug[4]": "Not Used",
490-
"debug[5]": "Not Used",
491-
"debug[6]": "Not Used",
492-
"debug[7]": "Not Used",
493-
},
494450
MULTI_GYRO_DIFF: {
495-
"debug[all]": "Debug Multi Gyro Diff",
451+
"debug[all]": "Debug Dual Gyro Diff",
496452
"debug[0]": "Gyro Diff [roll]",
497453
"debug[1]": "Gyro Diff [pitch]",
498454
"debug[2]": "Gyro Diff [yaw]",
@@ -777,19 +733,8 @@ const DEBUG_FRIENDLY_FIELD_NAMES_INITIAL = {
777733
"debug[6]": "Not Used",
778734
"debug[7]": "Not Used",
779735
},
780-
DUAL_GYRO_SCALED: {
781-
"debug[all]": "Dual Gyro Scaled",
782-
"debug[0]": "Gyro 1 [roll]",
783-
"debug[1]": "Gyro 1 [pitch]",
784-
"debug[2]": "Gyro 2 [roll]",
785-
"debug[3]": "Gyro 2 [pitch]",
786-
"debug[4]": "Not Used",
787-
"debug[5]": "Not Used",
788-
"debug[6]": "Not Used",
789-
"debug[7]": "Not Used",
790-
},
791736
MULTI_GYRO_SCALED: {
792-
"debug[all]": "Multi Gyro Scaled",
737+
"debug[all]": "Dual Gyro Scaled",
793738
"debug[0]": "Gyro 1 [roll]",
794739
"debug[1]": "Gyro 1 [pitch]",
795740
"debug[2]": "Gyro 2 [roll]",
@@ -1891,16 +1836,10 @@ FlightLogFieldPresenter.decodeDebugFieldToFriendly = function (
18911836
case "GYRO":
18921837
case "GYRO_FILTERED":
18931838
case "GYRO_SCALED":
1894-
case "DUAL_GYRO":
1895-
case "DUAL_GYRO_COMBINED":
1896-
case "DUAL_GYRO_DIFF":
1897-
case "DUAL_GYRO_RAW":
1898-
case "DUAL_GYRO_SCALED":
18991839
case "MULTI_GYRO":
19001840
case "MULTI_GYRO_COMBINED":
19011841
case "MULTI_GYRO_DIFF":
19021842
case "MULTI_GYRO_RAW":
1903-
case "MULTI_GYRO_SCALED":
19041843
case "NOTCH":
19051844
case "GYRO_SAMPLE":
19061845
return `${Math.round(flightLog.gyroRawToDegreesPerSecond(value))} °/s`;
@@ -2595,16 +2534,10 @@ FlightLogFieldPresenter.ConvertDebugFieldValue = function (
25952534
case "GYRO":
25962535
case "GYRO_FILTERED":
25972536
case "GYRO_SCALED":
2598-
case "DUAL_GYRO":
2599-
case "DUAL_GYRO_COMBINED":
2600-
case "DUAL_GYRO_DIFF":
2601-
case "DUAL_GYRO_RAW":
2602-
case "DUAL_GYRO_SCALED":
26032537
case "MULTI_GYRO":
26042538
case "MULTI_GYRO_COMBINED":
26052539
case "MULTI_GYRO_DIFF":
26062540
case "MULTI_GYRO_RAW":
2607-
case "MULTI_GYRO_SCALED":
26082541
case "NOTCH":
26092542
case "GYRO_SAMPLE":
26102543
return toFriendly

src/graph_config.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -517,11 +517,6 @@ GraphConfig.getDefaultCurveForField = function (flightLog, fieldName) {
517517
case "GYRO":
518518
case "GYRO_FILTERED":
519519
case "GYRO_SCALED":
520-
case "DUAL_GYRO":
521-
case "DUAL_GYRO_COMBINED":
522-
case "DUAL_GYRO_DIFF":
523-
case "DUAL_GYRO_RAW":
524-
case "DUAL_GYRO_SCALED":
525520
case "MULTI_GYRO":
526521
case "MULTI_GYRO_COMBINED":
527522
case "MULTI_GYRO_DIFF":

0 commit comments

Comments
 (0)