NestModelManager
class NestModelManager
Description: Nest model manager class
class NestModelManager{
/**
* nest pole status bean object
*/
private var mNestVirtualPoleStatusBean: NestVirtualPoleStatusBean = NestVirtualPoleStatusBean()
/**
* start upload virtual pole
*/
private var mStartUploadVirtualPole: Boolean = false
/**
* motor info parse object
*/
private var motorInfoParse: NestMotorInfo = NestMotorInfo()
}
method getKeyManager
private fun getKeyManager(): IKeyManager?
Description: Getting current key manager object
Input parameters: None。
Output parameters: key manager object passing from first remote device manager
Related parameters: None。
method getSwitchKeyManager
private fun getSwitchKeyManager(): IKeyManager?
Description: Getting current switch key manager object
Input parameters: None。
Output parameters: key manager object passing from device manager
Related parameters: None。
method convertT
fun convertT(value: Int): Int
Description: Joystick upload 8 channel parameter value conversion
Input parameters: value: -100-100 Negative values indicate left and down directions, positive values indicate right and up directions
Output parameters: 359-1689
Related parameters: None。
method updateVirstualPoleStateData
fun updateVirstualPoleStateData(
raiseOrDown: Int,
turnLeftOrRightValue: Int,
forwardOrBackwardValue: Int,
goLeftOrRightValue: Int
)
Description: Updating virtual pole state data
Input parameters: raiseOrDown: raise or down state turnLeftOrRightValue: turn left or right state forwardOrBackwardValue: forward or backward state goLeftOrRightValue: going left or right state
Output parameters: None。
Related parameters: None。
method startVirstualPoleStateUpload
fun startVirstualPoleStateUpload(bStart: Boolean)
Description: Starting virtual pole state data
Input parameters: bStart: starting boolean
Output parameters: None。
Related parameters: None。
method endVirstualPoleStateUpload
fun endVirstualPoleStateUpload()
Description: Ending virtual pole state data
Input parameters: None。
Output parameters: None。
Related parameters: None。
method nestCabinControl
fun nestCabinControl(
bean: NestControlBean?,
callback: CommonCallbacks.CompletionCallbackWithParam<Void>
)
Description: door control
Input parameters: bean: nest control bean callback: for completion cabin control
Output parameters: None。
Related parameters: None。
method nestXRodControl
fun nestXRodControl(
bean: NestControlBean?,
callback: CommonCallbacks.CompletionCallbackWithParam<Void>
)
Description: Position centered stick X stick control
Input parameters: bean: nest control bean callback: X Rod completion callback
Output parameters: None。
Related parameters: None。
method nestYRodControl
fun nestYRodControl(
bean: NestControlBean?,
callback: CommonCallbacks.CompletionCallbackWithParam<Void>
)
Description: Position centered rod Y rod control
Input parameters: bean: nest control bean callback: Y Rod completion callback
Output parameters: None。
Related parameters: None。
method nestZRodControl
fun nestZRodControl(
bean: NestControlBean?,
callback: CommonCallbacks.CompletionCallbackWithParam<Void>
)
Description: Position centered rod Z rod control
Input parameters: bean: nest control bean callback: Z Rod completion callback
Output parameters: None。
Related parameters: None。
method nestChargeControl
fun nestChargeControl(
bean: NestControlBean?,
callback: CommonCallbacks.CompletionCallbackWithParam<Void>
)
Description: drone charging
Input parameters: bean: nest control bean callback: charging completion callback
Output parameters: None。
Related parameters: None。
method nestReset
fun nestReset(
bean: NestResetBean?,
callback: CommonCallbacks.CompletionCallbackWithParam<Void>
)
Description: nest reset
Input parameters: bean: nest control bean callback: reset completion callback
Output parameters: None。
Related parameters: None。
method nestCalibrateteOperate
fun nestCalibrateteOperate(
bean: NestCalibrationOperateBean?,
callback: CommonCallbacks.CompletionCallbackWithParam<Void>
)
Description: Calibration Operation Instructions
Input parameters: bean: nest calibration operation bean callback: calibration completion callback
Output parameters: None。
Related parameters: None。
method nestSignalCalibrate
fun nestSignalCalibrate(
bean: NestSignalCalibrateBean?,
callback: CommonCallbacks.CompletionCallbackWithParam<Void>
)
Description: One-step calibration operation
Input parameters: bean: nest signal calibration bean callback: signal calibration completion callback
Output parameters: None。
Related parameters: None。
method nestSystemConfig
fun nestSystemConfig(
bean: NestSystemConfigBean?,
callback: CommonCallbacks.CompletionCallbackWithParam<Void>
)
Description: Nest system configuration
Input parameters: bean: nest system config bean callback: completion callback system config
Output parameters: None。
Related parameters: None。
method nestTurnOnOff
fun nestTurnOnOff(
bean: NestTurnOnoffBean?,
callback: CommonCallbacks.CompletionCallbackWithParam<Void>
)
Description: UAV switch
Input parameters: bean: nest turn off/on bean callback: completion turn on off callback
Output parameters: None。
Related parameters: None。
method nestACControl
fun nestACControl(
bean: NestControlBean?,
callback: CommonCallbacks.CompletionCallbackWithParam<Int>
)
Description: Air conditioner switch control
Input parameters: bean: nest acc control callback: completion callback od next acc
Output parameters: None。
Related parameters: None。
method nestScramControl
fun nestScramControl(
bean: NestScramControlBean?,
callback: CommonCallbacks.CompletionCallbackWithParam<Void>
)
Description: emergency stop control
Input parameters: bean: nest scram control bean callback: completion scram callback
Output parameters: None。
Related parameters: None。
method nestAutoCommand
fun nestAutoCommand(
bean: NestAutoCommandBean?,
callback: CommonCallbacks.CompletionCallbackWithParam<Void>
)
Description: autocommand
Input parameters: bean: nest auto command bean callback: completion auto command
Output parameters: None。
Related parameters: None。
method nestMotorToZero
fun nestMotorToZero(
bean: NestMotorZeroBean?,
callback: CommonCallbacks.CompletionCallbackWithParam<Void>
)
Description: Motor return to zero
Input parameters: bean: nest motor zero bean callback: completion callback of motor to zero
Output parameters: None。
Related parameters: None。
method setNestVirtualPoleStatusListener
fun setNestVirtualPoleStatusListener(listener: CommonCallbacks.KeyListener<NestVirtualPoleStatusBean>)
Description: Virtual joystick status report
Input parameters: listener: callback listener virtual pole status
Output parameters: None。
Related parameters: None。
method nestRetractPaddleControl
fun nestRetractPaddleControl(callback: CommonCallbacks.CompletionCallbackWithParam<NestWaitTimeBean>)
Description: retraction control
Input parameters: callback: callback listener wait time model
Output parameters: None。
Related parameters: None。
method nestRetractPaddleControl
fun nestRetractPaddleControl(
bean: NestWaitTimeBean?,
callback: CommonCallbacks.CompletionCallbackWithParam<Void>
)
Description: The app returns the waiting time to the machine nest
Input parameters: bean: nest wait time bean callback: completion callback of nest retract paddle
Output parameters: None。
Related parameters: None。
method rcModeSwitch
fun rcModeSwitch(
bean: RcModeSwitchBean,
callback: CommonCallbacks.CompletionCallbackWithParam<RcModeSwitchBean>
)
Description: Remote control mode switching
Input parameters: bean: nest RC mode switch model callback: completion RC mode switch
Output parameters: None。
Related parameters: None。
method nestControlPageHeartBeat
fun nestControlPageHeartBeat()
Description: Nest controller page heart beat
Input parameters: None。
Output parameters: None。
Related parameters: None。
method setNestStatusInfoListener
fun setNestStatusInfoListener(listener: CommonCallbacks.KeyListener<AutelNestInfo>)
Description: Nest status information notification
Input parameters: listener: key listener callback for nest status info
Output parameters: None。
Related parameters: None。
method setNestBatteryDynamicStatusListener
fun setNestBatteryDynamicStatusListener(listener: CommonCallbacks.KeyListener<BatteryDynamicInfo>)
Description: Body battery dynamic information notification
Input parameters: listener: key listener callback for battery dynamic info
Output parameters: None。
Related parameters: None。
method setNestBackupBatteryStatusListener
fun setNestBackupBatteryStatusListener(listener: CommonCallbacks.KeyListener<NestBackupBatteryStatusBean>)
Description: Nest backup battery information notification
Input parameters: listener: key listener callback for nest battery backup status
Output parameters: None。
Related parameters: None。
method setNestSystemSelfCheckListener
fun setNestSystemSelfCheckListener(listener: CommonCallbacks.KeyListener<NestSystemSelfCheckBean>)
Description: Nest system self-test message notification
Input parameters: listener: key listener callback nest system self check model
Output parameters: None。
Related parameters: None。
method setNestAutoCommandFinishListener
fun setNestAutoCommandFinishListener(listener: CommonCallbacks.KeyListener<NestAutoCommandFinishBean>)
Description: Autocommand Completion Notification
Input parameters: listener: key listener callback auto command finish
Output parameters: None。
Related parameters: None。
method setNestTransmitBeatListener
fun setNestTransmitBeatListener(listener: CommonCallbacks.KeyListener<NestTransmitBeatBean>)
Description: Video transmission heartbeat notification
Input parameters: listener: key listener callback of transmit beat
Output parameters: None。
Related parameters: None。
method setNestZRodReadyStatusListener
fun setNestZRodReadyStatusListener(listener: CommonCallbacks.KeyListener<Void>)
Description: Z-bar readiness notification
Input parameters: listener: key listener callback Z Rod ready status
Output parameters: None。
Related parameters: None。
method setNestBatteryStaticStatusListener
fun setNestBatteryStaticStatusListener(listener: CommonCallbacks.KeyListener<NestBatteryStaticStatusBean>)
Description: Body battery static information notification
Input parameters: listener:key listener callback battery static status
Output parameters: None。
Related parameters: None。
method initSystemInfoListener
fun initSystemInfoListener()
Description: Initiation system info listen
Input parameters: None。
Output parameters: None。
Related parameters: None。
method setNestSystemRtkInfoListener
fun setNestSystemRtkInfoListener(listener: CommonCallbacks.KeyListener<NestRtkStatusNotifyBean>)
Description: Initialize local Rtk information reporting
Input parameters: None。
Output parameters: None。
Related parameters: None。
method setNestSystemRtkMode
fun setNestSystemRtkMode(
bean: NestRtkModeCommand,
callback: CommonCallbacks.CompletionCallbackWithParam<Void>
)
Description: Nest local RTK mode setting
Input parameters: None。
Output parameters: None。
Related parameters: None。
method setNestMotorDriverStatusListener
fun setNestMotorDriverStatusListener(listener: CommonCallbacks.KeyListener<NestMotorInfo>)
Description: Motor driver board status report
Input parameters: listener: key listener callback motor information
Output parameters: None。
Related parameters: None。
method parseNestStatusInfoBean
private fun parseNestStatusInfoBean(
listener: CommonCallbacks.KeyListener<AutelNestInfo>,
status: NestStatusInfoBean?
)
Description: Parse nest status info bean
Input parameters: listener: key listener callback of autel nest info status: model object of nest status info
Output parameters: None。
Related parameters: None。
method findAutoMode
private fun findAutoMode(state: Int): AutoModeEnum
Description: Finding auto model
Input parameters: state: state defines od auto mode
Output parameters: auto mode enum passes latest one
Related parameters: None。
method findChargeMode
private fun findChargeMode(chargeMode: Int): ChargeModeEnum
Description: Find charging mode
Input parameters: chargeMode: mode
Output parameters: charging mode passing
Related parameters: None。
method parseNestBatteryDynamicStatusBean
private fun parseNestBatteryDynamicStatusBean(
listener: CommonCallbacks.KeyListener<BatteryDynamicInfo>,
oldBean: NestBatteryDynamicStatusBean?,
bean: NestBatteryDynamicStatusBean,
)
Description: Copying model and passing with new model object with callback
Input parameters: listener: key listener callback oldBean: old battery dynamic model bean: new battery dynamic model
Output parameters: None。
Related parameters: None。
method batteryDynamicInfo
private fun batteryDynamicInfo(bean: NestBatteryDynamicStatusBean): BatteryDynamicInfo
Description: Battery dynamic info
Input parameters: bean: nest battery dynamic status
Output parameters: Returning battery dynamic info
Related parameters: None。