class GimbalKey
@Keep class GimbalKey extends DJIGimbalKey
|
| 包: | dji.sdk.keyvalue.key |
| 继承自: | DJIGimbalKey |
描述:
GimbalKey提供了一组方法来设置和获取云台数据。包括获取云台姿态数据、控制云台转动、以及云台的相关参数设置。
MSDK 5.0.0开始支持
类成员:
基础信息
final KeyConnection
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表示云台已连接。
MSDK 5.0.0开始支持
final KeyFirmwareVersion
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
获取云台固件版本。
MSDK 5.0.0开始支持
final KeyGimbalAttitude
static final DJIKeyInfo<Attitude> KeyGimbalAttitude = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GimbalAttitude", new DJIValueConverter<>(Attitude.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
描述:
参数: Attitude
获取云台姿态数据。其中偏航角度使用的是北东地坐标系,如需要获取云台相对于飞行器机头朝向的偏航角度,请调用KeyYawRelativeToAircraftHeading获取。
MSDK 5.0.0开始支持
final KeyYawRelativeToAircraftHeading
static final DJIKeyInfo<Double> KeyYawRelativeToAircraftHeading = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"YawRelativeToAircraftHeading", SingleValueConverter.DoubleConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("YawRelativeToBodyHeading")
|
描述:
参数: Double
获取云台相对于飞行器机头朝向的偏航角度。
MSDK 5.0.0开始支持
基本操作
final KeyGimbalMode
static final DJIKeyInfo<GimbalMode> KeyGimbalMode = new KeyGimbalMode().canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
描述:
参数: GimbalMode
设置云台模式。
MSDK 5.0.0开始支持
final KeyRotateByAngle
static final DJIActionKeyInfo<GimbalAngleRotation,EmptyMsg> KeyRotateByAngle = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"RotateByAngle", new DJIValueConverter<>(GimbalAngleRotation.class),EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
描述:
参数: GimbalAngleRotation
用角度模式旋转云台的俯仰角度、横滚角度和偏航角度。支持相对角度模式和绝对角度模式。
注意:
不同的云台负载的可控制角度不一样,以下提供了一种方法获取云台的最大最小限位角度:请通过遥控器的滚轮控制云台到俯仰,横滚和偏航的最大最小限位,然后调用KeyGimbalAttitude即可获取到该云台的可调限位角度。
MSDK 5.0.0开始支持
final KeyRotateBySpeed
static final DJIActionKeyInfo<GimbalSpeedRotation,EmptyMsg> KeyRotateBySpeed = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"RotateBySpeed", new DJIValueConverter<>(GimbalSpeedRotation.class),EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
描述:
参数: GimbalSpeedRotation
用速度模式旋转云台的俯仰角度、横滚角度和偏航角度。单位:0.1度/秒,范围:[-359.9, 359.9]。设置的值越大,单位时间转动的角度越大,设置频率和链路信号强弱会对最终转动角度造成偏差。
MSDK 5.0.0开始支持
final KeyGimbalReset
static final DJIActionKeyInfo<GimbalResetType,EmptyMsg> KeyGimbalReset = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"GimbalReset", new SingleValueConverter<>(GimbalResetType.class,GimbalResetCommandMsg.class),EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false).setInnerIdentifier("ResetGimbal")
|
描述:
参数: GimbalResetType
云台重置,可以通过设置GimbalResetType让俯仰轴,偏航轴和横滚轴回中或者朝下。
MSDK 5.0.0开始支持
final KeyFineTunePitchInDegrees
static final DJIActionKeyInfo<Double,EmptyMsg> KeyFineTunePitchInDegrees = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"FineTunePitchInDegrees", SingleValueConverter.DoubleConverter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
描述:
参数: Double
云台俯仰轴可以通过自定义偏移量进行微调。当云台回中后仍然有小角度偏移,可用此功能进行云台调平。单次可微调的范围是[-2.0, 2.0],单位:度,总共可微调的范围是[-10.0, 10.0],单位:度, 如果偏移量为负数,云台将在逆时针方向微调指定的度数。可通过KeyFineTunePitchTotalDegree获取总共微调的偏移量。
MSDK 5.0.0开始支持
final KeyFineTuneYawInDegrees
static final DJIActionKeyInfo<Double,EmptyMsg> KeyFineTuneYawInDegrees = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"FineTuneYawInDegrees", SingleValueConverter.DoubleConverter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
描述:
参数: Double
云台偏航轴可以通过自定义偏移量进行微调。当云台回中后仍然有小角度偏移,可用此功能进行云台微调,使得云台水平居中。单次可微调的范围是[-2.0, 2.0],单位:度,总共可微调的范围是[-10.0, 10.0],单位:度, 如果偏移量为负数,云台将在逆时针方向微调指定的度数。可通过KeyFineTuneYawTotalDegree获取总共微调的偏移量。
MSDK 5.0.0开始支持
final KeyFineTuneRollInDegrees
static final DJIActionKeyInfo<Double,EmptyMsg> KeyFineTuneRollInDegrees = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"FineTuneRollInDegrees", SingleValueConverter.DoubleConverter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
描述:
参数: Double
云台横滚轴可以通过自定义偏移量进行微调。当云台回中后仍然有小角度偏移,可用此功能进行云台调平,使得云台水平居中。单次可微调的范围是[-2.0, 2.0],单位:度,总共可微调的范围是[-10.0, 10.0],单位:度, 如果偏移量为负数,云台将在逆时针方向微调指定的度数。可通过KeyFineTuneRollTotalDegree获取总共微调的偏移量。
MSDK 5.0.0开始支持
final KeyFineTunePitchTotalDegree
static final DJIKeyInfo<Double> KeyFineTunePitchTotalDegree = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"FineTunePitchTotalDegree", SingleValueConverter.DoubleConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("PitchAdjustDegree")
|
描述:
参数: Double
获取云台俯仰轴总偏移量。可通过KeyFineTunePitchInDegrees进行微调。
MSDK 5.0.0开始支持
final KeyFineTuneYawTotalDegree
static final DJIKeyInfo<Double> KeyFineTuneYawTotalDegree = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"FineTuneYawTotalDegree", SingleValueConverter.DoubleConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("YawAdjustDegree")
|
描述:
参数: Double
获取云台偏航轴总偏移量。可通过KeyFineTuneYawInDegrees进行微调。
MSDK 5.0.0开始支持
final KeyFineTuneRollTotalDegree
static final DJIKeyInfo<Double> KeyFineTuneRollTotalDegree = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"FineTuneRollTotalDegree", SingleValueConverter.DoubleConverter).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("RollAdjustDegree")
|
描述:
参数: Double
获取云台横滚轴总偏移量。可通过KeyFineTuneRollInDegrees进行微调。
MSDK 5.0.0开始支持
final KeyLightGimbalCalibrate
static final DJIActionKeyInfo<EmptyMsg, EmptyMsg> KeyLightGimbalCalibrate = new KeyLightGimbalCalibrate().canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
描述:
启动探照灯云台自动校准。可通过KeyLightGimbalCalibrationStatus监听校准状态。 仅支持AL1 探照灯。
MSDK 5.12.0开始支持
final KeyLightGimbalCalibrationStatus
static final DJIKeyInfo<GimbalCalibrationStatusInfo> KeyLightGimbalCalibrationStatus = new KeyLightGimbalCalibrationStatus().canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false)
|
描述:
参数: GimbalCalibrationStatusInfo
获取探照灯云台校准状态和校准进度。调用KeyLightGimbalCalibrate启动探照灯云台校准后才能获取探照灯云台校准状态和校准进度。
MSDK 5.12.0开始支持
final KeyLightGimbalFineTunePitchInDegrees
static final DJIActionKeyInfo<LightGimbalAdjustInfo, EmptyMsg> KeyLightGimbalFineTunePitchInDegrees = new KeyLightGimbalFineTunePitchInDegrees().canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
描述:
参数: LightGimbalAdjustInfo
探照灯云台俯仰轴可以通过自定义偏移量进行微调。当探照灯云台回中后仍然有小角度偏移,可用此功能进行云台调平。单次可微调的范围是[-2.0, 2.0],单位:度,总共可微调的范围是[-10.0, 10.0],单位:度, 如果偏移量为负数,探照灯云台将在逆时针方向微调指定的度数。可通过KeyLightGimbalPitchTotalInDegrees获取总共微调的偏移量。
MSDK 5.12.0开始支持
final KeyLightGimbalPitchTotalInDegrees
static final DJIKeyInfo<LightGimbalTotalAdjustInfo> KeyLightGimbalPitchTotalInDegrees = new KeyLightGimbalPitchTotalInDegrees().canGet(true).canSet(false).canPerformAction(false).setIsEvent(false)
|
描述:
参数: LightGimbalTotalAdjustInfo
获取探照灯云台俯仰轴总偏移量。可通过KeyLightGimbalFineTunePitchInDegrees进行微调。
MSDK 5.12.0开始支持
final KeyGimbalCalibrate
static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyGimbalCalibrate = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"GimbalCalibrate", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false).setInnerIdentifier("CalibrateGimbal")
|
描述:
启动云台自动校准。可通过KeyGimbalCalibrationStatus监听校准状态。
MSDK 5.0.0开始支持
final KeyGimbalCalibrationStatus
static final DJIKeyInfo<GimbalCalibrationStatusInfo> KeyGimbalCalibrationStatus = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GimbalCalibrationStatus", new DJIValueConverter<>(GimbalCalibrationStatusInfo.class)).canGet(true).canSet(false).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("GimbalCalibrationState")
|
描述:
参数: GimbalCalibrationStatusInfo
获取云台校准状态和校准进度。调用KeyGimbalCalibrate启动云台校准后才能获取云台校准状态和校准进度。
MSDK 5.0.0开始支持
final KeyRestoreFactorySettings
static final DJIActionKeyInfo<EmptyMsg,EmptyMsg> KeyRestoreFactorySettings = new DJIActionKeyInfo<>(componentType.value(),subComponentType.value(),"RestoreFactorySettings", EmptyValueConverter.converter,EmptyValueConverter.converter).canGet(false).canSet(false).canListen(false).canPerformAction(true).setIsEvent(false)
|
描述:
将云台参数恢复到出厂设置。
MSDK 5.0.0开始支持
基本设置
final KeyPitchRangeExtensionEnabled
static final DJIKeyInfo<Boolean> KeyPitchRangeExtensionEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"PitchRangeExtensionEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
描述:
参数: Boolean
设置开启或者关闭云台俯仰限位扩展。以M30系列机型为例,它们的云台是下置的,在未开启限位扩展时,云台俯仰限位的角度范围为[45, -90],在开启限位扩展后,角度范围扩展到[45, -120]。也就是说开启俯仰限位扩展后,当云台俯仰轴往下调节时,角度可以控制到-120度。
MSDK 5.0.0开始支持
final KeyPitchControlMaxSpeed
static final DJIKeyInfo<Integer> KeyPitchControlMaxSpeed = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"PitchControlMaxSpeed", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("PitchControllerMaxSpeed")
|
描述:
参数: Integer
设置云台俯仰控制的最大速度,该数值为百分比,范围:[1,100]。数值越大速度越快,100%则表示云台所能达到的最大物理速度进行控制。
MSDK 5.0.0开始支持
final KeyYawControlMaxSpeed
static final DJIKeyInfo<Integer> KeyYawControlMaxSpeed = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"YawControlMaxSpeed", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false).setInnerIdentifier("YawControllerMaxSpeed")
|
描述:
参数: Integer
设置云台偏航控制的最大速度,该数值为百分比,范围:[1,100]。数值越大速度越快,100%则表示云台所能达到的最大物理速度进行控制。
MSDK 5.0.0开始支持
final KeyPitchSmoothingFactor
static final DJIKeyInfo<Integer> KeyPitchSmoothingFactor = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"PitchSmoothingFactor", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
描述:
参数: Integer
设置云台俯仰缓启/停,范围:[0,30],数值越大,控制云台俯仰轴启动/停止转动的缓冲距离越长。
MSDK 5.0.0开始支持
final KeyYawSmoothingFactor
static final DJIKeyInfo<Integer> KeyYawSmoothingFactor = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"YawSmoothingFactor", SingleValueConverter.IntegerConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
描述:
参数: Integer
设置云台偏航缓启/停,范围:[0,30],数值越大,控制云台偏航轴启动/停止转动的缓冲距离越长。
MSDK 5.0.0开始支持
final KeyGimbalVerticalShotEnabled
static final DJIKeyInfo<Boolean> KeyGimbalVerticalShotEnabled = new DJIKeyInfo<>(componentType.value(),subComponentType.value(),"GimbalVerticalShotEnabled", SingleValueConverter.BooleanConverter).canGet(true).canSet(true).canListen(true).canPerformAction(false).setIsEvent(false)
|
描述:
参数: Boolean
设置开启或者关闭竖拍。通常用于消费类机型。
MSDK 5.3.0开始支持