From dd477befff2a5287eb6fbdf4c6f85e5241522554 Mon Sep 17 00:00:00 2001 From: Andrew Bell Date: Wed, 20 Nov 2024 10:32:44 -0500 Subject: [PATCH] Reset '1' count after bitstuffing. --- latest/Firmware/Transponder/Src/AISMessages.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/latest/Firmware/Transponder/Src/AISMessages.cpp b/latest/Firmware/Transponder/Src/AISMessages.cpp index 2d3ea95..a075530 100644 --- a/latest/Firmware/Transponder/Src/AISMessages.cpp +++ b/latest/Firmware/Transponder/Src/AISMessages.cpp @@ -170,6 +170,7 @@ void AISMessage::bitStuff(uint8_t *buff, uint16_t &size) // Insert a 0 right after this one memmove(buff + i + 2, buff + i + 1, size-i-1); buff[i+1] = 0; + numOnes = 0; ++size; } break;