consider count in sendError

This commit is contained in:
Wolfgang Hottgenroth
2017-01-04 17:25:54 +01:00
parent 20edb0bf68
commit 58a1a01d42
2 changed files with 7 additions and 2 deletions

View File

@ -244,7 +244,7 @@ void MqttClient::sendResponse(uint8_t *responseBuffer, uint16_t responseBufferLe
void MqttClient::sendError(uint8_t code, uint16_t count, uint8_t token, char *name) {
String msg = String("{ \"metadata\": { \"device\": \"MeterbusHub\", \"error\": ")
+ code + String(", \"token\": ") + token + String(", \"name\": ") + String(name) + String(" }, \"data\": { \"uptime\": ") + m_uptime + String("}}");
+ code + String(", \"count\": ") + count + String(", \"token\": ") + token + String(", \"name\": ") + String(name) + String(" }, \"data\": { \"uptime\": ") + m_uptime + String("}}");
if (m_disconnectState == 0) {
//Serial << "publishing " << msg << endl;
//Serial << "length: " << msg.length() << endl;