|
|
c22b81dfba
|
feat(can): update CAN 0x75 control frame layout for 16-bit speed and led_r/led_l
- can_ctrl_cmd_t.speed: uint8_t -> uint16_t (bytes 0-1, little-endian)
- Remove led_gpio field; add led_r (byte7 bit0) and led_l (byte7 bit7)
- byte6 now carries only led_enable (bit0), not the old gpio/enable packed format
- Update keepalive thread and can_bus_send_control_cmd() frame assembly accordingly
- Update all 6 can_ctrl_cmd_t call sites in event_recorder.c and app_header_init.c
- test_can_event() parameter type: uint8_t speed -> uint16_t speed
|
2026-06-17 11:42:01 +08:00 |
|
|
|
fd54f5cc0b
|
feat(can/rx): MCP2515 CAN RX interrupt thread for ECU ID 0x50
- can_bus.h: add can_ecu_status_t struct + can_bus_get_ecu_status() declaration
- can_bus.c: add gpio_interrupt_init() (gpio sysfs, falling-edge poll)
- can_bus.c: add can_rx_thread() - poll gpio63 INT pin, parse 0x50 frame
(throttle_status, pedal_volt, led_flash_timer, can_lose_ecu, throttle_limit_off, heart_beam)
with CAN_LOSE timeout detection (100ms)
- can_bus.c: start/join can_rx thread in can_bus_init()/can_bus_close()
- can_bus.c: add can_bus_get_ecu_status() thread-safe snapshot
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-06-12 16:47:18 +08:00 |
|