The ZombieVerter VCU Project

Kelju
Posts: 104
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland

Re: The ZombieVerter VCU Project

Post by Kelju »

Is it so that one cannot have messages with the same id on both the powertrain- and vehicle CAN?
User avatar
johu
Site Admin
Posts: 3549
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Contact:

Re: The ZombieVerter VCU Project

Post by johu »

Kelju wrote: Sun May 15, 2022 9:21 pm Is it so that one cannot have messages with the same id on both the powertrain- and vehicle CAN?
Good point. I guess this should be different callback functions. Since powertrain and vehicle CAN may be configured a common handler should be called with the interface number.

Code: Select all

void CommonHandler(int interface, int id, uint32_t data[2])
{
  code...
}

void Can1Handler(int id, uint32_t data[2])
{
  CommonHandler(0, id, data);
}


void Can2Handler(int id, uint32_t data[2])
{
  CommonHandler(1, id, data);
}
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
EV_Builder
Posts: 799
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands

Re: The ZombieVerter VCU Project

Post by EV_Builder »

Kelju wrote: Sun May 15, 2022 9:21 pm Is it so that one cannot have messages with the same id on both the powertrain- and vehicle CAN?
Good point. @Johu why does the callback Influence that? You would think it won't have a clue about ID's...
User avatar
johu
Site Admin
Posts: 3549
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Contact:

Re: The ZombieVerter VCU Project

Post by johu »

EV_Builder wrote: Mon May 16, 2022 6:06 am Good point. @Johu why does the callback Influence that? You would think it won't have a clue about ID's...
Because if there are mutual IDs you need to also distinguish which interface it is coming from
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
EV_Builder
Posts: 799
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands

Re: The ZombieVerter VCU Project

Post by EV_Builder »

johu wrote: Mon May 16, 2022 11:03 am Because if there are mutual IDs you need to also distinguish which interface it is coming from
Uhhh yeah that solves an identity problem, but what I have/deal with is no reception of same IDs at all?
Post Reply