DJI Mobile SDK Documentation

class VisionWidget

class VisionWidget extends FrameLayoutWidget
Package:dji.ux.widget
Inherits From:FrameLayoutWidget
Display:

uilib_image

Widget has two visual states to show if Visual Positioning is being used.

  • White icon indicates Visual Positioning is being used.
  • Red icon indicates Visual Positioning is not being used.
Usage:

Preferred Aspect Ratio: 1:1.

Class Members:
method onIsVisionUsedChange
@MainThread
@Keep
void onIsVisionUsedChange(VisionSystemStatus visionSystemStatus,
AvoidanceSensorStatus avoidanceSensorStatus)
Package:dji.ux.widget
Description:

Triggers when the vision detection state changes

Input Parameters:
VisionSystemStatus visionSystemStatusThe status of the vision system. NORMAL means the vision system is working and being used by flight controller. DISABLED or CLOSED means the vision sensor is not used.
AvoidanceSensorStatus avoidanceSensorStatusThe status of the omnidirectional obstacle avoidance sensors. ALL means all sensors are working. FRONT_BACK means only the front and back sensors are working. NONE or CLOSED means the avoidance sensors are not used.
enum VisionSystemStatus
enum VisionSystemStatus
Package:dji.ux.widget
Description:

The status of the vision system.

Enum Members:
CLOSEDUser avoidance is disabled by the user.
DISABLEDThe vision system is disabled. This could be due to the flight mode, tap mode, tracking mode, or draw status.
NORMALThe vision system is functioning normally.
Class Members:
enum AvoidanceSensorStatus
enum AvoidanceSensorStatus
Package:dji.ux.widget
Description:

The status of the omnidirectional obstacle avoidance sensors.

Enum Members:
ALLAll vision systems are available.
FRONT_BACKOnly forward and backward vision systems are available. Left and right vision systems are only available in ActiveTrack mode and Tripod Mode.
NONEVision systems are not available. This could be due to the flight mode or hardware failure.
CLOSEDObstacle avoidance is disabled by the user.
Class Members: