mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 22:02:17 +01:00
fix: back-pressure web commands and report radio failures
Web commands are answered once queued, but the main loop handed all of them to the radio at once and anything past its free slots was dropped silently. Unpair also cleared paired even when the Prog wasn't sent. - processQueue leaves commands queued until the radio has room. - Commands that transmit get a 503 straight away during a frequency scan instead of being dropped later. - Unpair restores paired when the Prog can't be sent. - Failed web commands are logged. - Note that /setPositions and /setSensor answer with the state before the command; the socket events carry the result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
00a084048f
commit
1f394ca9df
4 changed files with 69 additions and 29 deletions
|
|
@ -5291,6 +5291,12 @@ bool Transceiver::isQueued(uint32_t seq) {
|
|||
// Only meaningful for jobs queued at the back.
|
||||
return seq != 0 && (int32_t)(seq - txBackTaken) > 0;
|
||||
}
|
||||
bool Transceiver::txSuspended() { return txSuspendMask != 0; }
|
||||
bool Transceiver::txHasRoom() {
|
||||
// Without a radio task queueTx() fails straight away so there is no point waiting.
|
||||
if(!txJobQueue || !txTaskHandle) return true;
|
||||
return uxQueueSpacesAvailable(txJobQueue) > TX_RESERVED_SLOTS;
|
||||
}
|
||||
void Transceiver::flushTx() {
|
||||
TxQueueLock lock;
|
||||
++txGen;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue