MagnetometerWith1StepCalibration
@objc(GSMagnetometerWith1StepCalibration)
public protocol MagnetometerWith1StepCalibration : Magnetometer
1-step calibration magnetometer peripheral.
The calibration is done on the 3 axes simultaneously: roll, pitch and yaw. This peripheral can be retrieved by:
drone.getPeripheral(Peripherals.magnetometerWith1StepCalibration)
-
State of the calibration process. Not
nil
if a calibration process is running,nil
otherwise.Note
To start a calibration process, usestartCalibrationProcess()
.Declaration
Swift
var calibrationProcessState: Magnetometer1StepCalibrationProcessState? { get }
-
Starts the calibration process.
After this call,
calibrationProcessState
is notnil
as the process has started. The process ends either when all axes are recalibrated or when you callcancelCalibrationProcess()
.Note
No changes if the process is already started.Declaration
Swift
func startCalibrationProcess()
-
Cancels the calibration process.
Cancel a process that has been started with
startCalibrationProcess()
. After this call,calibrationProcessState
isnil
as the process has ended.Note
No changes if the process is not started.Declaration
Swift
func cancelCalibrationProcess()