Sensor ack packets for DisablePiezo/GetHeaterOffset/ClearAlarm (0xA9/0xAA/0xAD) are not decoded

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
rust

Direzione di ricerca

Read crates/pod-proto/src/sensor/command.rs and the SensorPacket::parse match in crates/pod-proto/src/sensor/packet.rs to understand the command and packet types. Check how other sensor acknowledgements are decoded, then run the relevant codec or packet tests if available. Done means acknowledgements for 0xA9 and 0xAA decode instead of reaching Unexpected; confirm ClearAlarm's opcode and payload before including it.

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

Descrizione

enhancement

The three // TODO add resp packet + 0x80 markers in crates/pod-proto/src/sensor/command.rs:21,28,32 sit on DisablePiezo (0x29), GetHeaterOffset (0x2A), and ClearAlarm (0x2D). SensorPacket::parse (crates/pod-proto/src/sensor/packet.rs:135-160) has no arm for their acknowledgements (0xA9/0xAA/0xAD), so sending any of these would make the reply fall to the _ => Unexpected branch, which the codec logs as an error (codec.rs:85). All three commands are currently #[allow(dead_code)] and unused, so this only bites once they're wired up. ClearAlarm is additionally flagged UNVERIFIED / 'seems to be crashing the mcu' (command.rs:29), so its opcode/payload needs confirming before use.


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.