@@ -626,6 +626,27 @@ function FlightLogFieldPresenter() {
626626 'debug[2]' :'Frequency Offset' ,
627627 'debug[3]' :'Phase Shift' ,
628628 } ,
629+ 'GPS_RESCUE_VELOCITY' : {
630+ 'debug[all]' :'GPS Rescue Velocity' ,
631+ 'debug[0]' :'Velocity P' ,
632+ 'debug[1]' :'Velocity D' ,
633+ 'debug[2]' :'Velocity to Home' ,
634+ 'debug[3]' :'Target Velocity' ,
635+ } ,
636+ 'GPS_RESCUE_HEADING' : {
637+ 'debug[all]' :'GPS Rescue Heading' ,
638+ 'debug[0]' :'Rescue Yaw' ,
639+ 'debug[1]' :'Rescue Roll' ,
640+ 'debug[2]' :'Attitude' ,
641+ 'debug[3]' :'Angle to home' ,
642+ } ,
643+ 'GPS_RESCUE_TRACKING' : {
644+ 'debug[all]' :'GPS Rescue Tracking' ,
645+ 'debug[0]' :'Velocity to home' ,
646+ 'debug[1]' :'Target velocity' ,
647+ 'debug[2]' :'Altitude' ,
648+ 'debug[3]' :'Target altitude' ,
649+ } ,
629650 } ;
630651
631652 let DEBUG_FRIENDLY_FIELD_NAMES = null ;
@@ -635,7 +656,15 @@ function FlightLogFieldPresenter() {
635656 DEBUG_FRIENDLY_FIELD_NAMES = { ...DEBUG_FRIENDLY_FIELD_NAMES_INITIAL } ;
636657
637658 if ( firmwareType === FIRMWARE_TYPE_BETAFLIGHT ) {
638- if ( semver . gte ( firmwareVersion , '4.3.0' ) ) {
659+ if ( semver . gte ( firmwareVersion , '4.4.0' ) ) {
660+ DEBUG_FRIENDLY_FIELD_NAMES . RTH = {
661+ 'debug[all]' :'RTH Rescue codes' ,
662+ 'debug[0]' :'Pitch angle, deg' ,
663+ 'debug[1]' :'Rescue Phase' ,
664+ 'debug[2]' :'Failure code' ,
665+ 'debug[3]' :'Failure timers' ,
666+ } ;
667+ } else if ( semver . gte ( firmwareVersion , '4.3.0' ) ) {
639668 DEBUG_FRIENDLY_FIELD_NAMES . FEEDFORWARD = {
640669 'debug[all]' :'Feedforward [roll]' ,
641670 'debug[0]' :'Setpoint, un-smoothed [roll]' ,
@@ -678,6 +707,13 @@ function FlightLogFieldPresenter() {
678707 'debug[2]' :'Notch 3 Center Freq [dbg-axis]' ,
679708 'debug[3]' :'Gyro Pre Dyn Notch [dbg-axis]' ,
680709 } ;
710+ DEBUG_FRIENDLY_FIELD_NAMES . GPS_RESCUE_THROTTLE_PID = {
711+ 'debug[all]' :'GPS Rescue Altitude' ,
712+ 'debug[0]' :'Throttle P' ,
713+ 'debug[1]' :'Throttle D' ,
714+ 'debug[2]' :'Altitude' ,
715+ 'debug[3]' :'Target Altitude' ,
716+ } ;
681717 } else if ( semver . gte ( firmwareVersion , '4.2.0' ) ) {
682718 DEBUG_FRIENDLY_FIELD_NAMES . FF_INTERPOLATED = {
683719 'debug[all]' :'Feedforward [roll]' ,
@@ -1002,7 +1038,7 @@ function FlightLogFieldPresenter() {
10021038 }
10031039 case 'RTH' :
10041040 switch ( fieldName ) {
1005- case 'debug[1 ]' :
1041+ case 'debug[0 ]' : // pitch angle +/-4000 means +/- 40 deg
10061042 return ( value / 100 ) . toFixed ( 1 ) + 'deg' ;
10071043 default :
10081044 return value . toFixed ( 0 ) ;
@@ -1058,8 +1094,6 @@ function FlightLogFieldPresenter() {
10581094 default :
10591095 return value . toFixed ( 0 ) + "Hz" ;
10601096 }
1061- case 'GPS_RESCUE_THROTTLE_PID' :
1062- return value . toFixed ( 0 ) ;
10631097 case 'DYN_IDLE' :
10641098 switch ( fieldName ) {
10651099 case 'debug[3]' : // minRPS
@@ -1128,6 +1162,47 @@ function FlightLogFieldPresenter() {
11281162 default :
11291163 return value . toFixed ( 0 ) + 'us' ;
11301164 }
1165+ case 'GPS_RESCUE_THROTTLE_PID' :
1166+ switch ( fieldName ) {
1167+ case 'debug[0]' : // Throttle P added uS
1168+ case 'debug[1]' : // Throttle D added * uS
1169+ return value . toFixed ( 0 ) + 'uS' ;
1170+ case 'debug[2]' : // current altitude in m
1171+ case 'debug[3]' : // TARGET altitude in m
1172+ return ( value / 100 ) . toFixed ( 1 ) + 'm' ;
1173+ default :
1174+ return value . toFixed ( 0 ) ;
1175+ }
1176+ case 'GPS_RESCUE_VELOCITY' :
1177+ switch ( fieldName ) {
1178+ case 'debug[0]' : // Pitch P degrees * 100
1179+ case 'debug[1]' : // Pitch D degrees * 100
1180+ return ( value / 100 ) . toFixed ( 1 ) + 'deg' ;
1181+ case 'debug[2]' : // velocity to home cm/s
1182+ case 'debug[3]' : // velocity target cm/s
1183+ return ( value / 100 ) . toFixed ( 1 ) + 'm/s' ;
1184+ }
1185+ case 'GPS_RESCUE_HEADING' :
1186+ switch ( fieldName ) {
1187+ case 'debug[0]' : // Rescue yaw rate deg/s * 10 up to +/- 90
1188+ return ( value / 10 ) . toFixed ( 1 ) + 'deg/s' ;
1189+ case 'debug[1]' : // Rescue roll deg * 100 up to +/- 20 deg
1190+ return ( value / 100 ) . toFixed ( 1 ) + 'deg' ;
1191+ case 'debug[2]' : // Attitude in degrees * 10
1192+ case 'debug[3]' : // Angle to home in degrees * 10
1193+ return ( value / 10 ) . toFixed ( 1 ) + 'deg' ;
1194+ }
1195+ case 'GPS_RESCUE_TRACKING' :
1196+ switch ( fieldName ) {
1197+ case 'debug[0]' : // velocity to home cm/s
1198+ case 'debug[1]' : // velocity target cm/s
1199+ return ( value / 100 ) . toFixed ( 1 ) + 'm/s' ;
1200+ case 'debug[2]' : // altitude cm
1201+ case 'debug[3]' : // altitude target cm
1202+ return ( value / 100 ) . toFixed ( 1 ) + 'm' ;
1203+ default :
1204+ return value . toFixed ( 0 ) ;
1205+ }
11311206 }
11321207 return value . toFixed ( 0 ) ;
11331208 }
0 commit comments