mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 12:51:24 +01:00
bugfix: Wrong condition for ring->commit()
This commit is contained in:
parent
cadb82ab6b
commit
d3dbeaa666
@ -126,7 +126,9 @@ void CommandDistributor::broadcastToClients(clientType type) {
|
||||
ring->commit();
|
||||
}
|
||||
}
|
||||
if (ring->peekTargetMark() == RingStream::NO_CLIENT) {
|
||||
// at this point ring is committed (NO_CLIENT) either from
|
||||
// 4 or 13 lines above.
|
||||
if (rememberClient != RingStream::NO_CLIENT) {
|
||||
//DIAG(F("CD postmark client %d"), rememberClient);
|
||||
ring->mark(rememberClient);
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
#define GITHUB_SHA "PORTX-HAL-20220816"
|
||||
#define GITHUB_SHA "PORTX-HAL-20220817"
|
||||
|
@ -107,7 +107,7 @@ int RingStream::read() {
|
||||
if ((_pos_read==_pos_write) && !_overflow) return -1; // empty
|
||||
byte b=readRawByte();
|
||||
if (b!=FLASH_INSERT_MARKER) return b;
|
||||
|
||||
#ifndef ARDUINO_ARCH_ESP32
|
||||
// Detected a flash insert
|
||||
// read address bytes LSB first (size depends on CPU)
|
||||
uintptr_t iFlash=0;
|
||||
@ -119,7 +119,11 @@ int RingStream::read() {
|
||||
}
|
||||
_flashInsert=reinterpret_cast<char * >( iFlash);
|
||||
// and try again... so will read the first byte of the insert.
|
||||
return read();
|
||||
return read();
|
||||
#else
|
||||
DIAG(F("Detected flash insert marker at pos %d but there should not be one"),_pos_read);
|
||||
return '\0';
|
||||
#endif
|
||||
}
|
||||
|
||||
byte RingStream::readRawByte() {
|
||||
|
Loading…
Reference in New Issue
Block a user