Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add CAN bus safety

Đang mở
#12 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
embedded-iot, networking

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Rust
Star
1
Fork
0
Merge trung bình
13 giờ 37 phút
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Không có Dockerfile hay tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của OpenCarControls/firmware

Tất cả issue của OpenCarControls/firmware

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.