Major auto-upload scheduler changes
The tachograph auto-upload scheduler has been substantially reworked to fix duplicate commands and retry timing.
- Fixed duplicate
request_tachograph_file commands. Because command enqueueing is asynchronous, a device could receive several copies of the same request in quick succession (up to 3 within one second on production) before the first was registered. Each scheduled request is now stamped the moment it's enqueued, so subsequent packets in that window no longer enqueue duplicates.
- Unified retry-by-timeout. Lost commands, expired sessions and offline company cards now all recover through a single retry timeout rather than separate stuck-state handling. Requests also self-expire from the device queue, so stale copies don't pile up across reconnects.
- Smarter scheduling. While one file type is being uploaded, other due types wait their turn instead of triggering extra requests, and the company-card availability check runs once per attempt instead of on every packet.
- Fixed a scheduler stall. A missing card-in-slot status parameter no longer blocks retries (it previously stalled scheduling on devices that don't report that parameter).
Significant under-the-hood improvements accompany these changes. No configuration changes are required, and scheduler behavior is now more correct without affecting normal protocol operation.