From e58a05b78d09bcd4c1a12e8610c5adfc316494e8 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 18 十二月 2025 10:04:42 +0800
Subject: [PATCH] 2025.12.18
---
src/main/kotlin/com/flightfeather/uav/domain/entity/BaseRealTimeData.kt | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/main/kotlin/com/flightfeather/uav/domain/entity/BaseRealTimeData.kt b/src/main/kotlin/com/flightfeather/uav/domain/entity/BaseRealTimeData.kt
index 1066c78..a525f6e 100644
--- a/src/main/kotlin/com/flightfeather/uav/domain/entity/BaseRealTimeData.kt
+++ b/src/main/kotlin/com/flightfeather/uav/domain/entity/BaseRealTimeData.kt
@@ -122,7 +122,7 @@
}
fun getByFactorType(type: FactorType?): Float? {
- return when (type) {
+ val res = when (type) {
FactorType.NO2 -> no2
FactorType.CO -> co
FactorType.H2S -> h2s
@@ -144,6 +144,7 @@
FactorType.NO -> no
else -> null
}
+ return if (res != null) round(res * 100) / 100 else null
}
}
--
Gitblit v1.9.3