Fix Tasmesh special case packet size

This commit is contained in:
Theo Arends 2021-07-17 14:34:11 +02:00
parent 3d7c1091a7
commit 8162abd9d3
1 changed files with 1 additions and 1 deletions

View File

@ -303,7 +303,7 @@ bool MESHrouteMQTTtoMESH(const char* _topic, char* _data, bool _retained) {
size_t _bytesLeft = strlen(_topic) + strlen(_data) +2;
MESH.sendPacket.counter++;
MESH.sendPacket.chunk = 0;
MESH.sendPacket.chunks = ((_bytesLeft+2) / MESH_PAYLOAD_SIZE) +1;
MESH.sendPacket.chunks = (_bytesLeft / MESH_PAYLOAD_SIZE) +1;
memcpy(MESH.sendPacket.receiver, MESH.broker, 6);
MESH.sendPacket.type = PACKET_TYPE_MQTT;
MESH.sendPacket.chunkSize = MESH_PAYLOAD_SIZE;