Merge branch 'fix_power_export_issue'

This commit is contained in:
Wolfgang Hottgenroth 2023-03-18 18:03:56 +01:00
commit a33dbe2387
Signed by: wn
GPG Key ID: 836E9E1192A6B132

View File

@ -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,