DJI Mobile SDK Documentation

      class HardwareState

      @EXClassNullAway
      class HardwareState
      Package:dji.common.remotecontroller
      Description:

      Remote Controller's current state.

      Class Members:
      Sticks
      method
      method getLeftStick
      @Nullable
      Stick getLeftStick()
      Package:dji.common.remotecontroller
      SDK Key:RemoteControllerKey.LEFT_STICK_VALUE
      Description:

      Get left stick.

      Return:
      StickAn instance of Stick.
      method getRightStick
      @Nullable
      Stick getRightStick()
      Package:dji.common.remotecontroller
      SDK Key:RemoteControllerKey.RIGHT_STICK_VALUE
      Description:

      Get right stick.

      Return:
      StickAn instance of Stick.
      Wheels
      method
      method getLeftWheel
      @IntRange(from = -660, to = 660)
      int getLeftWheel()
      Package:dji.common.remotecontroller
      SDK Key:RemoteControllerKey.LEFT_WHEEL
      Description:

      Gimbal Dial's (upper left wheel) value in the range of [-660,660], where 0 is untouched and positive is turned in the clockwise direction.

      Return:
      intGimbal wheel value.
      method getRightWheel
      @Nullable
      RightWheel getRightWheel()
      Package:dji.common.remotecontroller
      SDK Key:RemoteControllerKey.RIGHT_WHEEL
      Description:

      Current state of the upper right wheel on the Remote Controller (Camera Settings Dial).

      Return:
      RightWheelAn instance of RightWheel.
      method getTransformationSwitch
      @Nullable
      TransformationSwitch getTransformationSwitch()
      Package:dji.common.remotecontroller
      SDK Key:RemoteControllerKey.TRANSFORMATION_SWITCH
      Description:

      Current state of the Transformation Switch on the Remote Controller.

      Return:
      TransformationSwitchAn instance of TransformationSwitch.
      method getFlightModeSwitch
      @Nullable
      FlightModeSwitch getFlightModeSwitch()
      Package:dji.common.remotecontroller
      SDK Key:RemoteControllerKey.FLIGHT_MODE_SWITCH_POSITION
      Description:

      Current position of the Flight Mode Switch on the Remote Controller.

      Return:
      FlightModeSwitchAn enum value of FlightModeSwitch
      Buttons
      method
      method getGoHomeButton
      @Nullable
      Button getGoHomeButton()
      Package:dji.common.remotecontroller
      SDK Key:RemoteControllerKey.GO_HOME_BUTTON
      Description:

      Current state of the Return To Home Button.

      Return:
      ButtonAn instance of Button.
      method getRecordButton
      @Nullable
      Button getRecordButton()
      Package:dji.common.remotecontroller
      SDK Key:RemoteControllerKey.RECORD_BUTTON
      Description:

      Current state of the Video Recording Button.

      Return:
      ButtonAn instance of Button.
      method getShutterButton
      @Nullable
      Button getShutterButton()
      Package:dji.common.remotecontroller
      SDK Key:RemoteControllerKey.SHUTTER_BUTTON
      Description:

      Current state of the Shutter Button.

      Return:
      ButtonAn instance of Button.
      method getPlaybackButton
      @Nullable
      Button getPlaybackButton()
      Package:dji.common.remotecontroller
      SDK Key:RemoteControllerKey.PLAYBACK_BUTTON
      Description:

      Current state of the Playback Button. The Playback Button is not supported on Phantom 4 remote controllers.

      Return:
      ButtonAn instance of Button.
      method getPauseButton
      @Nullable
      Button getPauseButton()
      Package:dji.common.remotecontroller
      SDK Key:RemoteControllerKey.PAUSE_BUTTON
      Description:

      Current state of the Pause Button. The Pause button is only supported on Phantom 4 remote controllers.

      Return:
      ButtonAn instance of Button.
      method getC1Button
      @Nullable
      Button getC1Button()
      Package:dji.common.remotecontroller
      SDK Key:RemoteControllerKey.CUSTOM_BUTTON_1
      Description:

      Current state of custom button 1 (left Back Button). It is not supported by remote controllers for Mavic Air or Spark.

      Return:
      ButtonAn instance of Button.
      method getC2Button
      @Nullable
      Button getC2Button()
      Package:dji.common.remotecontroller
      SDK Key:RemoteControllerKey.CUSTOM_BUTTON_2
      Description:

      Current state of custom button 2 (right Back Button).

      Return:
      ButtonAn instance of Button.
      method getC3Button
      @Nullable
      Button getC3Button()
      Package:dji.common.remotecontroller
      Description:

      Current state of custom button 3 (right Front Button). It is only supported by DJI Smart Controller.

      Return:
      ButtonAn instance of Button.
      method getFunctionButton
      @Nullable
      Button getFunctionButton()
      Package:dji.common.remotecontroller
      Description:

      Current state of fn button. It is only supported by remote controllers for Spark or Mavic Air.

      Return:
      ButtonAn instance of Button.
      method getFiveDButton
      @Nullable
      FiveDButton getFiveDButton()
      Package:dji.common.remotecontroller
      SDK Key:RemoteControllerKey.FIVE_D_BUTTON
      Description:

      Current state of the 5D button. The button can be moved up, down, left and right and can be pressed. The 5D button is supported by Mavic Pro and Mavic 2 remote controllers.

      Return:
      FiveDButtonAn instance of FiveDButton.
      interface HardwareStateCallback
      interface HardwareStateCallback
      Package:dji.common.remotecontroller
      Description:

      Callback function that updates the Remote Controller's current hardware state.

      Interface Methods:

      Callback Method

      State
      method
      method onUpdate
      void onUpdate(@NonNull HardwareState hardwareState)
      Package:dji.common.remotecontroller
      Description:

      Callback function that updates the Remote Controller's current hardware state (e.g. the state of the physical buttons and joysticks).

      Input Parameters:
      @NonNull HardwareState hardwareStateCurrent state of the Remote Controller's hardware state.
      enum FlightModeSwitch
      enum FlightModeSwitch
      Package:dji.common.remotecontroller
      SDK Key:RemoteControllerKey.FLIGHT_MODE_SWITCH_POSITION
      Description:

      Remote Controller Flight Mode switch position.

      Enum Members:
      POSITION_ONEPosition One. For all products except Mavic Pro, this is the left most position of the flight mode switch on a remote controller from the perspective of the pilot. For example, on a Phantom 4 remote controller, Position One is labeled "A". For Mavic Pro, Spark and Mavic Air, this is the position that is furthest away from the pilot and labeled "Sport".
      POSITION_TWOPosition Two. For all products except Mavic Pro, this is the middle position of the flight mode switch on a remote controller from the perspective of the pilot. For example, on a Phantom 4 remote controller, Position Two is labeled "S". For Mavic Pro, Spark and Mavic Air, this is the position that is closest to the pilot (the P position).
      POSITION_THREEPosition Three. For all products except Mavic Pro, this is the right most position of the flight mode switch on a remote controller from the perspective of the pilot. For example, on a Phantom 4 remote controller, Position Two is labeled "P". Mavic Pro, Spark or Mavic Air does not have a third position for the flight mode switch.
      Class Members:
      class