From 603f9421d0823a6228be0e0a479bc5a863ee9e79 Mon Sep 17 00:00:00 2001 From: Arjan Schrijver Date: Thu, 2 Jan 2025 21:34:02 +0100 Subject: [PATCH] Colmi R09: Fix temperature byte conversion --- .../gadgetbridge/devices/colmi/ColmiR0xPacketHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/colmi/ColmiR0xPacketHandler.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/colmi/ColmiR0xPacketHandler.java index 764378f6f..33d753e56 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/colmi/ColmiR0xPacketHandler.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/colmi/ColmiR0xPacketHandler.java @@ -512,9 +512,9 @@ public class ColmiR0xPacketHandler { for (int hour=0; hour<=23; hour++) { syncingDay.set(Calendar.HOUR_OF_DAY, hour); syncingDay.set(Calendar.MINUTE, 0); - float temp_00 = value[index]; + float temp_00 = value[index] & 0xff; index++; - float temp_30 = value[index]; + float temp_30 = value[index] & 0xff; index++; if (temp_00 > 0) { LOG.info("Received temperature data from {} days ago at {}:00: {} °C", days_ago, hour, temp_00);