From 4fb45b8b00f7c952c245e48f3fd183cd60469f56 Mon Sep 17 00:00:00 2001 From: Jan Horacek Date: Mon, 15 Nov 2021 17:17:38 +0100 Subject: [PATCH] Fix ts_offset type. --- src/modules/uni.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/uni.cpp b/src/modules/uni.cpp index 21eb915..711413c 100644 --- a/src/modules/uni.cpp +++ b/src/modules/uni.cpp @@ -734,7 +734,7 @@ QJsonObject MtbUni::dvRepr(uint8_t dvi, const std::vector &data) const return {}; uint16_t raw = (data[0] << 8) | data[1]; - uint8_t ts_offset = data[2]; + int8_t ts_offset = data[2]; uint8_t ts_gain = data[3]; float temp = ((raw-(273+100-ts_offset))*128 / ts_gain) + 25; return {