AUTELRemoteControllerDef
file AUTELRemoteControllerDef
define AUTEL_RC_NAME_BUFFER_SIZE
#define AUTEL_RC_NAME_BUFFER_SIZE (17) //Ssid length
describe:Ssid length of remote control
define AUTEL_RC_PWD_BUFFER_SIZE
#define AUTEL_RC_PWD_BUFFER_SIZE (17) //password length
describe:password length of remote control
struct AUTELRCSignalQuality
describe:RC Signal quality
typedef struct
{
/**
* @brief Range of the signal strength: [0, 100]
*
*/
uint8_t mQuality;
} AUTELRCSignalQuality;
struct AUTELRCName
describe:RC name
typedef struct
{
char mBuffer[AUTEL_RC_NAME_BUFFER_SIZE];
} AUTELRCName;
struct AUTELRCPassword
describe:RC Password
typedef struct
{
char mBuffer[AUTEL_RC_PWD_BUFFER_SIZE];
} AUTELRCPassword;
struct AUTELRCControlMode
describe:Control style for RC
typedef struct
{
/**
* @brief Control style.
*
*/
AUTELRCControlStyle mControlStyle;
} AUTELRCControlMode;
struct AUTELRCBatteryInfo
describe:RC remaining battery level (%)
typedef struct
{
/**
* @brief The remaining power percent of RC battery. [0, 100]
*
*/
uint8_t mRemainPowerPercent;
} AUTELRCBatteryInfo;
struct AUTELRCHardwareRightWheel
describe:Roller rolling status on the right side of the remote control
typedef struct
{
/**
* @brief Wheel value changed.
*
*/
BOOL mWheelChanged;
/**
* @brief Wheel pressed.
*
*/
AUTELRCMultiPurposeButtonState mWheelButtonDown;
/**
* @brief Wheel offset sign(+/-), YES = +, NO = -
*
*/
BOOL mWheelOffsetSign;
/**
* @brief Wheel offset value
*
*/
int8_t mWheelOffset;
} AUTELRCHardwareRightWheel;
struct AUTELRCHardwareLeftWheel
describe:Remote control left wheel rolling value
typedef struct
{
/**
* @brief Wheel value in range [364, 1684]
*
*/
uint16_t mValue;
} AUTELRCHardwareLeftWheel;
struct AUTELRCHardwareModeSwitchState
describe:Define the flight mode switch gear of the remote control
typedef NS_ENUM(uint8_t, AUTELRCHardwareModeSwitchState)
{
/**
* @brief IOC mode on the left
*
*/
RCHardwareModeSwitchIOC,
/**
* @brief GPS mode on the middle
*
*/
RCHardwareModeSwitchGPS,
/**
* @brief ATTI mode on the right
*
*/
RCHardwareModeSwitchATTI,
/**
* @brief Unknown
*
*/
RCHardwareModeSwitchUnknown,
};
struct AUTELRCHardwareModeSwitch
describe:Remote control flight mode switch gear
typedef struct
{
AUTELRCHardwareModeSwitchState mMode;
} AUTELRCHardwareModeSwitch;
struct AUTELRCHardwareButton
describe:State of the RC buttons
typedef struct
{
/**
* @brief Button state. YES:pressed:NO:Not pressed
*
*/
BOOL mButtonDown;
} AUTELRCHardwareButton;
struct AUTELRCHardwareJoystick_t
describe:Rocker lever position value
struct AUTELRCHardwareJoystick_t
{
/**
* @brief Joystick's channel value in range [364, 1684]
*
*/
uint16_t mValue;
};
struct AUTELRCHardwareJoystick
describe:Rocker lever position value
typedef struct AUTELRCHardwareJoystick_t AUTELRCHardwareJoystick;
struct AUTELRCHardwareState
describe:The state value of the RC buttons, command sticks, and dials.
typedef struct
{
/**
* @brief The horizontal direction value of the left command stic
*
*/
AUTELRCHardwareJoystick mLeftHorizontal;
/**
* @brief The vertical direction value of the left command stick
*
*/
AUTELRCHardwareJoystick mLeftVertical;
/**
* @brief The horizontal direction value of the right command stick
*
*/
AUTELRCHardwareJoystick mRightHorizontal;
/**
* @brief The vertical direction value of the right command stick
*
*/
AUTELRCHardwareJoystick mRightVertical;
/**
* @brief Wheel on top left
*
*/
AUTELRCHardwareLeftWheel mLeftWheel;
/**
* @brief Wheel on top right
*
*/
AUTELRCHardwareRightWheel mRightWheel;
/**
* @brief Mode switch
*
*/
AUTELRCHardwareModeSwitch mModeSwitch;
/**
* @brief Go home button
*
*/
AUTELRCHardwareButton mGoHomeButton;
/**
* @brief Record button
*
*/
AUTELRCMultiPurposeButtonState mRecordButton;
/**
* @brief Shutter button
*
*/
AUTELRCHardwareButton mShutterButton;
/**
* @brief Playback button
*
*/
AUTELRCMultiPurposeButtonState mPlaybackButton;
/**
* @brief Hover button
*
*/
AUTELRCHardwareButton mHoverButton;
/**
* @brief Takeoff/Landing button
*
*/
AUTELRCHardwareButton mTakeOffOrLandButton;
/**
* @brief Motor Starter button
*
*/
AUTELRCHardwareButton mTurnOnMotorButton;
/**
* @brief Custom button1 on the bottom left
*
*/
AUTELRCMultiPurposeButtonState mCustomButton1;
/**
* @brief Custom button2 on the bottom right
*
*/
AUTELRCMultiPurposeButtonState mCustomButton2;
} AUTELRCHardwareState;
struct AUTELRCState
describe:RC status information
typedef struct {
/**
* @brief RC signal strength
*
*/
AUTELRCSignalQuality rcSignalQuality;
/**
* @brief Video link signal strength
*
*/
AUTELRCSignalQuality dspSignalQuality;
/**
* @brief RC battery level information
*
*/
AUTELRCBatteryInfo rcBatteryInfo;
/**
* @brief RC calibration status
*
*/
AUTELRCCalibrationState rcCalibrationState;
}AUTELRCState;
struct AUTELSpecialButtonState
describe:State of the specified buttons
typedef struct {
/**
* @brief Right dial
*
*/
AUTELRCHardwareRightWheel mRightWheel;
/**
* @brief Shutter button
*
*/
AUTELRCHardwareButton mShutterButton;
/**
* @brief Record button
*
*/
AUTELRCMultiPurposeButtonState mRecordButton;
/**
* @brief Playback button
*
*/
AUTELRCMultiPurposeButtonState mPlaybackButton;
/**
* @brief Custom button
*
*/
AUTELRCMultiPurposeButtonState mCustomButton1;
/**
* @brief Custom button
*
*/
AUTELRCMultiPurposeButtonState mCustomButton2;
}AUTELSpecialButtonState;
struct AUTELRCParingResultState
describe:RC pairing result
typedef NS_ENUM(uint8_t, AUTELRCParingResultState) {
/**
* @brief Pairing succeeded
*
*/
AUTELRCParingSuccess,
/**
* @brief Pairing failed
*
*/
AUTELRCParingFail,
/**
* @brief Pairing status unknown
*
*/
AUTELRCParingUnknow,
};
struct AUTELRCInterconnectionState
describe:Interconnected state between remote controls, Coach/student mode
typedef NS_ENUM(uint8_t, AUTELRCInterconnectionState) {
/**
* @brief The remote control is not Interconnected
*
*/
AUTELRCInterconnectionStateNone = 0,
/**
* @brief teacher mode
*
*/
AUTELRCInterconnectionStateInstructorMode,
/**
* @brief student mode
*
*/
AUTELRCInterconnectionStateLearnerMode,
/**
* @brief status error
*
*/
AUTELRCInterconnectionStateError = 0x0F,
/**
* @brief status unknown
*
*/
AUTELRCInterconnectionStateUnknow = 0xFF,
};
typedef block AUTELRequestRFModeResult
describe:The callback result of checking the RC RF mode.
typedef void(^AUTELRequestRFModeResult)(AUTELRCRadioFrequencyMode mode, NSError *error);
typedef block AUTELRequestRCUINT32ParamResult
describe:The callback result of checking the RC parameters
typedef void(^AUTELRequestRCUINT32ParamResult)(uint32_t param, NSError *error);
typedef block AUTELRequestRCGimbalWheelSpeedResult
describe:The result of checking the Gimbal Pitch Dial speed
typedef AUTELRequestRCUINT32ParamResult AUTELRequestRCGimbalWheelSpeedResult;
typedef block AUTELSetGimbalPitchResult
describe:The result of setting the gimbal pitch angle
typedef AUTELRequestRCUINT32ParamResult AUTELSetGimbalPitchResult;
typedef block AUTELRequestGimbalPitchResult
describe:The result of checking the gimbal pitch angle.
typedef AUTELRequestRCUINT32ParamResult AUTELRequestGimbalPitchResult;
typedef block AUTELRequestRCLanguageResult
describe:The result of checking the RC language。
typedef void(^AUTELRequestRCLanguageResult)(AUTELRCLanguage language, NSError *errpr);
typedef block AUTELRCCalibrationResult
describe:he result of checking the RC calibration status
typedef void(^AUTELRCCalibrationResult)(AUTELRCCalibrationState state, NSError *error);
typedef block AUTELRCVersionResult
describe:The result of requesting the RC version。rcVersion:Mainboard version,rfVersion:RF version
typedef void(^AUTELRCVersionResult)(NSString *rcVersion, NSString *rfVersion, NSError *error);
typedef block AUTELRequestRCPairingStateResult
describe:The result of checking the RC pairing status。pairingState: Pairing state
typedef void(^AUTELRequestRCPairingStateResult)(AUTELRCParingState pairingState, NSError *error);
typedef block AUTELRequestRCControlModeResult
describe:The result of checking the RC command stick mode。mode:Control style for RC
typedef void(^AUTELRequestRCControlModeResult)(AUTELRCControlMode mode, NSError *error);
typedef block AUTELRCParingResultState
describe:The result of checking the RC pairing。paringResult:Pairing result
typedef void(^AUTELRCParingResult)(AUTELRCParingResultState paringResult, NSError *err);
enum AUTELRCControlStyle
describe:Remote control rocker control mode
typedef NS_ENUM(uint8_t, AUTELRCControlStyle){
/**
* Remote Controller uses Japanese controls (also known as Mode 1). In this mode the left stick controls Pitch and Yaw, and the right stick controls Throttle and Roll.
*
*/
RCControlStyleJapanese,
/**
* Remote Controller uses American controls (also known as Mode 2). In this mode the left stick controls Throttle and Yaw, and the right stick controls Pitch and Roll.
*
*/
RCControlStyleAmerican,
/**
* Remote Controller uses Chinese controls (also know as Mode 3). In this mode the left stick controls Pitch and Roll, and the right stick controls Throttle and Yaw.
*
*/
RCControlStyleChinese,
/**
* Error style
*
*/
RCControlStyleError,
/**
* Unknown control style.
*
*/
RCControlStyleUnknown = 0xFF,
}
enum AUTELRCParingState
describe:RC paring state
typedef NS_ENUM(uint8_t, AUTELRCParingState){
/**
* @brief RC not in paring state
*
*/
RCParingStateNormal,
/**
* @brief RC is in paring
*
*/
RCParingStateParing,
/**
* @brief RC paring completed
*
*/
RCParingStateCompleted,
/**
* @brief RC Paring state unknown
*
*/
RCParingStateUnknown,
};
enum AUTELRCCalibrationState
describe:Define remote controller's calibration state.
typedef NS_ENUM(uint8_t, AUTELRCCalibrationState){
/**
* Normal state
*
*/
RCCalibrationNormal,
/**
* Record middle value
*
*/
RCCalibrationRecordMiddleValue,
/**
* Record extreme value
*
*/
RCCalibrationRecordExtremeValue,
/**
* Exit calibration
*
*/
RCCalibrationExit,
};
enum AUTELRCCalibrationState
describe:Define remote controller's calibration state.
typedef NS_ENUM(uint8_t, AUTELRCRadioFrequencyMode) {
/**
* @brief FCC mode
*
*/
RCRadioFrequencyFCC = 0,
/**
* @brief CE mode
*
*/
RCRadioFrequencyCE,
/**
* @brief RF mode unknown
*
*/
RCRadioFrequencyUnknow = 0xFF,
};
enum AUTELRCLanguage
describe:Define the RC language type
typedef NS_ENUM(uint8_t, AUTELRCLanguage) {
/**
* @brief English
*
*/
RCLanguageEnglish,
/**
* @brief Chinese
*
*/
RCLanguageChinese,
/**
* @brief Unknown
*
*/
RCLanguageUnknown = 0xFF,
}
enum AUTELRCUnitsOfMeasurement
describe:Define the RC parameter unit
typedef NS_ENUM(uint8_t, AUTELRCUnitsOfMeasurement) {
/**
* @brief Imperial m/s
*
*/
RCUnitsOfMeasurementImperial,
/**
* @brief Metric mph
*
*/
RCUnitsOfMeasurementMetric,
/**
* @brief Imperial km/h
*
*/
RCUnitsOfMeasurementImperialForKM,
/**
* @brief Unknown
*
*/
RCUnitsOfMeasurementUnknown = 0xFF,
}
enum AUTELRCRelationshipMode
describe:Define the RC relation mode
typedef NS_ENUM(uint8_t, AUTELRCRelationshipMode) {
/**
* @brief Independent
*
*/
RCRelationshipModeIndependent,
/**
* @brief Instructor
*
*/
RCRelationshipModeTrainer,
/**
* @brief Learner
*
*/
RCRelationshipModeStudent,
/**
* @brief RC relation mode unknown
*
*/
RCRelationshipModeUnknown = 0xFF,
};
enum AUTELRCMultiPurposeButtonState
describe:Define the state of the right dial.
typedef NS_ENUM(NSUInteger, AUTELRCMultiPurposeButtonState) {
/**
* @brief Roll
*
*/
RCMultiPurposeButtonUp = 0,
/**
* @brief Press
*
*/
RCMultiPurposeButtonShortDown,
/**
* @brief Hold
*
*/
RCMultiPurposeButtonLongDown
};