class FlightControllerKey
@Keep class FlightControllerKey extends DJIFlightControllerKey
|
| 包: | dji.sdk.keyvalue.key |
| 继承自: | DJIFlightControllerKey |
classSince MSDK 5.0.0
FlightControllerKey
FlightControllerKey提供了一组方法来获取飞控数据、设置飞控参数和设置飞控行为。飞行控制器是一台机载计算机,它将来自飞手的控制信息与传感器信息相结合,用于调节每桨叶的动力,并根据需要进行飞行。此类可以获取飞行姿态、飞行器状态、飞行模式,可进行飞行控制设置、参数获取、指南针和IMU校准等功能。
描述:
FlightControllerKey提供了一组方法来获取飞控数据、设置飞控参数和设置飞控行为。飞行控制器是一台机载计算机,它将来自飞手的控制信息与传感器信息相结合,用于调节每桨叶的动力,并根据需要进行飞行。此类可以获取飞行姿态、飞行器状态、飞行模式,可进行飞行控制设置、参数获取、指南针和IMU校准等功能。
MSDK 5.0.0开始支持
成员
83 个成员方法
83没有匹配的成员,请尝试更短的关键词。
基础信息
method
KeyConnection
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyConnection = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"Connection", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Boolean
true表示飞控已连接。
method
KeyIsFlying
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyIsFlying = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsFlying", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
true表示飞行器在飞行中。
method
KeyFlightTimeInSeconds
Since MSDK 5.0.0
static final DJIKeyInfo<Integer> KeyFlightTimeInSeconds = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"FlightTimeInSeconds", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
自飞行器电机起转以来累计的飞行时间,单位:0.1秒。该数值在电池重新上电后才会清零。
method
KeyAircraftTotalFlightDuration
static final DJIKeyInfo<Double> KeyAircraftTotalFlightDuration = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AircraftTotalFlightDuration", SingleValueConverter.DoubleConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
总体飞行时长,单位:秒。飞行器断电后不会清零。
method
KeyAircraftTotalFlightDistance
static final DJIKeyInfo<Double> KeyAircraftTotalFlightDistance = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AircraftTotalFlightDistance", SingleValueConverter.DoubleConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
总体飞行距离,单位:米。飞行器断电后不会清零。
method
KeyAircraftTotalFlightTimes
static final DJIKeyInfo<Integer> KeyAircraftTotalFlightTimes = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AircraftTotalFlightTimes", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
总体飞行次数,飞行器断电后不会清零。
method
KeyAircraftLocation3D
Since MSDK 5.0.0
static final DJIKeyInfo<LocationCoordinate3D> KeyAircraftLocation3D = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AircraftLocation3D", new DJIValueConverter<>(LocationCoordinate3D.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: LocationCoordinate3D
获取飞行器的位置,包括经纬度和高度。
method
KeyAircraftAttitude
Since MSDK 5.0.0
static final DJIKeyInfo<Attitude> KeyAircraftAttitude = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AircraftAttitude", new DJIValueConverter<>(Attitude.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("Attitude")
|
参数: Attitude
飞行器当前姿态数据。俯仰、横滚和偏航值的范围:[-180,180]。如果其俯仰、横滚和偏航值为0,则表示飞行器将以正北方向水平悬停。
method
KeyAircraftVelocity
Since MSDK 5.0.0
static final DJIKeyInfo<Velocity3D> KeyAircraftVelocity = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AircraftVelocity", new DJIValueConverter<>(Velocity3D.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("Velocity")
|
参数: Velocity3D
飞行器当前飞行速度,使用北东地(NED)坐标系。
method
KeyTakeoffLocationAltitude
Since MSDK 5.0.0
static final DJIKeyInfo<Double> KeyTakeoffLocationAltitude = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"TakeoffLocationAltitude", SingleValueConverter.DoubleConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Double
飞行器起飞时的海拔高度,单位为米。
method
KeyFlightLogIndex
Since MSDK 5.0.0
static final DJIKeyInfo<Integer> KeyFlightLogIndex = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"FlightLogIndex", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Integer
获取当前飞行日志的索引,当需要查找相应的飞行日志时非常有用。
method
KeySerialNumber
Since MSDK 5.0.0
static final DJIKeyInfo<String> KeySerialNumber = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"SerialNumber", SingleValueConverter.StringConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: String
获取飞控序列号。
method
KeyFirmwareVersion
Since MSDK 5.0.0
static final DJIKeyInfo<String> KeyFirmwareVersion = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"FirmwareVersion", SingleValueConverter.StringConverter).canGet(true).canSet(false).canListen(false).canPerformAction(false).setIsEvent(false)
|
参数: String
获取飞控固件版本。
传感器
method
KeyGPSSatelliteCount
Since MSDK 5.0.0
static final DJIKeyInfo<Integer> KeyGPSSatelliteCount = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GPSSatelliteCount", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("SatelliteCount")
|
参数: Integer
获取GPS卫星个数。通常在高空飞行能达到12颗星以上,时段良好时能达到18~19颗。
method
KeyGPSSignalLevel
Since MSDK 5.0.0
static final DJIKeyInfo<GPSSignalLevel> KeyGPSSignalLevel = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GPSSignalLevel", new SingleValueConverter<>(GPSSignalLevel.class,FCGPSSignalLevelMsg.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: GPSSignalLevel
获取GPS信号等级。
method
KeyCompassCount
Since MSDK 5.0.0
static final DJIKeyInfo<Integer> KeyCompassCount = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"CompassCount", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Integer
获取指南针个数。
method
KeyCompassHeading
Since MSDK 5.0.0
static final DJIKeyInfo<Double> KeyCompassHeading = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"CompassHeading", SingleValueConverter.DoubleConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Double
获取指南针朝向,单位:度。正北为0度,正东为90度,范围:[-180,180]。
method
KeyCompassHasError
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyCompassHasError = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"CompassHasError", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Boolean
true表示指南针数据错误。当飞行器在强干扰或磁场区域使用时,可能出现指南针数据错误。你需要调用KeyStartCompassCalibration进行指南针校准。
method
KeyStopCompassCalibration
Since MSDK 5.0.0
static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStopCompassCalibration = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StopCompassCalibration", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
停止指南针校准。
method
KeyIsCompassCalibrating
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyIsCompassCalibrating = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsCompassCalibrating", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Boolean
true表示正在进行指南针校准。
method
KeyCompassCalibrationStatus
Since MSDK 5.0.0
static final DJIKeyInfo<CompassCalibrationState> KeyCompassCalibrationStatus = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"CompassCalibrationStatus", new SingleValueConverter<>(CompassCalibrationState.class,FCCompassCalibrationStateMsg.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("CompassCalibrationState")
|
参数: CompassCalibrationState
获取指南针校准状态。
method
KeyIMUCount
Since MSDK 5.0.0
static final DJIKeyInfo<Integer> KeyIMUCount = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IMUCount", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Integer
获取IMU个数。
method
KeyIMUCalibrationInfo
Since MSDK 5.1.0
static final DJIKeyInfo<IMUCalibrationInfo> KeyIMUCalibrationInfo = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IMUCalibrationInfo", new DJIValueConverter<>(IMUCalibrationInfo.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("IMUCalibrationHint")
|
参数: IMUCalibrationInfo
获取IMU校准信息。IMU校准包含多个飞机方向的IMU校准,IMU校准信息包括IMU总体校准状态,每个飞机方向的校准状态以及未校准的飞行方向列表和已校准飞机方向列表。
method
KeyUltrasonicHeight
Since MSDK 5.0.0
static final DJIKeyInfo<Integer> KeyUltrasonicHeight = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"UltrasonicHeight", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Integer
获取超声波测距高度,单位:分米。该高度为飞机起飞后,从上往下测量的距离。通常会融合气压计高度,让数据更加准确。
注意
1. 此高度的最大可测距离通常为25.5米,根据飞机实际能力而定。
2. 如果飞行器自带下视传感器,此高度还会融合下视传感器测距高度。
3. 如果飞行器自带红外传感器,此高度还会融合红外传感器测距高度。
method
KeyWindWarning
Since MSDK 5.0.0
static final DJIKeyInfo<WindWarning> KeyWindWarning = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"WindWarning", new SingleValueConverter<>(WindWarning.class,FCWindWarningMsg.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: WindWarning
获取当前风速等级。
method
KeyWindSpeed
Since MSDK 5.0.0
static final DJIKeyInfo<Integer> KeyWindSpeed = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"WindSpeed", SingleValueConverter.IntegerConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Integer
获取当前风速,单位:dm/s。
method
KeyWindDirection
Since MSDK 5.0.0
static final DJIKeyInfo<WindDirection> KeyWindDirection = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"WindDirection", new SingleValueConverter<>(WindDirection.class,FCWindDirectionStatusMsg.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: WindDirection
获取当前风向,采用世界坐标系。
基本设置
method
KeyMultipleFlightModeEnabled
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyMultipleFlightModeEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"MultipleFlightModeEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Boolean
true表示允许切换飞行器的飞行模式。用户可以通过拨动遥控器上的三段选择开关将飞行器的飞行模式KeyFlightMode设置为T三脚架、A姿态、P(N)定位、S运动模式。 如果设置为false,飞行器将一直处于P(N)定位模式,不可被更改。
method
KeyRemoteControllerFlightMode
Since MSDK 5.0.0
static final DJIKeyInfo<RemoteControllerFlightMode> KeyRemoteControllerFlightMode = new KeyRemoteControllerFlightMode().canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: RemoteControllerFlightMode
获取遥控器档位模式。
method
KeyFlightMode
Since MSDK 5.1.0
static final DJIKeyInfo<FlightMode> KeyFlightMode = new KeyFlightMode().canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: FlightMode
获取飞行器的飞行模式。
method
KeyIsFailSafe
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyIsFailSafe = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsFailSafe", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Boolean
true表示飞行器失控中,即将进行失控行为。
method
KeyFailsafeAction
Since MSDK 5.0.0
static final DJIKeyInfo<FailsafeAction> KeyFailsafeAction = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"FailsafeAction", new SingleValueConverter<>(FailsafeAction.class,FCFailsafeActionMsg.class)).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: FailsafeAction
设置和获取失控行为。当遥控器和飞行器失去连接的时候,飞行器将按照设置的失控行为进行操作。
method
KeyLowBatteryWarningThreshold
Since MSDK 5.0.0
static final DJIKeyInfo<Integer> KeyLowBatteryWarningThreshold = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"LowBatteryWarningThreshold", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Integer
设置和获取电池低电量警告的阈值。该数值为百分比,范围:[15,50]。当电池电量低于该阀值时,飞行器将进行低电量报警。
method
KeyIsLowBatteryWarning
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyIsLowBatteryWarning = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsLowBatteryWarning", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Boolean
true表示当前电池处于低电量状态。
method
KeySeriousLowBatteryWarningThreshold
Since MSDK 5.0.0
static final DJIKeyInfo<Integer> KeySeriousLowBatteryWarningThreshold = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"SeriousLowBatteryWarningThreshold", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Integer
获取电池严重低电量警告的阈值。该值默认为10%,Matrice 30 Series不可设置。当电池电量低于该阀值时,飞行器将进行返航操作。
method
KeyIsSeriousLowBatteryWarning
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyIsSeriousLowBatteryWarning = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsSeriousLowBatteryWarning", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Boolean
true表示当前电池处于严重低电量状态。
method
KeyLEDsSettings
Since MSDK 5.0.0
static final DJIKeyInfo<LEDsSettings> KeyLEDsSettings = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"LEDsSettings", new DJIValueConverter<>(LEDsSettings.class)).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: LEDsSettings
LED相关设置。支持前臂灯、状态指示灯、夜航灯的设置。
method
KeyAreMotorsOn
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyAreMotorsOn = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AreMotorsOn", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Boolean
true表示电机起转。
method
KeyLockMotors
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyLockMotors = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"LockMotors", SingleValueConverter.BooleanConverter).canGet(false).canSet(true).canListen(false).canPerformAction(false).setIsEvent(false)
|
参数: Boolean
true表示锁住电机,掰杆后电机将不会转动。
method
KeyESCBeepEnabled
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyESCBeepEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"ESCBeepEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Boolean
true表示开启电调鸣叫功能。当飞行器不慎失联,可开启此功能,通过声音辨别飞行器方位。如果当前电机已起转,请停转电机再试。
method
KeyCoordinatedTurnEnabled
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyCoordinatedTurnEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"CoordinatedTurnEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Boolean
true表示开启协调转弯功能。飞行器转弯时机头跟随飞行方向,没有侧滑的飞行,飞行阻力更小。
method
KeyNavigationSatelliteSystemSource
Since MSDK 5.0.0
static final DJIKeyInfo<NavigationSatelliteSystem> KeyNavigationSatelliteSystemSource = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"NavigationSatelliteSystemSource", new SingleValueConverter<>(NavigationSatelliteSystem.class,NavigationSatelliteSystemMsg.class)).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: NavigationSatelliteSystem
设置使用的卫星定位系统,仅在RTK定位功能关闭下支持设置卫星定位系统,飞行器在空中无法进行修改。切换卫星定位系统后,请确认卫星信号LEVEL_3以上再起飞。如果你开启了RTK定位功能,飞控会同时使用GPS、GLONASS、Galileo和北斗卫星定位系统。
method
KeyStartMultiGimbalSyncControl
Since MSDK 5.2.0
static final DJIActionKeyInfo<MultiGimbalSyncControlInfo,EmptyMsg> KeyStartMultiGimbalSyncControl = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StartMultiGimbalSyncControl", new DJIValueConverter<>(MultiGimbalSyncControlInfo.class),EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
参数: MultiGimbalSyncControlInfo
开启多云台联动控制。可以通过一个遥控器同时控制多个云台,请确保设置的云台已经挂载到飞行器上, 此接口适用于可以挂载多个云台的飞行器,比如M300 RTK和M350 RTK。
method
KeyStopMultiGimbalSyncControl
Since MSDK 5.2.0
static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStopMultiGimbalSyncControl = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StopMultiGimbalSyncControl", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
停止多云台联动控制。
method
KeyMultiGimbalSyncStatus
Since MSDK 5.2.0
static final DJIKeyInfo<MultiGimbalSyncStatus> KeyMultiGimbalSyncStatus = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"MultiGimbalSyncStatus", new DJIValueConverter<>(MultiGimbalSyncStatus.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: MultiGimbalSyncStatus
获取多云台联动控制状态。
method
KeyPropellerRotation
Since MSDK 5.15.0
static final DJIActionKeyInfo<PropellerRotationCommand,PropellerRotationCommandResult> KeyPropellerRotation = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"PropellerRotation", new SingleValueConverter<>(PropellerRotationCommand.class,PropellerRotationCommandMsg.class),new DJIValueConverter<>(PropellerRotationCommandResult.class)).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
Parameter: Boolean
飞机支持慢转桨功能。
注意
目前只有M400机型支持该接口,但不支持LOW_SPEED_REVERSE_ROTATION,所以飞机慢转桨当前只支持一个方向。
基本操作
method
KeyStartTakeoff
Since MSDK 5.0.0
static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStartTakeoff = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StartTakeoff", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
启动飞行器自主起飞。当飞行器悬停在离地面1.2米(4英尺)的高度时表示起飞完成。如果电机已经开启,将无法执行此命令。
method
KeyStopTakeoff
Since MSDK 5.0.0
static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStopTakeoff = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StopTakeoff", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
停止飞行器自主起飞。如果在自主起飞完成之前调用此接口,飞行器将取消起飞并悬停在当前高度。如果已经自主起飞已经完成,将无法执行此命令。
method
KeyStartAutoLanding
Since MSDK 5.0.0
static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStartAutoLanding = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StartAutoLanding", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
启动飞行器自主降落。
method
KeyStopAutoLanding
Since MSDK 5.0.0
static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStopAutoLanding = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StopAutoLanding", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
停止飞行器自主降落。如果在自主降落过程中调用此接口,飞行器将会停止自主降落,并且悬停在当前位置。
method
KeyIsLandingConfirmationNeeded
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyIsLandingConfirmationNeeded = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsLandingConfirmationNeeded", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Boolean
true表示飞行器降落到离地0.5米的时候,需要发送强制降落指令KeyConfirmLanding才能继续降落着陆。
method
KeyConfirmLanding
Since MSDK 5.0.0
static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyConfirmLanding = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"ConfirmLanding", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
确认继续降落着陆。当飞行器与地面的距离小于0.7m时,飞行器将暂停着陆,等待用户确认。 可以通过KeyIsLandingConfirmationNeeded来检查是否需要确认降落。
method
KeyRebootDevice
Since MSDK 5.0.0
static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyRebootDevice = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"RebootDevice", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
重启飞行器的核心设备。建议在IMU校准后调用此方法。
method
KeyLookAt
Since MSDK 5.9.0
static final DJIActionKeyInfo<LookAtInfo, EmptyMsg> KeyLookAt = new KeyLookAt().canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
参数: LookAtInfo
看向目标点。可设置Pin点位置,让飞行器看向目标点。
method
KeyHeightLimitRange
Since MSDK 5.0.0
static final DJIKeyInfo<IntValueConfig> KeyHeightLimitRange = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"HeightLimitRange", new DJIValueConverter<>(IntValueConfig.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: IntValueConfig
获取限高设置范围,单位:米。
method
KeyHeightLimit
Since MSDK 5.0.0
static final DJIKeyInfo<Integer> KeyHeightLimit = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"HeightLimit", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Integer
设置飞行器的最大飞行高度。单位:米。可通过KeyHeightLimitRange获取设置范围。
method
KeyIsNearHeightLimit
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyIsNearHeightLimit = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsNearHeightLimit", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Boolean
true表示飞行器已达到最大飞行高度。
method
KeyDistanceLimitEnabled
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyDistanceLimitEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"DistanceLimitEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Boolean
true表示开启限远开关。开启此开关后,你可以通过KeyDistanceLimit设置飞行器的最大飞行距离。
method
KeyDistanceLimitRange
Since MSDK 5.0.0
static final DJIKeyInfo<IntValueConfig> KeyDistanceLimitRange = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"DistanceLimitRange", new DJIValueConverter<>(IntValueConfig.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: IntValueConfig
获取限远设置范围,单位:米。
method
KeyDistanceLimit
Since MSDK 5.0.0
static final DJIKeyInfo<Integer> KeyDistanceLimit = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"DistanceLimit", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Integer
设置飞行器的最大飞行距离。单位:米。此距离是飞行器与返航点之间的距离。可通过KeyDistanceLimitRange获取设置范围。
method
KeyIsNearDistanceLimit
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyIsNearDistanceLimit = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsNearDistanceLimit", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Boolean
true表示飞行器已达到最大飞行距离。
返航功能
method
KeyIsHomeLocationSet
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyIsHomeLocationSet = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"IsHomeLocationSet", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Boolean
true表示返航点已设置。当GPS信号良好时,飞行器会自动把当前飞行器位置设置为返航点,此时KeyIsHomeLocationSet将返回true。
method
KeyHomeLocation
Since MSDK 5.0.0
static final DJIKeyInfo<LocationCoordinate2D> KeyHomeLocation = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"HomeLocation", new DJIValueConverter<>(LocationCoordinate2D.class)).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: LocationCoordinate2D
设置和获取当前返航点的位置,包括经纬度。当GPS信号良好时,飞行器会自动把当前飞行器位置设置为返航点,你也可以使用这个key改变返航点位置。
method
KeyGoHomeHeight
Since MSDK 5.0.0
static final DJIKeyInfo<Integer> KeyGoHomeHeight = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GoHomeHeight", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Integer
设置和获取返航时的相对高度,单位:米。此相对高度是相对于起飞时的高度。可通过KeyGoHomeHeightRange获取返航高度设置范围。
如果飞行器水平距离返航点50米内,飞行器将忽略设置的返航高度,以飞行器当前高度返航。如果此时前视视觉系统未正常工作,飞行器将上升到预设的高度进行返航。
method
KeyGoHomeHeightRange
Since MSDK 5.0.0
static final DJIKeyInfo<IntValueConfig> KeyGoHomeHeightRange = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GoHomeHeightRange", new DJIValueConverter<>(IntValueConfig.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: IntValueConfig
获取返航高度设置范围,单位:米。
method
KeyHomeLocationUsingCurrentAircraftLocation
Since MSDK 5.0.0
static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyHomeLocationUsingCurrentAircraftLocation = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"HomeLocationUsingCurrentAircraftLocation", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
将飞行器的当前位置设置为返航点位置。
method
KeyStartGoHome
Since MSDK 5.0.0
static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStartGoHome = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StartGoHome", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
启动智能返航。当GPS信号不好的时候,不可启动智能返航功能。 你也可以通过遥控器智能返航按键启动智能返航,返航过程用户可通过油门杆控制飞行器高度和俯仰杆控制飞行器速度以躲避障碍物。返航过程中,通过遥控器上的智能返航按键或者调用KeyStopGoHome退出智能返航后,用户可重新获得飞行器控制权。你可以通过KeyGoHomeStatus获取智能返航状态。
method
KeyStopGoHome
Since MSDK 5.0.0
static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyStopGoHome = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"StopGoHome", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
停止智能返航。
method
KeyGoHomeStatus
Since MSDK 5.0.0
static final DJIKeyInfo<GoHomeState> KeyGoHomeStatus = new KeyGoHomeStatus().canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: GoHomeState
获取智能返航状态。
method
KeyGoHomeInfo
Since MSDK 5.12.0
static final DJIKeyInfo<GoHomeInfo> KeyGoHomeInfo = new KeyGoHomeInfo().canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: GoHomeInfo
获取智能返航相关信息。当获取到的getType状态为NORMAL时,你需要调用KeyGoHomeConfirm接口确认或者取消返航操作。
method
KeyGoHomeConfirm
Since MSDK 5.12.0
static final DJIActionKeyInfo<Boolean, EmptyMsg> KeyGoHomeConfirm = new KeyGoHomeConfirm().canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
参数: Boolean
确认或者取消返航操作。当调用KeyGoHomeInfo获取到的getType状态为NORMAL时,你需要调用此接口确认或者取消返航操作。 true表示确认返航。false表示取消返航。
method
KeyLowBatteryRTHEnabled
Since MSDK 5.0.0
static final DJIKeyInfo<Boolean> KeyLowBatteryRTHEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"LowBatteryRTHEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("SmartBatteryRTHEnabled")
|
参数: Boolean
true表示开启智能低电量返航功能。为防止因电池电量不足而出现不必要的危险,飞行器将会根据飞行的位置信息,智能地判断当前电量是否充足。若当前电量仅够完成返航过程,MSDK将提示是否需要执行返航。若用户在10秒内不作选择,则10秒后飞行器将自动进入返航。返航过程中可短按遥控器智能返航按键取消返航过程。智能低电量返航在同一次飞行过程中仅出现一次。如果用户取消低电量返航提醒并继续飞行,将可能导致飞行器返回时电量不足而迫降,造成飞行器丢失或坠毁。为了安全起见,不建议关闭此功能。
method
KeyLowBatteryRTHInfo
Since MSDK 5.0.0
static final DJIKeyInfo<LowBatteryRTHInfo> KeyLowBatteryRTHInfo = new KeyLowBatteryRTHInfo().canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: LowBatteryRTHInfo
获取智能低电量返航相关信息。仅在KeyLowBatteryRTHEnabled开启后有效。
method
KeyLowBatteryRTHConfirm
Since MSDK 5.8.0
static final DJIActionKeyInfo<Boolean, EmptyMsg> KeyLowBatteryRTHConfirm = new KeyLowBatteryRTHConfirm().canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
参数: Boolean
确认或者取消返航操作。当调用KeyLowBatteryRTHInfo获取到的状态为COUNTING_DOWN时,你可以调用此接口确认或者取消返航操作。 true表示确认返航。false表示取消返航。
安全密码
method
KeyAccessLockerAllDeviceStatus
Since MSDK 5.1.0
static final DJIKeyInfo<List<AccessLockerDeviceStatus>> KeyAccessLockerAllDeviceStatus = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AccessLockerAllDeviceStatus", new SingleValueConverter<>((Class)List.class,AccessLockerV1AllDeviceStates.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("AccessLockerV1AllDeviceStates")
|
参数: List<AccessLockerDeviceStatus>
获取存储设备的安全密码状态。可通过此接口获取飞行器上的存储设备是否支持安全密码功能,是否开启安全密码功能以及是否需要验证安全密码。
安全密码是为了保护您的媒体数据安全。设置安全密码后,MSDK App连接飞行器后需要进行密码校验,验证通过后才可以进行拍照录像以及读写存储设备中的媒体数据。
getIsFeatureSupported为true,表示该存储设备支持安全密码功能。你可以调用KeyAccessLockerSetSecurityCode设置安全密码。 getIsFeatureEnabled为true,表示该存储设备的安全密码功能已开启。你可以调用KeyAccessLockerModifySecurityCode进行安全密码修改。如果你忘记了安全密码,你可以调用KeyAccessLockerResetSecurityCode重置安全密码。 getIsFeatureNeedToBeVerified为true,表示该存储设备需要验证安全密码。请调用KeyAccessLockerVerifySecurityCode进行安全密码验证,否则将无法进行拍照录像,并且无法读写存储设备中的媒体数据。当飞行器重启或者存储设备拔插后通常需要验证安全密码。 DJI不会在设备上存储用户密码,也不会回传DJI。 用户忘记密码后,不支持找回密码。如您不慎遗失安全密码,只能通过格式化的方式来解锁存储设备。 安全密码仅支持禅思H20系列相机,M30系列机型相机及Mavic 3行业系列相机,暂不支持禅思 P1、禅思 L1以及其他第三方负载。
MSDK 5.1.0开始支持
method
KeyAccessLockerSetSecurityCode
Since MSDK 5.1.0
static final DJIActionKeyInfo<AccessLockerSetSecurityCodeInfo,EmptyMsg> KeyAccessLockerSetSecurityCode = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"AccessLockerSetSecurityCode", new DJIValueConverter<>(AccessLockerSetSecurityCodeInfo.class),EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false).setInnerIdentifier("AccessLockerV1SetupUserAccount")
|
参数: AccessLockerSetSecurityCodeInfo
设置安全密码。可通过此接口选择设备和存储类型进行安全密码设置。
设置安全密码后存储设备将被格式化,请确认媒体数据已备份。 请妥善保管安全密码,遗失后将无法找回,只能通过格式化的方式来解锁存储设备。 你设置的密码长度需要至少4位,建议使用数字,大写、小写字母组成密码。
MSDK 5.1.0开始支持
method
KeyAccessLockerVerifySecurityCode
Since MSDK 5.1.0
static final DJIActionKeyInfo<AccessLockerVerifySecurityCodeInfo,EmptyMsg> KeyAccessLockerVerifySecurityCode = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"AccessLockerVerifySecurityCode", new DJIValueConverter<>(AccessLockerVerifySecurityCodeInfo.class),EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false).setInnerIdentifier("AccessLockerV1VerifyUserAccount")
|
参数: AccessLockerVerifySecurityCodeInfo
校验安全密码。可通过此接口校验安全密码,验证通过后才可以进行拍照录像以及读写存储设备中的媒体数据。
method
KeyAccessLockerModifySecurityCode
Since MSDK 5.1.0
static final DJIActionKeyInfo<AccessLockerModifySecurityCodeInfo,EmptyMsg> KeyAccessLockerModifySecurityCode = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"AccessLockerModifySecurityCode", new DJIValueConverter<>(AccessLockerModifySecurityCodeInfo.class),EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false).setInnerIdentifier("AccessLockerV1ModifyUserAccount")
|
参数: AccessLockerModifySecurityCodeInfo
修改安全密码。
method
KeyAccessLockerResetSecurityCode
Since MSDK 5.1.0
static final DJIActionKeyInfo<AccessLockerResetSecurityCodeInfo,EmptyMsg> KeyAccessLockerResetSecurityCode = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"AccessLockerResetSecurityCode", new DJIValueConverter<>(AccessLockerResetSecurityCodeInfo.class),EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false).setInnerIdentifier("AccessLockerV1ResetUserAccount")
|
参数: AccessLockerResetSecurityCodeInfo
重置安全密码。重置安全密码将会格式化存储设备,请确认媒体数据已备份。
AirSense
method
KeyAirSenseSystemSupported
Since MSDK 5.9.0
static final DJIKeyInfo<Boolean> KeyAirSenseSystemSupported = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"AirSenseSystemSupported", SingleValueConverter.BooleanConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
参数: Boolean
是否支持DJI AirSense 系统。