1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-01-30 14:13:07 +01:00

Merge branch 'devel' into devel-websockets

This commit is contained in:
Asbelos 2025-01-18 08:58:30 +00:00
commit 5600382ae4
4 changed files with 14 additions and 9 deletions

View File

@ -44,6 +44,12 @@ class RMTChannel {
return true;
return dataReady;
};
inline void waitForDataCopy() {
while(1) { // do nothing and wait for interrupt clearing dataReady to happen
if (dataReady == false)
break;
}
};
inline uint32_t packetCount() { return packetCounter; };
private:

View File

@ -70,7 +70,11 @@ void DCCWaveform::begin() {
void DCCWaveform::schedulePacket(const byte buffer[], byte byteCount, byte repeats) {
if (byteCount > MAX_PACKET_SIZE) return; // allow for chksum
RMTChannel *rmtchannel = (isMainTrack ? rmtMainChannel : rmtProgChannel);
if (rmtchannel == NULL)
return; // no idea to prepare packet if we can not send it anyway
rmtchannel->waitForDataCopy(); // blocking wait so we can write into buffer
byte checksum = 0;
for (byte b = 0; b < byteCount; b++) {
checksum ^= buffer[b];
@ -88,13 +92,7 @@ void DCCWaveform::schedulePacket(const byte buffer[], byte byteCount, byte repea
{
int ret = 0;
do {
if(isMainTrack) {
if (rmtMainChannel != NULL)
ret = rmtMainChannel->RMTfillData(pendingPacket, pendingLength, pendingRepeats);
} else {
if (rmtProgChannel != NULL)
ret = rmtProgChannel->RMTfillData(pendingPacket, pendingLength, pendingRepeats);
}
ret = rmtchannel->RMTfillData(pendingPacket, pendingLength, pendingRepeats);
} while(ret > 0);
}
}

View File

@ -1 +1 @@
#define GITHUB_SHA "devel-202501092043Z"
#define GITHUB_SHA "devel-202501171827Z"

View File

@ -3,7 +3,8 @@
#include "StringFormatter.h"
#define VERSION "5.5.6"
#define VERSION "5.5.7"
// 5.5.7 - ESP32 bugfix packet buffer race (as 5.4.1)
// 5.5.6 - Fix ESP32 build bug caused by include reference loop
// 5.5.5 - Railcom implementation with IO_I2CRailcom driver
// - response analysis and block management.