Commit d9b6a272 authored by Michael Ott's avatar Michael Ott
Browse files

Fix parsing of MQTT messages that don't contain a timestamp

parent 2530f7e8
......@@ -135,7 +135,7 @@ void mqttCallback(SimpleMQTTMessage *msg)
payload = &buf;
payload->value = *((uint64_t*)msg->getPayload());
payload->timestamp = Messaging::calculateTimestamp();
len = 2;
len = sizeof(uint64_t) * 2;
}
//...otherwise it just retrieves it from the MQTT message payload.
else if((len%sizeof(mqttPayload)==0) && (len>0)){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment