@@ -536,16 +536,22 @@ var FlightLogParser = function(logData) {
536
536
that . sysConfig . currentMeterScale = currentMeterParams [ 1 ] ;
537
537
break ;
538
538
case "gyro.scale" :
539
- that . sysConfig . gyroScale = hexToFloat ( fieldValue ) ;
540
-
541
- /* Baseflight uses a gyroScale that'll give radians per microsecond as output, whereas Cleanflight produces degrees
542
- * per second and leaves the conversion to radians per us to the IMU. Let's just convert Cleanflight's scale to
543
- * match Baseflight so we can use Baseflight's IMU for both: */
544
- if ( that . sysConfig . firmwareType == FIRMWARE_TYPE_INAV ||
545
- that . sysConfig . firmwareType == FIRMWARE_TYPE_CLEANFLIGHT ||
546
- that . sysConfig . firmwareType == FIRMWARE_TYPE_BETAFLIGHT ) {
547
- that . sysConfig . gyroScale = that . sysConfig . gyroScale * ( Math . PI / 180.0 ) * 0.000001 ;
548
- }
539
+ case "gyro_scale" :
540
+
541
+ if ( semver . gte ( that . sysConfig . firmwareVersion , '3.1.0' ) && that . sysConfig . firmwareType == FIRMWARE_TYPE_BETAFLIGHT ) {
542
+ that . sysConfig . gyroScale = 1.0 ; // logged gyro data is now scaled in the flight controller for betaflight
543
+ } else {
544
+ that . sysConfig . gyroScale = hexToFloat ( fieldValue ) ;
545
+ }
546
+
547
+ /* Baseflight uses a gyroScale that'll give radians per microsecond as output, whereas Cleanflight produces degrees
548
+ * per second and leaves the conversion to radians per us to the IMU. Let's just convert Cleanflight's scale to
549
+ * match Baseflight so we can use Baseflight's IMU for both: */
550
+ if ( that . sysConfig . firmwareType == FIRMWARE_TYPE_INAV ||
551
+ that . sysConfig . firmwareType == FIRMWARE_TYPE_CLEANFLIGHT ||
552
+ that . sysConfig . firmwareType == FIRMWARE_TYPE_BETAFLIGHT ) {
553
+ that . sysConfig . gyroScale = that . sysConfig . gyroScale * ( Math . PI / 180.0 ) * 0.000001 ;
554
+ }
549
555
break ;
550
556
case "Firmware revision" :
551
557
0 commit comments