Merge pull request #478 from ldebomy/master

Update meter_izar.cc
pull/482/head
Fredrik Öhrström 2022-02-19 16:57:47 +01:00 zatwierdzone przez GitHub
commit f64f927e96
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -257,7 +257,7 @@ void MeterIzar::processContent(Telegram *t)
uint8_t yy = atoi(digits.substr(0, 2).c_str());
manufacture_year = yy > 70 ? (1900 + yy) : (2000 + yy); // Maybe to adjust in 2070, if this code stills lives :D
// get the serial number
serial_number = atoi(digits.substr(3, digits.size()).c_str());
serial_number = atoi(digits.substr(2, digits.size()).c_str());
// get letters
uchar supplier_code = '@' + (((origin[9] & 0x0F) << 1) | (origin[8] >> 7));
uchar meter_type = '@' + ((origin[8] & 0x7C) >> 2);