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

do compare with 255 right

This commit is contained in:
Harald Barth 2022-08-02 20:58:05 +02:00
parent 89905f8ed7
commit 37ea688eab

View File

@ -63,9 +63,9 @@ class DCCWaveform {
uint32_t packetcount = isMainTrack ?
rmtMainChannel->packetCount() : rmtProgChannel->packetCount();
uint32_t count = packetcount - resetPacketBase;
if ((count & 255) == 0) // no high bits set
return count;
return 255;
if (count > 255) // cap to 255
return 255;
return count;
};
#endif
void schedulePacket(const byte buffer[], byte byteCount, byte repeats);