still vif parsing
This commit is contained in:
parent
a17b01f0cd
commit
59e6482b3f
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user