still vif parsing

This commit is contained in:
Wolfgang Hottgenroth 2020-11-17 19:12:15 +01:00
parent a17b01f0cd
commit 59e6482b3f
No known key found for this signature in database
GPG Key ID: 656C88C7C1734267

View File

@ -183,10 +183,11 @@ static void parseAndPrintFrame(t_mbusCommHandle *localMbusCommHandle) {
parsedVIB.name, parsedVIB.unit, parsedVIB.exponent);
if (parsedVIB.found) {
uint8_t value = strtol(mbus_data_record_value(record), NULL, 10);
uint32_t value = strtol(mbus_data_record_value(record), NULL, 10);
float weightedValue = ((float) value) * powf(10.0, ((float) parsedVIB.exponent));
coloredMsg(LOG_YELLOW, true, "mbc papf [%d] result: %s is %f %s",
localMbusCommHandle->requestId, parsedVIB.name, weightedValue, parsedVIB.unit);
coloredMsg(LOG_YELLOW, true, "mbc papf [%d] result: %s is %.1f %s (%d * 10^%d)",
localMbusCommHandle->requestId, parsedVIB.name, weightedValue, parsedVIB.unit,
value, parsedVIB.exponent);
}
}