mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 10:49:42 +02:00
Add RX handlign via struct
This commit is contained in:
parent
08f2c6ee3c
commit
572c9c050b
49 changed files with 171 additions and 211 deletions
|
@ -177,8 +177,8 @@ void update_values_can_inverter() { //This function maps all the values fetched
|
|||
#endif
|
||||
}
|
||||
|
||||
void receive_can_inverter(CAN_frame_t rx_frame) {
|
||||
switch (rx_frame.MsgID) {
|
||||
void receive_can_inverter(CAN_frame rx_frame) {
|
||||
switch (rx_frame.ID) {
|
||||
case 0x151: //Message originating from BYD HVS compatible inverter. Reply with CAN identifier!
|
||||
if (rx_frame.data.u8[0] & 0x01) { //Battery requests identification
|
||||
send_intial_data();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue