This repository was archived by the owner on Apr 19, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -454,7 +454,7 @@ static void parseHeaderLine(flightLog_t *log, mmapStream_t *stream)
454454
455455 log -> sysConfig .currentMeterOffset = currentMeterParams [0 ];
456456 log -> sysConfig .currentMeterScale = currentMeterParams [1 ];
457- } else if (strcmp (fieldName , "gyro.scale" ) == 0 ) {
457+ } else if (strcmp (fieldName , "gyro.scale" ) == 0 || strcmp ( fieldName , "gyro_scale" ) == 0 ) {
458458 floatConvert .u = strtoul (fieldValue , 0 , 16 );
459459
460460 log -> sysConfig .gyroScale = floatConvert .f ;
@@ -463,7 +463,7 @@ static void parseHeaderLine(flightLog_t *log, mmapStream_t *stream)
463463 * per second and leaves the conversion to radians per us to the IMU. Let's just convert Cleanflight's scale to
464464 * match Baseflight so we can use Baseflight's IMU for both: */
465465
466- if (log -> sysConfig .firmwareType == FIRMWARE_TYPE_CLEANFLIGHT ) {
466+ if (log -> sysConfig .firmwareType != FIRMWARE_TYPE_BASEFLIGHT ) {
467467 log -> sysConfig .gyroScale = (float ) (log -> sysConfig .gyroScale * (M_PI / 180.0 ) * 0.000001 );
468468 }
469469 } else if (strcmp (fieldName , "acc_1G" ) == 0 ) {
Original file line number Diff line number Diff line change 2020typedef enum FirmwareType {
2121 FIRMWARE_TYPE_UNKNOWN = 0 ,
2222 FIRMWARE_TYPE_BASEFLIGHT ,
23- FIRMWARE_TYPE_CLEANFLIGHT
23+ FIRMWARE_TYPE_CLEANFLIGHT ,
24+ FIRMWARE_TYPE_BETAFLIGHT
2425} FirmwareType ;
2526
2627typedef struct flightLogFrameStatistics_t {
You can’t perform that action at this time.
0 commit comments