mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-06-17 21:15:24 +02:00
Compare commits
No commits in common. "137008ceb3b866ef03f18a6ed506fb6eb36cc6cd" and "08076443cbae39214c6d3d43a700c39d0933f168" have entirely different histories.
137008ceb3
...
08076443cb
6
DCCRMT.h
6
DCCRMT.h
@ -44,12 +44,6 @@ class RMTChannel {
|
|||||||
return true;
|
return true;
|
||||||
return dataReady;
|
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; };
|
inline uint32_t packetCount() { return packetCounter; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -70,11 +70,7 @@ void DCCWaveform::begin() {
|
|||||||
|
|
||||||
void DCCWaveform::schedulePacket(const byte buffer[], byte byteCount, byte repeats) {
|
void DCCWaveform::schedulePacket(const byte buffer[], byte byteCount, byte repeats) {
|
||||||
if (byteCount > MAX_PACKET_SIZE) return; // allow for chksum
|
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;
|
byte checksum = 0;
|
||||||
for (byte b = 0; b < byteCount; b++) {
|
for (byte b = 0; b < byteCount; b++) {
|
||||||
checksum ^= buffer[b];
|
checksum ^= buffer[b];
|
||||||
@ -92,7 +88,13 @@ void DCCWaveform::schedulePacket(const byte buffer[], byte byteCount, byte repea
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
do {
|
do {
|
||||||
ret = rmtchannel->RMTfillData(pendingPacket, pendingLength, pendingRepeats);
|
if(isMainTrack) {
|
||||||
|
if (rmtMainChannel != NULL)
|
||||||
|
ret = rmtMainChannel->RMTfillData(pendingPacket, pendingLength, pendingRepeats);
|
||||||
|
} else {
|
||||||
|
if (rmtProgChannel != NULL)
|
||||||
|
ret = rmtProgChannel->RMTfillData(pendingPacket, pendingLength, pendingRepeats);
|
||||||
|
}
|
||||||
} while(ret > 0);
|
} while(ret > 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
#define GITHUB_SHA "devel-202501171827Z"
|
#define GITHUB_SHA "devel-202501092043Z"
|
||||||
|
@ -3,8 +3,7 @@
|
|||||||
|
|
||||||
#include "StringFormatter.h"
|
#include "StringFormatter.h"
|
||||||
|
|
||||||
#define VERSION "5.5.7"
|
#define VERSION "5.5.6"
|
||||||
// 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.6 - Fix ESP32 build bug caused by include reference loop
|
||||||
// 5.5.5 - Railcom implementation with IO_I2CRailcom driver
|
// 5.5.5 - Railcom implementation with IO_I2CRailcom driver
|
||||||
// - response analysis and block management.
|
// - response analysis and block management.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user