From 36a85d373781f5772a21a13ec46047f0fcecc2ed Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 20 Feb 2019 21:58:28 +0100 Subject: [PATCH] Add product string of Hydrometer Sharky 775 --- mbus/mbus-protocol.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mbus/mbus-protocol.c b/mbus/mbus-protocol.c index 8fcc948..8e98194 100755 --- a/mbus/mbus-protocol.c +++ b/mbus/mbus-protocol.c @@ -503,14 +503,14 @@ mbus_data_bcd_decode(unsigned char *bcd_data, size_t bcd_data_size) { for (i = bcd_data_size; i > 0; i--) { - val *= 10; + val = (val * 10); if (bcd_data[i-1]>>4 < 0xA) { val += ((bcd_data[i-1]>>4) & 0xF); } - val = (val * 10) + (bcd_data[i-1] & 0xF); + val = (val * 10) + ( bcd_data[i-1] & 0xF); } // hex code Fh in the MSD position signals a negative BCD number @@ -1105,6 +1105,9 @@ mbus_data_product_name(mbus_data_variable_header *header) case 0x28: strcpy(buff,"ABB F95 Typ US770"); break; + case 0x2F: + strcpy(buff,"Hydrometer Sharky 775"); + break; } } else if (manufacturer == mbus_manufacturer_id("JAN"))