From 276be51a652848beae88112f2089ba693e6b04c3 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Sat, 16 Mar 2013 10:00:16 +0100 Subject: [PATCH] Fix the decoding of negative temperatures. Because temperatures can be negative, we should interpret the stored value as a signed integer, even for the absolute values. --- src/uwatec_smart_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uwatec_smart_parser.c b/src/uwatec_smart_parser.c index 035f508..8d0df3d 100644 --- a/src/uwatec_smart_parser.c +++ b/src/uwatec_smart_parser.c @@ -601,7 +601,7 @@ uwatec_smart_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t break; case TEMPERATURE: if (table[id].absolute) { - temperature = value / 2.5; + temperature = svalue / 2.5; have_temperature = 1; } else { temperature += svalue / 2.5;