Files
panda-meb/board/comms_definitions.h
Jason Huang 7c0c1d956b Body v2: Hoverboard Motors (#2308)
* body

* hoverboard motors

* pass test

* body ignition exception and remove used comms

Co-authored-by: rexblade21 <zkhuang4968@gmail.com>

* send extra empty message to distinguish fingerprint

* can.h body v2 put safety hook = 1

* change v2 extra id to 0x396

* fix mirsa style error

* move ignition exception to seperate bus 2 if statement

* silence heartbeat siren on body

* turn ignition off on switch repress

* 0x250 interception in panda fw

* send extra body data, same as v1 body

* cleanup data passing for more predictable inputs and lower rpm deadband

* remove extra downscaling

* change v2 fingerprint from 0x002 to 0x222

* clean up, bus 0 ignition exception and trq mode

* keep in SPD mode for now

* remove comment

* clean

* apply suggestions

---------

Co-authored-by: stefpi <19478336+stefpi@users.noreply.github.com>
2026-04-08 09:17:01 -07:00

15 lines
416 B
C

#pragma once
typedef struct {
uint8_t request;
uint16_t param1;
uint16_t param2;
uint16_t length;
} __attribute__((packed)) ControlPacket_t;
int comms_control_handler(ControlPacket_t *req, uint8_t *resp);
void comms_endpoint2_write(const uint8_t *data, uint32_t len);
void comms_can_write(const uint8_t *data, uint32_t len);
int comms_can_read(uint8_t *data, uint32_t max_len);
void comms_can_reset(void);