mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
LP-73 convert BoardRotation to int
This commit is contained in:
parent
7de55812dd
commit
911400924e
@ -245,11 +245,23 @@ void ConfigRevoWidget::storeAndClearBoardRotation()
|
||||
// Store current aux mag board rotation
|
||||
AuxMagSettings *auxMagSettings = AuxMagSettings::GetInstance(getObjectManager());
|
||||
Q_ASSERT(auxMagSettings);
|
||||
<<<<<<< HEAD
|
||||
AuxMagSettings::DataFields auxMagData = auxMagSettings->getData();
|
||||
auxMagStoredBoardRotation = auxMagData.Orientation;
|
||||
|
||||
// Set aux mag board rotation to no rotation
|
||||
auxMagData.Orientation = 0.0f;
|
||||
=======
|
||||
AuxMagSettings::DataFields auxMagData = auxMagSettings->getData();
|
||||
auxMagStoredBoardRotation[AuxMagSettings::BOARDROTATION_YAW] = auxMagData.BoardRotation[AuxMagSettings::BOARDROTATION_YAW];
|
||||
auxMagStoredBoardRotation[AuxMagSettings::BOARDROTATION_ROLL] = auxMagData.BoardRotation[AuxMagSettings::BOARDROTATION_ROLL];
|
||||
auxMagStoredBoardRotation[AuxMagSettings::BOARDROTATION_PITCH] = auxMagData.BoardRotation[AuxMagSettings::BOARDROTATION_PITCH];
|
||||
|
||||
// Set aux mag board rotation to no rotation
|
||||
auxMagData.BoardRotation[AuxMagSettings::BOARDROTATION_YAW] = 0;
|
||||
auxMagData.BoardRotation[AuxMagSettings::BOARDROTATION_ROLL] = 0;
|
||||
auxMagData.BoardRotation[AuxMagSettings::BOARDROTATION_PITCH] = 0;
|
||||
>>>>>>> 2c030f1... LP-73 fix V9 calibration bug and convert BoardRotation to int
|
||||
auxMagSettings->setData(auxMagData);
|
||||
}
|
||||
}
|
||||
@ -269,11 +281,20 @@ void ConfigRevoWidget::recallBoardRotation()
|
||||
data.BoardRotation[AttitudeSettings::BOARDROTATION_PITCH] = storedBoardRotation[AttitudeSettings::BOARDROTATION_PITCH];
|
||||
attitudeSettings->setData(data);
|
||||
|
||||
<<<<<<< HEAD
|
||||
// Restore the aux mag board rotation
|
||||
AuxMagSettings *auxMagSettings = AuxMagSettings::GetInstance(getObjectManager());
|
||||
Q_ASSERT(auxMagSettings);
|
||||
AuxMagSettings::DataFields auxMagData = auxMagSettings->getData();
|
||||
auxMagData.Orientation = auxMagStoredBoardRotation;
|
||||
=======
|
||||
AuxMagSettings *auxMagSettings = AuxMagSettings::GetInstance(getObjectManager());
|
||||
Q_ASSERT(auxMagSettings);
|
||||
AuxMagSettings::DataFields auxMagData = auxMagSettings->getData();
|
||||
auxMagData.BoardRotation[AuxMagSettings::BOARDROTATION_YAW] = auxMagStoredBoardRotation[AuxMagSettings::BOARDROTATION_YAW];
|
||||
auxMagData.BoardRotation[AuxMagSettings::BOARDROTATION_ROLL] = auxMagStoredBoardRotation[AuxMagSettings::BOARDROTATION_ROLL];
|
||||
auxMagData.BoardRotation[AuxMagSettings::BOARDROTATION_PITCH] = auxMagStoredBoardRotation[AuxMagSettings::BOARDROTATION_PITCH];
|
||||
>>>>>>> 2c030f1... LP-73 fix V9 calibration bug and convert BoardRotation to int
|
||||
auxMagSettings->setData(auxMagData);
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ private:
|
||||
|
||||
// Board rotation store/recall for FC and for aux mag
|
||||
qint16 storedBoardRotation[3];
|
||||
float auxMagStoredBoardRotation;
|
||||
qint16 auxMagStoredBoardRotation[3];
|
||||
bool isBoardRotationStored;
|
||||
|
||||
private slots:
|
||||
|
@ -5,7 +5,7 @@
|
||||
<field name="mag_transform" units="gain" type="float" elementnames="r0c0,r0c1,r0c2,r1c0,r1c1,r1c2,r2c0,r2c1,r2c2"
|
||||
defaultvalue="1,0,0,0,1,0,0,0,1"/>
|
||||
<field name="MagBiasNullingRate" units="" type="float" elements="1" defaultvalue="0"/>
|
||||
<field name="BoardRotation" units="deg" type="float" elementnames="Roll,Pitch,Yaw" defaultvalue="0,0,0"/>
|
||||
<field name="BoardRotation" units="deg" type="int16" elementnames="Roll,Pitch,Yaw" defaultvalue="0,0,0"/>
|
||||
<field name="Type" units="" type="enum" elements="1" options="GPSV9,Ext,Flexi" defaultvalue="GPSV9"/>
|
||||
<field name="Usage" units="" type="enum" elements="1" options="Both,OnboardOnly,AuxOnly" defaultvalue="Both"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user