SetPower duration_s is accepted but dropped — "on for N hours" never auto-turns-off

Aperta
#31 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
rust
Ambito
api, backend

Direzione di ricerca

Read crates/api/src/control.rs:211-218 and crates/podd-core/src/frozen/manager.rs:288-289 to trace how duration_s reaches handle_command, then inspect the Frozen frame and bus.rs:48-50 snapshot field. Decide whether sessions should auto-expire or be documented as schedule-bound; done means the chosen behavior is implemented consistently and seconds_remaining reflects it if timed expiry is supported.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

PoddControl::set_power sends duration_s = 43200 for on / 0 for off (crates/api/src/control.rs:211-218), but handle_command explicitly ignores it: the comment at crates/podd-core/src/frozen/manager.rs:288-289 says "duration_s is not yet honored" and the Frozen frame only carries enabled+temp. So a side turned on stays on until the config schedule flips it (or forever if outside any window), rather than expiring after the session length. seconds_remaining in the snapshot is likewise always 0 (bus.rs:48-50). Either honor the duration with a timed auto-off or document that sessions are schedule-bound only.


Filed from a repo-wide code audit (working tree at bcad746).

Lingua principale
Rust
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di GoogleBot42/podd

Tutte le issue di GoogleBot42/podd

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.