error ratio

This commit is contained in:
2020-11-17 20:04:29 +01:00
parent f27c2327b8
commit e563a9b772

View File

@ -188,6 +188,10 @@ static void parseAndPrintFrame(t_mbusCommHandle *localMbusCommHandle) {
}
}
mbus_data_record_free(data_var->record);
float errorRatio = ((float) localMbusCommHandle->device->failures) / ((float) localMbusCommHandle->device->requests);
coloredMsg(LOG_YELLOW, true, "mbc papf [%d] Error ratio is %.2f",
localMbusCommHandle->requestId,
errorRatio);
} else {
coloredMsg(LOG_RED, true, "mbc papf [%d] err: unable to parse frame", localMbusCommHandle->requestId);
}