DJI Mobile SDK Documentation

      class HardwareState

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

      The status of the shutter button and record button on the handheld controller. Used by Osmo Mobile only.

      Class Members:
      method getRecordAndShutterButtons
      RecordAndShutterButtons getRecordAndShutterButtons()
      Package:dji.common.handheld
      SDK Key:HandheldControllerKey.RECORD_AND_SHUTTER_BUTTONS
      Description:

      Status of the shutter button and record button.

      Return:
      RecordAndShutterButtonsA RecordAndShutterButtons enum value.
      Trigger
      method
      method getTriggerButton
      HandheldButtonClickEvent getTriggerButton()
      Package:dji.common.handheld
      SDK Key:HandheldControllerKey.TRIGGER_BUTTON
      Description:

      Status of the trigger button.

      Return:
      HandheldButtonClickEventA HandheldButtonClickEvent enum value.
      method getModeButton
      HandheldButtonClickEvent getModeButton()
      Package:dji.common.handheld
      Description:

      Status of the mode button. It is only supported by Osmo Mobile 2.

      Return:
      HandheldButtonClickEventA HandheldButtonClickEvent enum value.
      method isTriggerBeingPressed
      boolean isTriggerBeingPressed()
      Package:dji.common.handheld
      SDK Key:HandheldControllerKey.IS_TRIGGER_BEING_PRESSED
      Description:

      true when the trigger is being pressed. It is only supported in firmware version 1.2.0.40 or above.

      Return:
      booleanA boolean value.
      method isModeButtonBeingPressed
      boolean isModeButtonBeingPressed()
      Package:dji.common.handheld
      Description:

      true when the mode button is being pressed. It is only supported by OSMO Mobile 2.

      Return:
      booleanA boolean value.
      method getStickVerticalDirection
      StickVerticalDirection getStickVerticalDirection()
      Package:dji.common.handheld
      SDK Key:HandheldControllerKey.STICK_VERTICAL_DIRECTION
      Description:

      Status of the joystick in vertical direction.

      Return:
      StickVerticalDirectionA StickVerticalDirection enum value.
      method getStickHorizontalDirection
      StickHorizontalDirection getStickHorizontalDirection()
      Package:dji.common.handheld
      SDK Key:HandheldControllerKey.STICK_HORIZONTAL_DIRECTION
      Description:

      Status of the joystick in horizontal direction.

      Return:
      StickHorizontalDirectionA StickHorizontalDirection enum value.
      Joystick Position
      method
      method getStick
      Stick getStick()
      Package:dji.common.handheld
      SDK Key:HandheldControllerKey.STICK
      Description:

      Position of the stick in both vertical and horizontal direction. Only supported in firmware version 1.2.0.40 or above.

      Return:
      StickAn object of Stick.
      Zoom Slider
      method
      method getZoomState
      ZoomState getZoomState()
      Package:dji.common.handheld
      Description:

      Status of the zoom slider. It is only supported by Osmo Mobile 2.

      Return:
      ZoomStateAn enum value of ZoomState.
      enum RecordAndShutterButtons
      @EXClassNullAway
      enum RecordAndShutterButtons
      Package:dji.common.handheld
      SDK Key:HandheldControllerKey.RECORD_AND_SHUTTER_BUTTONS
      Description:

      The status of the shutter button and record button on the handheld controller.

      Enum Members:
      IDLENo buttons have been pressed.
      SHUTTER_CLICKOnly the shutter button was pressed and released.
      RECORD_CLICKOnly the record button was pressed and released.
      SHUTTER_LONG_CLICKThe shutter button is being pressed without release.
      UNKNOWNThe button status is unknown.
      Class Members:
      enum HandheldButtonClickEvent
      @EXClassNullAway
      enum HandheldButtonClickEvent
      Package:dji.common.handheld
      SDK Key:HandheldControllerKey.TRIGGER_BUTTON, HandheldControllerKey.MODE_BUTTON
      Description:

      The status of the shutter button and record button on the handheld controller.

      Enum Members:
      IDLETrigger button status is idle.
      SINGLE_CLICKTrigger button is pressed and released.
      DOUBLE_CLICKTrigger button is pressed twice quickly.
      TRIPLE_CLICKTrigger button is pressed three times quickly.
      UNKNOWNTrigger button status is unknown.
      Class Members:
      enum StickVerticalDirection
      @EXClassNullAway
      enum StickVerticalDirection
      Package:dji.common.handheld
      SDK Key:HandheldControllerKey.STICK_VERTICAL_DIRECTION
      Description:

      Status of the handheld joystick in vertical direction.

      Enum Members:
      CENTERJoystick has no movement in the vertical direction.
      UPJoystick is moved up in the vertical direction.
      DOWNJoystick is moved down in the vertical direction.
      UNKNOWNJoystick status in the vertical direction is unknown.
      Class Members:
      enum StickHorizontalDirection
      @EXClassNullAway
      enum StickHorizontalDirection
      Package:dji.common.handheld
      SDK Key:HandheldControllerKey.STICK_HORIZONTAL_DIRECTION
      Description:

      Status of the handheld joystick in horizontal direction.

      Enum Members:
      CENTERJoystick has no movement in the horizontal direction.
      LEFTJoystick is moved left in the horizontal direction.
      RIGHTJoystick is moved right in the horizontal direction.
      UNKNOWNJoystick status in the horizontal direction is unknown.
      Class Members: