1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 21:01:25 +01:00

Preamble count to include previous stop bit

This commit is contained in:
Asbelos 2020-06-21 12:59:58 +01:00
parent effbdea477
commit b2a9022c19

View File

@ -52,7 +52,9 @@ DCCWaveform::DCCWaveform( byte preambleBits, bool isMain) {
packetPending = false;
memcpy(transmitPacket, idlePacket, sizeof(idlePacket));
state = 0;
requiredPreambles = preambleBits;
// The +1 below is to allow the preamble generator to create the stop bit
// fpr the previous packet.
requiredPreambles = preambleBits+1;
bytes_sent = 0;
bits_sent = 0;
sampleDelay = 0;