Add BRIDGE_DELAY as a buffer to prevent immediate processing conflicts in the mesh network

This commit is contained in:
João Brázio 2025-09-08 20:21:33 +01:00
parent 1c93c162a1
commit a55fa8d8ec
No known key found for this signature in database
GPG key ID: 56A1490716A324DD
3 changed files with 15 additions and 5 deletions

View file

@ -54,8 +54,8 @@ void RS232Bridge::onPacketTransmitted(mesh::Packet *packet) {
// Build packet header
buffer[0] = (BRIDGE_PACKET_MAGIC >> 8) & 0xFF; // Magic high byte
buffer[1] = BRIDGE_PACKET_MAGIC & 0xFF; // Magic low byte
buffer[2] = (len >> 8) & 0xFF; // Length high byte
buffer[3] = len & 0xFF; // Length low byte
buffer[2] = (len >> 8) & 0xFF; // Length high byte
buffer[3] = len & 0xFF; // Length low byte
// Calculate checksum over the payload
uint16_t checksum = fletcher16(buffer + 4, len);