This commit is contained in:
孙小云 2026-01-31 11:51:16 +08:00
parent ff3fbce1f3
commit 5797fa6c76
1 changed files with 7 additions and 6 deletions

View File

@ -213,12 +213,13 @@ public class BufferDeviceImpl implements IBufferDeviceService
// 飞行时长 - total_flight_time 获取秒数并转换为天 // 飞行时长 - total_flight_time 获取秒数并转换为天
telemetryMap.get(DeviceTelemetry.Total_Flight_Time) telemetryMap.get(DeviceTelemetry.Total_Flight_Time)
.ifPresent(telemetryValue -> { .ifPresent(telemetryValue -> {
Integer seconds = telemetryValue.getValue(); dto.setFlightDuration(telemetryValue.getValue());
if (seconds != null) { // Integer seconds = telemetryValue.getValue();
// 将秒转换为天 / (60 * 60 * 24) // if (seconds != null) {
Integer days = seconds / (60 * 60 * 24); // // 将秒转换为天 / (60 * 60 * 24)
dto.setFlightDuration(days); // Integer days = seconds / (60 * 60 * 24);
} // dto.setFlightDuration(days);
// }
}); });
return dto; return dto;