Class RemoteControl


  • public class RemoteControl
    extends BaseComponent
    Remote Control Module
    Version:
    1.0
    Author:
    Wmy
    • Constructor Detail

      • RemoteControl

        public RemoteControl()
    • Method Detail

      • getConnectionStatus

        public ConnStatus getConnectionStatus()
      • setConnectionStatus

        public void setConnectionStatus​(ConnStatus connectionStatus)
      • getRCPowerState

        public PowerState getRCPowerState()
      • setRCPowerState

        public void setRCPowerState​(PowerState RCPowerState)
      • getRCUSBCableStatus

        public int getRCUSBCableStatus()
      • setRCUSBCableStatus

        public void setRCUSBCableStatus​(int RCUSBCableStatus)
      • setStateCallback

        public void setStateCallback​(RemoteControlStateCallback callback)
        Instance of implementing the event callback interface for the remote control module
        Parameters:
        callback - Instance of event callback interface for remote control module
      • onPost

        public void onPost()
        Called back when the remote control module status property is reported

        Callbacks from the SDK itself

      • onOperateReply

        public void onOperateReply​(ServiceCode code,
                                   ServiceResult result)
        Called back when feedback is received from the service

        Callbacks from the SDK itself

        Parameters:
        code - device service code
        result - Feedback result off service delivery
      • RCTurnOn

        public void RCTurnOn()
        Turn on the drone remote control.
      • RCTurnOff

        public void RCTurnOff()
        Turn off the drone remote control.
      • RCUSBPlugIn

        public void RCUSBPlugIn()
        Plug in the drone remote control USB cable.
      • RCUSBPullOut

        public void RCUSBPullOut()
        Pull out the drone remote control USB cable.
      • OneClickTakeoff

        public void OneClickTakeoff()
        One-click Takeoff.
      • OneClickReturnToHome

        public void OneClickReturnToHome()
        One-click return to home.
      • droneJoystickControl

        public void droneJoystickControl​(int PITCH,
                                         int ROLL,
                                         int THR,
                                         int YAW)
        Operate the joystick of a drone.
        Parameters:
        PITCH - pitch
        ROLL - roll
        THR - thr
        YAW - yaw
      • hoverTheDrone

        public void hoverTheDrone()
        Hover the drone.
      • cameraModeSwitch

        public void cameraModeSwitch()
        Switch camera mode to take photos or video.
      • cameraTakesAPhoto

        public void cameraTakesAPhoto()
        Take a photo.
      • cameraTakesAVideo

        public void cameraTakesAVideo()
        Take a video.
      • cameraZoomsIn

        public void cameraZoomsIn()
        Camera zooms in.
      • cameraZoomsOut

        public void cameraZoomsOut()
        Camera zooms out.
      • pitchUpGimble

        public void pitchUpGimble()
        Pitch up the gimble of drone.
      • pitchDownGimble

        public void pitchDownGimble()
        Pitch down the gimble of drone.
      • RePairRCWithDrone

        public void RePairRCWithDrone()
        Re-pair the RC with drone.

        Note:Before calling this method, power on the drone and remote control and tighten the charging bars to ensure that the re-pairing is successful.

      • sendUAVNativeData

        public void sendUAVNativeData​(float batteryTem,
                                      float batteryVol,
                                      PowerState remoteState,
                                      float remoteVol)
        Send the native data of the UAV and RC, including the temperature and voltage of the UAV battery, the on-off status of the RC, and the battery voltage of the RC.
        Parameters:
        batteryTem - The voltage of the UAV battery in volts
        batteryVol - The temperature of the drone battery in degrees Celsius
        remoteState - Power state of the RC
        remoteVol - The voltage of the RC battery in volts