Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Limit how often the same command can repeat

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

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
embedded-iot

Direzione di ricerca

Start with docs/commands.md and the CommandRequirements::check entry point named in the issue; trace how commands are admitted before frames are built. Decide the guard’s scope, where it lives, and how each command declares an interval, then add host tests and document the rule. Done means every implemented command declares its interval and repeated commands are rejected as described.

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

Descrizione

enhancement

Part of the prerequisites for real commands (#75). Related: #73, #15.

Problem

Nothing stops the same command from reaching the car many times in a row. A stuck button, an app bug or a replayed message would send its frames to the bus again and again. #15 dedupes a redelivered message_id, but a stuck button sends a new message_id each time, so it doesn't help here.

Proposal

  • A minimum interval between two runs of the same command, checked right after the command requirements (CommandRequirements::check, see docs/commands.md) and before any frame is built.
  • A command inside the interval gets a failed CommandResponse with COMMAND_STATUS_CODE_REJECTED_UNAVAILABLE and a clear message, like any other rejection. Whether it is also reported unavailable until the interval has passed is to decide: it would grey the button out, but flickers after every press.
  • The interval is per command, set by each command's PR from how the car behaves (a door lock and a climate target temperature step don't need the same). Commands that are meant to be repeated quickly, such as stepping the target temperature, can use a short one or none.

To decide

  • Per command, per phone (source_device_id), or both?
  • Where the check lives: a small generic guard in core-interface next to the requirements, with each vehicle passing its intervals.
  • What counts as a run: any admitted command, or only one that was sent to the bus.

Done when

There is a guard with host tests, the docs describe the rule, and each implemented command declares its interval.

Lingua principale
Rust
Stelle
1
Fork
0
Merge medio
15h 26m
PR unite (30g)
22

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Nessun Dockerfile né file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

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 OpenCarControls/firmware

Tutte le issue di OpenCarControls/firmware

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.