修改枚举

This commit is contained in:
孙小云 2026-01-19 16:50:18 +08:00
parent f8ae8f4f34
commit b134358cdc
1 changed files with 17 additions and 1 deletions

View File

@ -23,6 +23,21 @@ public class DeviceTelemetry {
* 无人机独状态 * 无人机独状态
*/ */
/**
* 网络类型 {"1":"4G","2":"以太网"}
*/
public static final TelemetryKey<Integer> Network_State_Type = TelemetryKey.of(
"network_state.type",
Integer.class,
value -> {
if (value == null) return null;
if (value instanceof Number) {
return ((Number) value).intValue();
}
return Integer.parseInt(value.toString());
}
);
/** /**
* 运行时长 {"unit_name":"秒 / s"} * 运行时长 {"unit_name":"秒 / s"}
@ -250,7 +265,8 @@ public class DeviceTelemetry {
Total_Flight_Sorties, Total_Flight_Sorties,
Drone_Charge_State_State, Drone_Charge_State_State,
Drone_In_Dock, Drone_In_Dock,
Acc_Time Acc_Time,
Network_State_Type
); );
} }