allow negative values from mbus
This commit is contained in:
parent
b7071379b9
commit
13c8344276
@ -218,7 +218,7 @@ static void parseAndPrintFrame() {
|
|||||||
// mbusCommHandle.requestId,
|
// mbusCommHandle.requestId,
|
||||||
// parsedVIB.name, parsedVIB.unit, parsedVIB.exponent);
|
// parsedVIB.name, parsedVIB.unit, parsedVIB.exponent);
|
||||||
if (parsedVIB.found) {
|
if (parsedVIB.found) {
|
||||||
uint32_t value = strtol(mbus_data_record_value(record), NULL, 10);
|
int32_t value = strtol(mbus_data_record_value(record), NULL, 10);
|
||||||
float weightedValue = ((float) value) * powf(10.0, ((float) parsedVIB.exponent));
|
float weightedValue = ((float) value) * powf(10.0, ((float) parsedVIB.exponent));
|
||||||
coloredMsg(LOG_YELLOW, false, "mbc papf [%d] %s is %.1f %s (%d * 10^%d)",
|
coloredMsg(LOG_YELLOW, false, "mbc papf [%d] %s is %.1f %s (%d * 10^%d)",
|
||||||
mbusCommHandle.requestId, parsedVIB.name, weightedValue, parsedVIB.unit,
|
mbusCommHandle.requestId, parsedVIB.name, weightedValue, parsedVIB.unit,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user