Skip to content

Commit be22a79

Browse files
authored
Merge pull request #597 from ctzsnooze/fix-field-defs-and-graphs-for-GPS-Rescue-4.4
update fields and graphs for GPS Rescue 4.4
2 parents b532dab + ff372ba commit be22a79

File tree

3 files changed

+53
-16
lines changed

3 files changed

+53
-16
lines changed

js/flightlog_fielddefs.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,16 @@ var
337337
"D_LPF",
338338
"VTX_TRAMP",
339339
"GHST",
340+
"GHST_MSP",
340341
"SCHEDULER_DETERMINISM",
341342
"TIMING_ACCURACY",
342343
"RX_EXPRESSLRS_SPI",
343344
"RX_EXPRESSLRS_PHASELOCK",
345+
"RX_STATE_TIME",
346+
"GPS_RESCUE_VELOCITY",
347+
"GPS_RESCUE_HEADING",
348+
"GPS_RESCUE_TRACKING",
349+
"ATTITUDE",
344350
]),
345351

346352
SUPER_EXPO_YAW = makeReadOnly([

js/flightlog_fields_presenter.js

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,13 @@ function FlightLogFieldPresenter() {
598598
'debug[2]':'RSSI',
599599
'debug[3]':'Link Quality',
600600
},
601+
'GHST_MSP' : {
602+
'debug[all]':'Ghost MSP',
603+
'debug[0]':'MSP Frame Count',
604+
'debug[1]':'MSP Frame Counter',
605+
'debug[2]':'Not used',
606+
'debug[3]':'Not used',
607+
},
601608
'SCHEDULER_DETERMINISM' : {
602609
'debug[all]':'Scheduler Determinism',
603610
'debug[0]':'Cycle Start time',
@@ -626,6 +633,13 @@ function FlightLogFieldPresenter() {
626633
'debug[2]':'Frequency Offset',
627634
'debug[3]':'Phase Shift',
628635
},
636+
'RX_STATE_TIME' : {
637+
'debug[all]':'Rx State Time',
638+
'debug[0]':'Time 0',
639+
'debug[1]':'Time 1',
640+
'debug[2]':'Time 2',
641+
'debug[3]':'Time 3',
642+
},
629643
'GPS_RESCUE_VELOCITY' : {
630644
'debug[all]':'GPS Rescue Velocity',
631645
'debug[0]':'Velocity P',
@@ -635,9 +649,9 @@ function FlightLogFieldPresenter() {
635649
},
636650
'GPS_RESCUE_HEADING' : {
637651
'debug[all]':'GPS Rescue Heading',
638-
'debug[0]':'Rescue Yaw',
639-
'debug[1]':'Rescue Roll',
640-
'debug[2]':'Attitude',
652+
'debug[0]':'Ground speed',
653+
'debug[1]':'GPS Heading',
654+
'debug[2]':'IMU Attitude',
641655
'debug[3]':'Angle to home',
642656
},
643657
'GPS_RESCUE_TRACKING' : {
@@ -647,6 +661,13 @@ function FlightLogFieldPresenter() {
647661
'debug[2]':'Altitude',
648662
'debug[3]':'Target altitude',
649663
},
664+
'ATTITUDE' : {
665+
'debug[all]':'Attitude',
666+
'debug[0]':'accADC X',
667+
'debug[1]':'accADC Y',
668+
'debug[2]':'Setpoint Roll',
669+
'debug[3]':'Setpoint Pitch',
670+
},
650671
};
651672

652673
let DEBUG_FRIENDLY_FIELD_NAMES = null;
@@ -1130,6 +1151,14 @@ function FlightLogFieldPresenter() {
11301151
default:
11311152
return value.toFixed(0);
11321153
}
1154+
case 'GHST_MSP':
1155+
switch (fieldName) {
1156+
// debug 0 is msp frame count
1157+
// debug 1 is msp frame count
1158+
// debug 2 and 3 not used
1159+
default:
1160+
return value.toFixed(0);
1161+
}
11331162
case 'SCHEDULER_DETERMINISM':
11341163
switch (fieldName) {
11351164
case 'debug[0]': // cycle time in us*10
@@ -1193,10 +1222,9 @@ function FlightLogFieldPresenter() {
11931222
}
11941223
case 'GPS_RESCUE_HEADING':
11951224
switch (fieldName) {
1196-
case 'debug[0]': // Rescue yaw rate deg/s * 10 up to +/- 90
1197-
return (value / 10).toFixed(1) + 'deg/s';
1198-
case 'debug[1]': // Rescue roll deg * 100 up to +/- 20 deg
1199-
return (value / 100).toFixed(1) + 'deg';
1225+
case 'debug[0]': // Ground speed cm/s
1226+
return (value / 100).toFixed(2) + 'm/s';
1227+
case 'debug[1]': // GPS Ground course degrees * 10
12001228
case 'debug[2]': // Attitude in degrees * 10
12011229
case 'debug[3]': // Angle to home in degrees * 10
12021230
return (value / 10).toFixed(1) + 'deg';
@@ -1214,6 +1242,15 @@ function FlightLogFieldPresenter() {
12141242
default:
12151243
return value.toFixed(0);
12161244
}
1245+
case 'ATTITUDE:
1246+
switch (fieldName) {
1247+
case 'debug[0]': // accADC X
1248+
case 'debug[1]': // accADC Y
1249+
case 'debug[2]': // setpoint Roll
1250+
case 'debug[3]': // setpoint Pitch
1251+
default:
1252+
return value.toFixed(0);
1253+
}
12171254
}
12181255
return value.toFixed(0);
12191256
}

js/graph_config.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -781,20 +781,14 @@ GraphConfig.load = function(config) {
781781
}
782782
case 'GPS_RESCUE_HEADING':
783783
switch (fieldName) {
784-
case 'debug[0]': // Rescue yaw rate deg/s * 10 up to +/- 90
785-
return {
786-
offset: 0,
787-
power: 1.0,
788-
inputRange: 1000,
789-
outputRange: 1.0,
790-
};
791-
case 'debug[1]': // Rescue roll deg * 100 up to +/- 20 deg
784+
case 'debug[0]': // Groundspeed cm/s
792785
return {
793786
offset: 0,
794787
power: 1.0,
795788
inputRange: 10000,
796789
outputRange: 1.0,
797790
};
791+
case 'debug[1]': // GPS GroundCourse
798792
case 'debug[2]': // Yaw attitude * 10
799793
case 'debug[3]': // Angle to home * 10
800794
return {
@@ -840,7 +834,7 @@ GraphConfig.load = function(config) {
840834
return {
841835
offset: 0,
842836
power: 1.0,
843-
inputRange: 500,
837+
inputRange: 1000,
844838
outputRange: 1.0,
845839
};
846840
case 'debug[2]': // altitude m

0 commit comments

Comments
 (0)