From 5381714d0862f9818f098f9cd78d3759bbd8b438 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Thu, 20 Aug 2015 09:08:56 +0200 Subject: [PATCH] Fix a bug in the tank id. Due to a bitshift with the wrong number of bits, the tank id was always zero for the Uwatec trimix firmware. --- 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 b8813dd..3bf7d2b 100644 --- a/src/uwatec_smart_parser.c +++ b/src/uwatec_smart_parser.c @@ -962,7 +962,7 @@ uwatec_smart_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t case PRESSURE: if (table[id].absolute) { if (parser->trimix) { - tank = (value & 0xF000) >> 24; + tank = (value & 0xF000) >> 12; pressure = (value & 0x0FFF) / 4.0; } else { tank = table[id].index;