Skip to content

Commit 1fa7f45

Browse files
committed
display newer debug names, update DOP graphics
1 parent 6b80c9f commit 1fa7f45

File tree

4 files changed

+33
-30
lines changed

4 files changed

+33
-30
lines changed

js/flightlog_fielddefs.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ let
348348
"GPS_RESCUE_TRACKING",
349349
"ATTITUDE",
350350
"VTX_MSP",
351+
"GPS_DOP",
351352
]),
352353

353354
SUPER_EXPO_YAW = makeReadOnly([
@@ -545,20 +546,7 @@ function adjustFieldDefsList(firmwareType, firmwareVersion) {
545546
DEBUG_MODE.splice(DEBUG_MODE.indexOf('FF_INTERPOLATED'), 1);
546547
}
547548
if (semver.gte(firmwareVersion, '4.3.0')) {
548-
DEBUG_MODE.splice(DEBUG_MODE.indexOf('FF_INTERPOLATED'), 1, 'FEEDFORWARD');
549-
DEBUG_MODE.splice(DEBUG_MODE.indexOf('FF_LIMIT'), 1, 'FEEDFORWARD_LIMIT');
550-
DEBUG_MODE.splice(DEBUG_MODE.indexOf('DYN_IDLE'), 1);
551-
DEBUG_MODE.splice(DEBUG_MODE.indexOf('FFT'), 1);
552-
DEBUG_MODE.splice(DEBUG_MODE.indexOf('FFT_TIME'), 1);
553-
DEBUG_MODE.splice(DEBUG_MODE.indexOf('FFT_FREQ'), 1);
554-
DEBUG_MODE.splice(DEBUG_MODE.indexOf('GPS_RESCUE_THROTTLE_PID'), 1);
555-
}
556-
if (semver.gte(firmwareVersion, '4.4.0')) {
557-
DEBUG_MODE.splice(DEBUG_MODE.indexOf('BARO'), 1);
558-
DEBUG_MODE.splice(DEBUG_MODE.indexOf('RTH'), 1);
559-
DEBUG_MODE.splice(DEBUG_MODE.indexOf('GPS_RESCUE_THROTTLE_PID'), 1);
560-
DEBUG_MODE.splice(DEBUG_MODE.indexOf('VTX_MSP'), 1);
561-
DEBUG_MODE.splice(DEBUG_MODE.indexOf('GPS_DOP'), 1);
549+
DEBUG_MODE.splice(DEBUG_MODE.indexOf('FF_LIMIT'), 1, 'FEEDFORWARD_LIMIT', 'FEEDFORWARD');
562550
}
563551

564552
DEBUG_MODE = makeReadOnly(DEBUG_MODE);

js/flightlog_fields_presenter.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,20 @@ function FlightLogFieldPresenter() {
669669
'debug[2]':'Setpoint Roll',
670670
'debug[3]':'Setpoint Pitch',
671671
},
672+
'VTX_MSP' : {
673+
'debug[all]': 'VTX MSP',
674+
'debug[0]': 'packetCounter',
675+
'debug[1]': 'isCrsfPortConfig',
676+
'debug[2]': 'isLowPowerDisarmed',
677+
'debug[3]': 'mspTelemetryDescriptor',
678+
},
679+
'GPS_DOP' : {
680+
'debug[all]': 'GPS Dilution of Precision',
681+
'debug[0]': 'Number of Satellites',
682+
'debug[1]': 'pDOP (positional - 3D)',
683+
'debug[2]': 'hDOP (horizontal - 2D)',
684+
'debug[3]': 'vDOP (vertical - 1D)',
685+
},
672686
};
673687

674688
let DEBUG_FRIENDLY_FIELD_NAMES = null;
@@ -700,20 +714,6 @@ function FlightLogFieldPresenter() {
700714
'debug[2]':'Altitude',
701715
'debug[3]':'Target altitude',
702716
};
703-
DEBUG_FRIENDLY_FIELD_NAMES.VTX_MSP = {
704-
'debug[all]': 'VTX MSP',
705-
'debug[0]': 'packetCounter',
706-
'debug[1]': 'isCrsfPortConfig',
707-
'debug[2]': 'isLowPowerDisarmed',
708-
'debug[3]': 'mspTelemetryDescriptor',
709-
};
710-
DEBUG_FRIENDLY_FIELD_NAMES.GPS_DOP = {
711-
'debug[all]': 'GPS Dilution of Precision',
712-
'debug[0]': 'Number of Satellites',
713-
'debug[1]': 'pDOP (positional - 3D)',
714-
'debug[2]': 'hDOP (horizontal - 2D)',
715-
'debug[3]': 'vDOP (vertical - 1D)',
716-
};
717717
} else if (semver.gte(firmwareVersion, '4.3.0')) {
718718
DEBUG_FRIENDLY_FIELD_NAMES.FEEDFORWARD = {
719719
'debug[all]':'Feedforward [roll]',
@@ -1307,7 +1307,7 @@ function FlightLogFieldPresenter() {
13071307
case 'debug[2]': // hDOP (horizontal - 2D)
13081308
case 'debug[3]': // vDOP (vertical - 1D)
13091309
default:
1310-
return (value / 100).toFixed(1);
1310+
return (value / 100).toFixed(2);
13111311
}
13121312
}
13131313
return value.toFixed(0);

js/graph_config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,21 @@ GraphConfig.load = function(config) {
894894
default:
895895
return getCurveForMinMaxFields(fieldName);
896896
}
897+
case 'GPS_DOP':
898+
switch (fieldName) {
899+
case 'debug[0]': // Number of Satellites (now this is in normal GPS data, maybe gpsTrust?)
900+
case 'debug[1]': // pDOP
901+
case 'debug[2]': // hDOP
902+
case 'debug[3]': // vDOP
903+
return {
904+
offset: 0,
905+
power: 1.0,
906+
inputRange: 200 ,
907+
outputRange: 1.0,
908+
};
909+
default:
910+
return getCurveForMinMaxFields(fieldName);
911+
}
897912
}
898913
}
899914
// if not found above then

js/grapher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ function FlightLogGrapher(flightLog, graphConfig, canvas, stickCanvas, craftCanv
232232
idents.vbatField = fieldIndex;
233233
idents.numCells = flightLog.getNumCellsEstimate();
234234
break;
235-
case "BaroAlt":
235+
case "baroAlt":
236236
idents.baroField = fieldIndex;
237237
break;
238238
case "roll":

0 commit comments

Comments
 (0)