Runtime service modes for upload and asset loading
- Vorherrschende Sprache
- Rust
- Sterne
- 3
- Forks
- 0
- Ø Merge
- 3 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
## Objective
Replace build-time upload variants with runtime service modes so upload and SD asset loading can be enabled/disabled at runtime while maximizing available RAM.
## Scope
Introduce Embassy runtime service control plane for upload and asset-read services; remove reset-based mode switch; gate upload HTTP/Wi-Fi/SD upload plumbing by runtime mode; redesign upload/asset data transport to remove large inline channel payloads; use PSRAM-backed transfer buffers when available and unload caches/buffers when modes are disabled; provide repeatable UART smoke tooling for mode/RAM verification.
## Constraints
Single firmware image default path; no behavior split by separate upload build artifacts; preserve serial command compatibility (RUNMODE kept, MODE added); maintain ModeStore backward compatibility; avoid regressions in normal display runtime.
## Acceptance Criteria
Serial MODE commands toggle upload and asset-read services at runtime; mode state is persisted/restored; upload endpoints reject while upload mode is off; asset loading can be disabled and cached assets are explicitly unloadable; transport no longer carries large inline upload/asset payload arrays in channel messages; disabling modes releases corresponding transfer buffers; automated smoke script validates MODE + PSRAM flow over UART.
## Latest Decisions
Implemented in branch feature/runtime_service_modes_issue6: (1) persisted RuntimeServices flags with backward-compatible decode, (2) live MODE command surface and resetless mode switching, (3) upload Wi-Fi/HTTP/SD paths gated by runtime upload mode, (4) payload de-inline refactor for SdUploadRequest and SdAssetReadResponse with shared transfer buffers, (5) transfer buffers allocate in PSRAM when psram-alloc is enabled with DRAM fallback, (6) MODE ASSETS OFF clears runtime Pirata cache and releases asset-read buffer, (7) MODE UPLOAD OFF releases upload chunk buffer, (8) upload HTTP buffer sizes reduced for lower baseline RAM, (9) docs updated for runtime mode operations, (10) new script scripts/runtime_modes_smoke.sh automates UART mode toggles and PSRAM snapshots.
## Open Questions
Whether to enforce strictly mutually-exclusive service profiles (display vs upload) to reclaim additional task/runtime memory; whether to further reduce SD_UPLOAD_CHUNK_MAX after field stability tests.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.