mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 22:02:17 +01:00
refactor: drop unused radio API
Transceiver::flushTx() had no caller; suspendTx() is the only flush. RadioScheduler::hasRoom() was only ever asked about a normal job, so it no longer takes a priority flag. The tests check the reserved stop slots through submit() instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0b7c57a9ab
commit
29d642b6f4
5 changed files with 12 additions and 22 deletions
|
|
@ -4660,15 +4660,7 @@ bool Transceiver::txHasRoom() {
|
|||
// Without a radio task submitTx() fails straight away so there is no point waiting.
|
||||
if(!txTaskHandle) return true;
|
||||
TxQueueLock lock;
|
||||
return this->sched.hasRoom(false);
|
||||
}
|
||||
void Transceiver::flushTx() {
|
||||
{
|
||||
TxQueueLock lock;
|
||||
this->sched.flush(millis());
|
||||
}
|
||||
// Stop waiting on a delayed job that is gone.
|
||||
if(txTaskHandle) xTaskNotifyGive(txTaskHandle);
|
||||
return this->sched.hasRoom();
|
||||
}
|
||||
void Transceiver::suspendTx(uint8_t reason) {
|
||||
{
|
||||
|
|
@ -4742,7 +4734,7 @@ void Transceiver::txTask(void *arg) {
|
|||
haveJob = trans->sched.next(millis(), job, waitMs);
|
||||
}
|
||||
if(haveJob) trans->runJob(job);
|
||||
// submitTx() and flushTx() wake us for a new job or a flush.
|
||||
// submitTx() and suspendTx() wake us for a new job or a flush.
|
||||
else ulTaskNotifyTake(pdTRUE, waitMs == RADIO_WAIT_FOREVER ? portMAX_DELAY : pdMS_TO_TICKS(waitMs) + 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue