Class RemoteControl
- java.lang.Object
-
- com.heisha.heisha_sdk.Component.BaseComponent
-
- com.heisha.heisha_sdk.Component.RemoteControl.RemoteControl
-
public class RemoteControl extends BaseComponent
Remote Control Module- Version:
- 1.0
- Author:
- Wmy
-
-
Constructor Summary
Constructors Constructor Description RemoteControl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cameraModeSwitch()
Switch camera mode to take photos or video.void
cameraTakesAPhoto()
Take a photo.void
cameraTakesAVideo()
Take a video.void
cameraZoomsIn()
Camera zooms in.void
cameraZoomsOut()
Camera zooms out.void
droneJoystickControl(int PITCH, int ROLL, int THR, int YAW)
Operate the joystick of a drone.ConnStatus
getConnectionStatus()
Hygrothermograph
getHygrothermograph()
PowerState
getRCPowerState()
int
getRCUSBCableStatus()
void
hoverTheDrone()
Hover the drone.void
OneClickReturnToHome()
One-click return to home.void
OneClickTakeoff()
One-click Takeoff.void
onOperateReply(ServiceCode code, ServiceResult result)
Called back when feedback is received from the servicevoid
onPost()
Called back when the remote control module status property is reportedvoid
pitchDownGimble()
Pitch down the gimble of drone.void
pitchUpGimble()
Pitch up the gimble of drone.void
RCTurnOff()
Turn off the drone remote control.void
RCTurnOn()
Turn on the drone remote control.void
RCUSBPlugIn()
Plug in the drone remote control USB cable.void
RCUSBPullOut()
Pull out the drone remote control USB cable.void
RePairRCWithDrone()
Re-pair the RC with drone.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.void
setConnectionStatus(ConnStatus connectionStatus)
void
setRCPowerState(PowerState RCPowerState)
void
setRCUSBCableStatus(int RCUSBCableStatus)
void
setStateCallback(RemoteControlStateCallback callback)
Instance of implementing the event callback interface for the remote control module
-
-
-
Method Detail
-
getConnectionStatus
public ConnStatus getConnectionStatus()
-
setConnectionStatus
public void setConnectionStatus(ConnStatus connectionStatus)
-
getHygrothermograph
public Hygrothermograph getHygrothermograph()
-
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 reportedCallbacks from the SDK itself
-
onOperateReply
public void onOperateReply(ServiceCode code, ServiceResult result)
Called back when feedback is received from the serviceCallbacks from the SDK itself
- Parameters:
code
- device service coderesult
- 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
- pitchROLL
- rollTHR
- thrYAW
- 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 voltsbatteryVol
- The temperature of the drone battery in degrees CelsiusremoteState
- Power state of the RCremoteVol
- The voltage of the RC battery in volts
-
-