AUTELRemoteController
class AUTELRemoteController
@interface AUTELRemoteController : NSObject
describe:This class provides real-time status of RC, gimbal wheel, buttons and sticks. Provides functions of reading and writing RC parameters.
property device
@property (weak, nonatomic, readonly) AUTELDevice *device
describe:Returns an instance of current device object which is connected to RC.AUTELDevice
property delegate
@property (nonatomic, weak) id<AUTELRemoteControllerDelegate> delegate;
describe:The delegate of RC.
method enterRCPairingModeWithCompletion
- (void)enterRCPairingModeWithCompletion:(void(^)(AUTELRCParingResultState paringResult, NSError *err))block;
describe:Enter the remote control pairing mode。
Fails to apply if invoke this function when motors are on, block returns AUTELSDKFlightControllerErrorMotorWorking error.
Input parameters:
block:Completion block. This block includes 2 parameters. One is the max flight radius that the aircraft can fly, another one is error which indicates error message. Error retuns nil if this function applies successfully.
method setRCControlMode:withCompletion
- (void)setRCControlMode:(AUTELRCControlMode)mode withCompletion:(AUTELCompletionBlock)block;
describe:Set the remote control rocker control mode.
Input parameters:
mode:rocker control mode.
block:AUTELCompletionBlock,Completion block .
method getRCControlModeWithCompletion
- (void)getRCControlModeWithCompletion:(void(^)(AUTELRCControlMode mode, NSError *error))block;
describe:Get the remote control rocker control mode.
Input parameters:
block:Completion block. This block includes 2 parameters. One is the rocker control mode., another one is error which indicates error message. Error retuns nil if this function applies successfully.
method recordRCCalibrationMiddleValueWithCompletion
- (void)recordRCCalibrationMiddleValueWithCompletion:(AUTELCompletionBlock)block;
describe:Record the middle value of remote control rocker and wheel.
Input parameters:
block:AUTELCompletionBlock,Completion block .
method recordRCCalibrationExtremeValueWithCompletion
- (void)recordRCCalibrationExtremeValueWithCompletion:(AUTELCompletionBlock)block;
describe:Record the extreme value of remote control rocker and wheel.
Input parameters:
block:AUTELCompletionBlock,Completion block .
method exitRCCalibrationWithCompletion
- (void)exitRCCalibrationWithCompletion:(AUTELCompletionBlock)block;
describe:Exit the remote control calibration mode.
Input parameters:
block:AUTELCompletionBlock,Completion block .
method setRCLanguage:withCompletion
- (void)setRCLanguage:(AUTELRCLanguage)language withCompletion:(AUTELCompletionBlock)block;
describe:Setting the Remote Control Language
Input parameters:
language:Remote Control Language
block:AUTELCompletionBlock,Completion block .
method getRCLanguageWithCompletion
- (void)getRCLanguageWithCompletion:(void(^)(AUTELRCLanguage language, NSError *error))block;
describe:Get the Remote Control Language
Input parameters:
block:Completion block. This block includes 2 parameters. One is the Remote Control Language. another one is error which indicates error message. Error retuns nil if this function applies successfully.
method setGimbalWheelSpeed:withCompletion
- (void)setGimbalWheelSpeed:(uint32_t)speed withCompletion:(AUTELCompletionBlock)block;
describe:Set the speed of PTZ roller.
Input parameters:
speed:he speed of PTZ roller.Range is [0, 100]。
block:AUTELCompletionBlock,Completion block .
method getGimbalWheelSpeedWithCompletion
- (void)getGimbalWheelSpeedWithCompletion:(void(^)(uint32_t speed, NSError *error))block;
describe:Get the speed of PTZ roller.
Input parameters:
block:Completion block. This block includes 2 parameters. One is the speed of PTZ roller. another one is error which indicates error message. Error retuns nil if this function applies successfully.
method setRadioFrequencyMode:withCompletion
- (void)setRadioFrequencyMode:(AUTELRCRadioFrequencyMode)rf withCompletion:(AUTELCompletionBlock)block;
describe:Set the RF mode of the remote control(FCC or CE)。
Set the radio frequency mode of RC. This method is only applicable to X-Star. If invoke this method for X-Star Premium, block returns AUTELSDKRCErrorRCNotSupport error.
Input parameters:
rf:RF mode
block:AUTELCompletionBlock,Completion block .
method getRadioFrequencyModeWithCompletion
- (void)getRadioFrequencyModeWithCompletion:(void(^)(AUTELRCRadioFrequencyMode mode, NSError *error))block;
describe:Get the RF mode of the remote control
Get the radio frequency mode of RC. This method is only applicable to X-Star. If invoke this method for X-Star Premium, block returns AUTELSDKRCErrorRCNotSupport error.
Input parameters:
block:Completion block. This block includes 2 parameters. One is the RF mode of the remote control. another one is error which indicates error message. Error retuns nil if this function applies successfully.
method setRCName:andRCPassword:withCompletion
- (void)setRCName:(AUTELRCName)name andRCPassword:(AUTELRCPassword)password withCompletion:(AUTELCompletionBlock)block;
describe:Set name (SSID) and password of RC.
Input parameters:
name:The name of RC to be set. The name should be 8-16 charcters in length, and contain only letters, digits, '-' and '_'.
password:The password of RC to be set. The password should be 8-16 charcters in length.
block:AUTELCompletionBlock,Completion block .
method getRCNameAndPasswordWithCompletion
- (void)getRCNameAndPasswordWithCompletion:(void (^)(AUTELRCName name, AUTELRCPassword password, NSError *err))block;
describe:Get name (SSID) and password of RC.
Input parameters:
block:Completion block. This block includes 3 parameters. One is the name of the remote control. One is the password of the remote control. another one is error which indicates error message. Error retuns nil if this function applies successfully.
method setUnitsOfMeasurement:withCompletion
- (void)setUnitsOfMeasurement:(AUTELRCUnitsOfMeasurement)unit withCompletion:(AUTELCompletionBlock)block;
describe:Set unit of measurement (metric or imperial).
Input parameters:
unit:Metric or imperial。
block:AUTELCompletionBlock,Completion block .
method getUnitOfMeasurementWithCompletion
- (void)getUnitOfMeasurementWithCompletion:(void(^)(AUTELRCUnitsOfMeasurement unit, NSError *error))block;
describe:Get unit of measurement (metric or imperial).
Input parameters:
block:Completion block. This block includes 2 parameters. One is the unit of measurement (metric or imperial). another one is error which indicates error message. Error retuns nil if this function applies successfully.
method setRelationshipMode:withCompletion
- (void)setRelationshipMode:(AUTELRCRelationshipMode)mode withCompletion:(AUTELCompletionBlock)block;
describe:Set relationship mode of RC (off, instructor, learner).
Input parameters:
mode:Relationship mode of RC
block:AUTELCompletionBlock,Completion block .
method getRelationshipModeWithCompletion
- (void)getRelationshipModeWithCompletion:(void(^)(AUTELRCRelationshipMode mode, NSError *error))block;
describe:Get relationship mode of RC (off, instructor, learner)
Input parameters:
block:Completion block. This block includes 2 parameters. One is the relationship mode of RC (off, instructor, learner). another one is error which indicates error message. Error retuns nil if this function applies successfully.
method setDeviceCompassAngle
- (void)setDeviceCompassAngle:(uint16_t)angle;
describe:Transmit iPhone/iPad's compass angle to RC
Input parameters:
angle:iPhone/iPad's compass angle
protocol AUTELRemoteControllerDelegate
@protocol AUTELRemoteControllerDelegate <NSObject>
describe:This protocol informs the remote controller's delegate of the changing status of the command sticks, buttons, dials, and remote controller.
method remoteController:didUpdateHardwareState
- (void)remoteController:(AUTELRemoteController*)rc didUpdateHardwareState:(AUTELRCHardwareState)hardwareState NS_SWIFT_NAME(remoteController(_:didUpdateHardwareState:));
describe:This callback method is used to update the position of the command sticks, the position of the Flight Mode Switch, the state of the buttons, and the position of the left dial. When the app is connected to the remote controller, this method will be invoked 5 times per second.
Input parameters:
rc: The remote controller instance which informs the delegate of the updated state.
hardwareState:State of the command sticks and buttons on the remote controller.
method remoteController:didUpdateRCState
- (void)remoteController:(AUTELRemoteController *)rc didUpdateRCState:(AUTELRCState)rcState NS_SWIFT_NAME(remoteController(_:didUpdateRCState:));
describe:This method is invoked when the RC's state is changed, including the RC signal strength, video link signal strength, battery level, and RC calibration status. If the app is connected to the RC, this method will be invoked 5 times per second.
Input parameters:
rc:The remote controller instance which informs the delegate of the updated state.
rcState:RC state.AUTELRCState
method remoteController:didUpdateSpecialButtonState
- (void)remoteController:(AUTELRemoteController *)rc didUpdateSpecialButtonState:(AUTELSpecialButtonState)specialButtonState NS_SWIFT_NAME(remoteController(_:didUpdateSpecialButtonState:));
describe:This method is invoked when the cammand from RC buttons is responded, including the Record button, Shutter button, Playback button, and dials. If the app is connected to the RC, this method will be invoked 5 times per second.
Input parameters:
rc:The remote controller instance which informs the delegate of the updated state.
specialButtonState:State of the RC specified buttons
method remoteController:didUpdateConnecteState
- (void)remoteController:(AUTELRemoteController *)rc didUpdateConnecteState:(BOOL)connected NS_SWIFT_NAME(remoteController(_:didUpdateConnecteState:));
describe:This method is invoked when the connection state between the RC and app is changed.
Input parameters:
rc:The remote controller instance which informs the delegate of the updated state.
connected:Connected or not.
method remoteController:didUpdateInterconnectionState
- (void)remoteController:(AUTELRemoteController *)rc didUpdateInterconnectionState:(AUTELRCInterconnectionState)state NS_SWIFT_NAME(remoteController(_:didUpdateInterconnectionState:));
describe:This method is called when the remote control is connected to other remote controllers with CAN cable.
Input parameters:
rc:The remote controller instance which informs the delegate of the updated state.
state:Interconnected state between remote controls.