修改无人机状态
This commit is contained in:
parent
e0b778333c
commit
3caead4779
|
|
@ -225,6 +225,23 @@ public class TuohengDeviceTelemetry {
|
|||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* 机场舱门状态 (来自 /topic/v1/heartbeat/+/message)
|
||||
*/
|
||||
|
||||
// 舱门状态 - Integer (0=打开, 1=关闭)
|
||||
public static final TelemetryKey<Integer> NEST_DOOR_STATUS = TelemetryKey.of(
|
||||
"nest_door_status",
|
||||
Integer.class,
|
||||
value -> {
|
||||
if (value == null) return null;
|
||||
if (value instanceof Number) {
|
||||
return ((Number) value).intValue();
|
||||
}
|
||||
return Integer.parseInt(value.toString());
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* 舱内传感器数据 (来自 /topic/v1/airportNest/+/realTime/data)
|
||||
*/
|
||||
|
|
@ -518,6 +535,19 @@ public class TuohengDeviceTelemetry {
|
|||
value -> value != null ? value.toString() : null
|
||||
);
|
||||
|
||||
// 图传信号强度 - Integer (用于判断无人机开关机状态,>60表示开机)
|
||||
public static final TelemetryKey<Integer> TSINGAL = TelemetryKey.of(
|
||||
"tsingal",
|
||||
Integer.class,
|
||||
value -> {
|
||||
if (value == null) return null;
|
||||
if (value instanceof Number) {
|
||||
return ((Number) value).intValue();
|
||||
}
|
||||
return Integer.parseInt(value.toString());
|
||||
}
|
||||
);
|
||||
|
||||
// 飞行时间 - Integer
|
||||
public static final TelemetryKey<Integer> FLIGHT_TIME = TelemetryKey.of(
|
||||
"flight_time",
|
||||
|
|
@ -587,6 +617,8 @@ public class TuohengDeviceTelemetry {
|
|||
BATTERY_NUM_CYCLES,
|
||||
BATTERY_DISCHARGE_CURRENT,
|
||||
BATTERY_B_CHARGING,
|
||||
// 机场舱门状态
|
||||
NEST_DOOR_STATUS,
|
||||
// 舱内传感器数据
|
||||
NEST_INNER_HUM,
|
||||
NEST_INNER_TEMP,
|
||||
|
|
@ -616,6 +648,7 @@ public class TuohengDeviceTelemetry {
|
|||
// 无人机飞行状态
|
||||
MODE,
|
||||
ARMED,
|
||||
TSINGAL,
|
||||
FLIGHT_TIME,
|
||||
MILEAGE,
|
||||
DISTANCE_TO_HOME
|
||||
|
|
|
|||
Loading…
Reference in New Issue