From 31c266483f0fc0507e2b5482c0b81bbc4b1f2857 Mon Sep 17 00:00:00 2001 From: Nikutrax <112165998+Nikutrax@users.noreply.github.com> Date: Thu, 2 May 2024 10:24:44 +0200 Subject: Update TrvProtocolDecoder.java because i think the documention was fail (bloodSugar value is in with point) and should so because the server received following: IWAPHP,0,0,0,93,0.0,0.0# 2024-04-30 14:35:36 INFO: [T37978d9e: trv < 109.43.243.234] 4957415048502c302c302c302c39332c302e302c302e3023 2024-04-30 14:35:36 INFO: [T37978d9e] error - For input string: "0.0" - NumberFormatException (... < TrvProtocolDecoder:348 < ExtendedObjectDecoder:75 < ... < WrapperContext:102 < ...) --- src/main/java/org/traccar/protocol/TrvProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/org/traccar/protocol/TrvProtocolDecoder.java b/src/main/java/org/traccar/protocol/TrvProtocolDecoder.java index 8b2e755b2..1187250f8 100644 --- a/src/main/java/org/traccar/protocol/TrvProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/TrvProtocolDecoder.java @@ -345,7 +345,7 @@ public class TrvProtocolDecoder extends BaseProtocolDecoder { position.set("pressureSystolic", Integer.parseInt(values[2])); position.set("pressureDiastolic", Integer.parseInt(values[3])); position.set("spo2", Integer.parseInt(values[4])); - position.set("bloodSugar", Integer.parseInt(values[5])); + position.set("bloodSugar", Double.parseDouble(values[5])); position.set("temperature", Double.parseDouble(values[6])); break; case "AP50": -- cgit v1.2.3