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 getLeftDial
      @IntRange(from = -660, to = 660)
      int getLeftDial()
      Package:dji.common.remotecontroller
      SDK Key:LEFT_WHEEL
      Description:

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

      Return:
      intGimbal dial value.
      method getRightDial
      @Nullable
      RightDial getRightDial()
      Package:dji.common.remotecontroller
      SDK Key:RIGHT_WHEEL
      Description:

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

      Return:
      RightDialAn instance of RightDial.
      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 getPhotoAndVideoToggleButton
      Button getPhotoAndVideoToggleButton()
      Package:dji.common.remotecontroller
      Description:

      Current state of the Photo and Video Toggle Button.

      Return:
      ButtonAn instance of Button.
      method getShootPhotoAndRecordButton
      Button getShootPhotoAndRecordButton()
      Package:dji.common.remotecontroller
      Description:

      Current state of the Photo and Record 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). For Mavic Air 2 and DJI Air 2S, There is no custom button 1, we use Fn button instead, one click on Fn button represents custom button 1. 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). For Mavic Air 2 and DJI Air 2S, There is no custom button 2, we use Fn button instead, double clicks on Fn button represents custom button 2.

      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.
      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