Only send MQTT of data that has been received

This commit is contained in:
Marius Bezuidenhout 2021-08-15 11:44:36 +02:00
parent 500a6ab6e2
commit 56eced2f51
1 changed files with 2 additions and 9 deletions

View File

@ -350,15 +350,8 @@ void MCP2515_Show(bool Json) {
if (bms.setFields & BMS_TEMP) {
WSContentSend_Temp(bms.manuf, ConvertTemp(float(bms.battTemp) / 10));
}
if (bms.setFields & BMS_SERIAL) {
WSContentSend_PD(PSTR("{s}%s Serial nr.{m}%s{e}"), bms.manuf, bms.serialNr);
}
if (bms.setFields & BMS_MODEL) {
WSContentSend_PD(PSTR("{s}%s Model{m}%d{e}"), bms.manuf, bms.model);
}
if (bms.setFields & BMS_FIRMWARE_VER) {
WSContentSend_PD(PSTR("{s}%s Firmware ver.{m}%d{e}"), bms.manuf, bms.firmwareVer);
}
} else {
WSContentSend_PD(PSTR("{s}MCP2515 {m} Waiting for data{e}"));
}
#endif // MCP2515_BMS_CLIENT
#endif // USE_WEBSERVER