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

Add CAN bus safety

Aperta
#12 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

Direzione di ricerca

Start with boards/esp/src/can.rs:127 for the hard-coded TWAI bitrate, then inspect the [[hardware.esp.can_buses]] configuration and the MCP2515 can_speed setting. The remaining work spans bitrate validation, CAN-FD read-only behavior, exposing RX health in system state, and BLE/debug-only read-only control; done means those safety requirements are implemented and verified across the affected platform and app paths.

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

Descrizione

The firmware should ensure the CAN bus is healthy at all time. For development purposes, there should be a way to control the CAN read-only mode. And on each boot, before sending any CAN messages, we need to make sure the car is the right one for the firmware. So each platform implementations need a way to detect what cars they are plugged into (VIN is probably a good way).

Remaining from the audit

Done on main: listen-only while read-only, bus-off restart, bounded TX, per-bus
TX queues.

  • Configurable bitrate. TWAI is hard-coded to 500 kbps
    (boards/esp/src/can.rs:127). Add bitrate to [[hardware.esp.can_buses]]
    (MCP2515 already has can_speed). The vehicle crate (or meta.toml) should
    declare the expected bitrate per bus so xtask can check it.
  • CAN-FD buses. Several E-GMP buses are CAN-FD. The TWAI isn't FD-tolerant:
    in listen-only it only sees errors, but in Normal mode it will error-frame
    every FD frame. Refuse to leave read-only on a bus declared FD, or document it.
  • Expose bus health (the new RX stats: errors, overruns, bus-offs) in system
    state so the app can show it, not just on the serial log.
  • Dev control of read-only mode: when added, BLE + debug builds only,
    never MQTT.
Lingua principale
Rust
Stelle
1
Fork
0
Merge medio
10h 56m
PR unite (30g)
15

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.