@@ -32,7 +32,7 @@ const FRIENDLY_FIELD_NAMES = {
3232 "axisF[0]" : "PID Feedforward [roll]" ,
3333 "axisF[1]" : "PID Feedforward [pitch]" ,
3434 "axisF[2]" : "PID Feedforward [yaw]" ,
35-
35+
3636 "axisS[all]" : "PID S" ,
3737 "axisS[0]" : "PID S [roll]" ,
3838 "axisS[1]" : "PID S [pitch]" ,
@@ -129,7 +129,7 @@ const FRIENDLY_FIELD_NAMES = {
129129 GPS_altitude : "GPS Altitude ASL" ,
130130 GPS_speed : "GPS Speed" ,
131131 GPS_ground_course : "GPS Heading" ,
132-
132+
133133 "gpsCartesianCoords[all]" : "GPS Coords" ,
134134 "gpsCartesianCoords[0]" : "GPS Coords [X]" ,
135135 "gpsCartesianCoords[1]" : "GPS Coords [Y]" ,
@@ -1388,6 +1388,26 @@ FlightLogFieldPresenter.adjustDebugDefsList = function (
13881388 'debug[4]' : 'Current Setpoint [yaw]' ,
13891389 'debug[5]' : 'Adjusted Setpoint [yaw]' ,
13901390 } ;
1391+ DEBUG_FRIENDLY_FIELD_NAMES . OPTICALFLOW = {
1392+ 'debug[all]' : 'Optical Flow' ,
1393+ 'debug[0]' : 'Quality' ,
1394+ 'debug[1]' : 'Raw flow rates X' ,
1395+ 'debug[2]' : 'Raw flow rates Y' ,
1396+ 'debug[3]' : 'Processed flow rates X' ,
1397+ 'debug[4]' : 'Processed flow rates Y' ,
1398+ 'debug[5]' : 'Delta time' ,
1399+ } ;
1400+ DEBUG_FRIENDLY_FIELD_NAMES . AUTOPILOT_POSITION = {
1401+ 'debug[all]' : 'Autopilot Position' ,
1402+ 'debug[0]' : 'Distance' ,
1403+ 'debug[1]' : 'GPS Distance' ,
1404+ 'debug[2]' : 'PID Sum EF' ,
1405+ 'debug[3]' : 'Angle' ,
1406+ 'debug[4]' : 'pidP' ,
1407+ 'debug[5]' : 'pidI' ,
1408+ 'debug[6]' : 'pidD' ,
1409+ 'debug[7]' : 'pidA' ,
1410+ } ;
13911411 }
13921412 }
13931413} ;
@@ -1728,7 +1748,7 @@ FlightLogFieldPresenter.decodeFieldToFriendly = function (
17281748 }
17291749 case "GPS_ground_course" :
17301750 return `${ ( value / 10 ) . toFixed ( 1 ) } °` ;
1731-
1751+
17321752 case "gpsCartesianCoords[0]" :
17331753 case "gpsCartesianCoords[1]" :
17341754 case "gpsCartesianCoords[2]" :
@@ -2151,6 +2171,28 @@ FlightLogFieldPresenter.decodeDebugFieldToFriendly = function (
21512171 return value . toFixed ( 0 ) ;
21522172 case "EZLANDING" :
21532173 return `${ ( value / 100.0 ) . toFixed ( 2 ) } %` ;
2174+ case "OPTICALFLOW" :
2175+ switch ( fieldName ) {
2176+ case "debug[1]" :
2177+ case "debug[2]" :
2178+ case "debug[3]" :
2179+ case "debug[4]" :
2180+ return `${ ( value / 1000 ) . toFixed ( 1 ) } ` ;
2181+ default :
2182+ return value . toFixed ( 1 ) ;
2183+ }
2184+ case "AUTOPILOT_POSITION" :
2185+ switch ( fieldName ) {
2186+ case "debug[2]" :
2187+ case "debug[3]" :
2188+ case "debug[4]" :
2189+ case "debug[5]" :
2190+ case "debug[6]" :
2191+ case "debug[7]" :
2192+ return `${ ( value / 10 ) . toFixed ( 1 ) } ` ;
2193+ default :
2194+ return value . toFixed ( 1 ) ;
2195+ }
21542196 }
21552197 return value . toFixed ( 0 ) ;
21562198 }
@@ -2816,6 +2858,28 @@ FlightLogFieldPresenter.ConvertDebugFieldValue = function (
28162858 return value ;
28172859 case "DSHOT_TELEMETRY_COUNTS" :
28182860 return value ;
2861+ case "OPTICALFLOW" :
2862+ switch ( fieldName ) {
2863+ case "debug[1]" :
2864+ case "debug[2]" :
2865+ case "debug[3]" :
2866+ case "debug[4]" :
2867+ return toFriendly ? value / 1000 : value * 1000 ;
2868+ default :
2869+ return value ;
2870+ }
2871+ case "AUTOPILOT_POSITION" :
2872+ switch ( fieldName ) {
2873+ case "debug[2]" :
2874+ case "debug[3]" :
2875+ case "debug[4]" :
2876+ case "debug[5]" :
2877+ case "debug[6]" :
2878+ case "debug[7]" :
2879+ return toFriendly ? value / 10 : value * 10 ;
2880+ default :
2881+ return value ;
2882+ }
28192883 }
28202884 }
28212885 return value ;
0 commit comments