mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 22:02:17 +01:00
fix: count the set-My settle delay from the end of the job ahead
The delay was counted from when the job was queued. The stop at the target is queued just before the favorite and is on air for about 245ms, so the 200ms settle delay had run out before the favorite's turn and only the 100ms beat between jobs was left. A delayed job now waits its delay after whichever came later: being queued, or the job ahead of it going off air. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
4dd4a9872e
commit
b768c5f987
5 changed files with 69 additions and 16 deletions
|
|
@ -62,7 +62,8 @@ struct somfy_tx_job_t {
|
|||
bool priority = false; // May use the reserved slots.
|
||||
bool front = false; // Queued ahead of the back. Only for priority jobs.
|
||||
uint32_t seq = 0; // Ticket the job's events are matched up by.
|
||||
uint32_t notBefore = 0; // millis() before which the job must not go on air (0 = none).
|
||||
uint32_t queuedAt = 0; // millis() when it was submitted.
|
||||
uint16_t delayMs = 0; // How long it waits after it was queued and after the job ahead of it ended.
|
||||
};
|
||||
enum class tx_event_t : uint8_t {
|
||||
started, // The job is going on air.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue