The ZombieVerter VCU Project
- Jack Bauer
- Posts: 3646
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 288 times
- Contact:
Re: The ZombieVerter VCU Project
Ok, think I got our problem : as we are in opmode off we do :
if(targetVehicle == _vehmodes::BMW_E65) E65Vehicle.DashOff();
which sets the boolean to false.
Then we go back to our 100ms loop and do :
if(targetVehicle == _vehmodes::BMW_E65)
{
E65Vehicle.DashOn();
The boolean tests false so we resend and so on.
if(targetVehicle == _vehmodes::BMW_E65) E65Vehicle.DashOff();
which sets the boolean to false.
Then we go back to our 100ms loop and do :
if(targetVehicle == _vehmodes::BMW_E65)
{
E65Vehicle.DashOn();
The boolean tests false so we resend and so on.
I'm going to need a hacksaw
- mdrobnak
- Posts: 692
- Joined: Thu Mar 05, 2020 5:08 pm
- Location: Colorado, United States
- Has thanked: 1 time
- Been thanked: 5 times
Re: The ZombieVerter VCU Project
Ah, yes, that's it.
So it should be Dash on if T15 true only, and then that'll stop the ping pong, yes?
So it should be Dash on if T15 true only, and then that'll stop the ping pong, yes?
- Jack Bauer
- Posts: 3646
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 288 times
- Contact:
Re: The ZombieVerter VCU Project
Yes exactly. dashOn only if t15 true then reset the boolena when t15 false and we should be set......or clear..........or.......aaahhhhhh:)) Sorry couldn't resist:)
I'm going to need a hacksaw
- mdrobnak
- Posts: 692
- Joined: Thu Mar 05, 2020 5:08 pm
- Location: Colorado, United States
- Has thanked: 1 time
- Been thanked: 5 times
Re: The ZombieVerter VCU Project
Code: Select all
if(targetVehicle == _vehmodes::BMW_E65)
{
if (E65Vehicle.getTerminal15())
{
E65Vehicle.DashOn();
Param::SetInt(Param::T15Stat,true);
}
else
{
Param::SetInt(Param::T15Stat,false);
}
}
else
{
E65Vehicle.DashOff();
}
- mdrobnak
- Posts: 692
- Joined: Thu Mar 05, 2020 5:08 pm
- Location: Colorado, United States
- Has thanked: 1 time
- Been thanked: 5 times
Re: The ZombieVerter VCU Project
Bah, implicit conversion. Bad Damien.
Code: Select all
if(targetVehicle == _vehmodes::BMW_E65)
{
if (E65Vehicle.getTerminal15())
{
E65Vehicle.DashOn();
Param::SetInt(Param::T15Stat,1);
}
else
{
Param::SetInt(Param::T15Stat,0);
}
}
else
{
E65Vehicle.DashOff();
}
- Jack Bauer
- Posts: 3646
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 288 times
- Contact:
Re: The ZombieVerter VCU Project
Ok looks good on the bench. Will test in the car tomorrow:)
I'm going to need a hacksaw
- mdrobnak
- Posts: 692
- Joined: Thu Mar 05, 2020 5:08 pm
- Location: Colorado, United States
- Has thanked: 1 time
- Been thanked: 5 times
Re: The ZombieVerter VCU Project
Ok, rinsing and repeating with GS450 stuff next. That is definitely a large chunk, and that'll probably go a long way to making the main file a little more readable.
- mdrobnak
- Posts: 692
- Joined: Thu Mar 05, 2020 5:08 pm
- Location: Colorado, United States
- Has thanked: 1 time
- Been thanked: 5 times
Re: The ZombieVerter VCU Project
Submodules and split branch updated:
commit eda8d42e1935609810c894d468bcb788220fa700 (HEAD -> submodules_and_split, origin/submodules_and_split)
Author: Matthew Drobnak <matthew@drobnak.com>
Date: Fri Jan 15 22:36:27 2021 -0800
GS450H: Rename class to GS450HClass.
GS450H: Move 100ms task into class.
GS450H: Create setTimerState function to start / stop timers for Serial data.
commit 9a7ff4052c90718575e9357f04da2e677aeb1b88
Author: Matthew Drobnak <matthew@drobnak.com>
Date: Fri Jan 15 22:16:52 2021 -0800
Rename Module_Inverter to targetInverter.
Update targetInverter to use _invmodes Enum instead of #defines values.
commit 68ef653667c9baecc88ac9e3ba8b125fa40d6bf3
Author: Matthew Drobnak <matthew@drobnak.com>
Date: Fri Jan 15 21:56:34 2021 -0800
Add utils namespace.
Move change function into utils namespace.
Move PostErrorIfRunning function into utils namespace.
Move GetDigInputs function into utils namespace.
Move GetUserThrottleCommand function into utils namespace.
Move SelectDirection function into utils namespace.
Move ProcessUdc function into utils namespace.
Move ProcessThrottle function into utils namespace.
Remove some whitespace.
Rename speed to previousSpeed for use with Rev limiter.
Move udc variable init closer to usage.
Move includes into stm32_vcu.h. Needs additonal cleanup.
commit eda8d42e1935609810c894d468bcb788220fa700 (HEAD -> submodules_and_split, origin/submodules_and_split)
Author: Matthew Drobnak <matthew@drobnak.com>
Date: Fri Jan 15 22:36:27 2021 -0800
GS450H: Rename class to GS450HClass.
GS450H: Move 100ms task into class.
GS450H: Create setTimerState function to start / stop timers for Serial data.
commit 9a7ff4052c90718575e9357f04da2e677aeb1b88
Author: Matthew Drobnak <matthew@drobnak.com>
Date: Fri Jan 15 22:16:52 2021 -0800
Rename Module_Inverter to targetInverter.
Update targetInverter to use _invmodes Enum instead of #defines values.
commit 68ef653667c9baecc88ac9e3ba8b125fa40d6bf3
Author: Matthew Drobnak <matthew@drobnak.com>
Date: Fri Jan 15 21:56:34 2021 -0800
Add utils namespace.
Move change function into utils namespace.
Move PostErrorIfRunning function into utils namespace.
Move GetDigInputs function into utils namespace.
Move GetUserThrottleCommand function into utils namespace.
Move SelectDirection function into utils namespace.
Move ProcessUdc function into utils namespace.
Move ProcessThrottle function into utils namespace.
Remove some whitespace.
Rename speed to previousSpeed for use with Rev limiter.
Move udc variable init closer to usage.
Move includes into stm32_vcu.h. Needs additonal cleanup.
- Jack Bauer
- Posts: 3646
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 288 times
- Contact:
Re: The ZombieVerter VCU Project
....uuhhhh...Yeah! .....that's exactly what I was thinking:) Did a git pull and runs on the bench rig so will test in the cars asap. I'm going to have to break away for a day or two to help out some folks with the SAM3 based gs450 controller. At least that's arduino code so more tolerant of my programming "style"
Normal schedule will resume shortly.

I'm going to need a hacksaw
Re: The ZombieVerter VCU Project
Great I'll pull down the latest version and add some code for the Prius / Auris in
- Jack Bauer
- Posts: 3646
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 288 times
- Contact:
Re: The ZombieVerter VCU Project
Thanks Dilbert. Will have the test bench running early next week:)
I'm going to need a hacksaw
- mdrobnak
- Posts: 692
- Joined: Thu Mar 05, 2020 5:08 pm
- Location: Colorado, United States
- Has thanked: 1 time
- Been thanked: 5 times
Re: The ZombieVerter VCU Project
Ok, great. Once we are happy that it seems to work in cars, we should at least merge the submodule fix PR which will then make the rest of them make more sense, as they should shrink considerably.
Dilbert please base your branch off submodules_and_split branch as I think you'll find it a bit more organized.
That said, Damien has seen my code before it's cleaned up, it can be quite messy at times as well!
No worries on timing of testing Damien, understood about the other stuff needing some attention.
-Matt
Dilbert please base your branch off submodules_and_split branch as I think you'll find it a bit more organized.
That said, Damien has seen my code before it's cleaned up, it can be quite messy at times as well!

No worries on timing of testing Damien, understood about the other stuff needing some attention.
-Matt
- Jack Bauer
- Posts: 3646
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 288 times
- Contact:
Re: The ZombieVerter VCU Project
Thanks Matt. Its all good learning in any event. I made a struct today:)
I'm going to need a hacksaw
Re: The ZombieVerter VCU Project
I went to push up a new branch with support for the auris, but got a permissions error.
Looking at the auris data, there's about 20 zeros, I'm wondering is this for 3 motor systems to control the mgr. The main data appears to be in similar locations.
I haven't identified the battery capacity values yet, but I'm wondering do these change over time as the battery charges or would they be fixed
Looking at the auris data, there's about 20 zeros, I'm wondering is this for 3 motor systems to control the mgr. The main data appears to be in similar locations.
I haven't identified the battery capacity values yet, but I'm wondering do these change over time as the battery charges or would they be fixed
- mdrobnak
- Posts: 692
- Joined: Thu Mar 05, 2020 5:08 pm
- Location: Colorado, United States
- Has thanked: 1 time
- Been thanked: 5 times
Re: The ZombieVerter VCU Project
The github way to do this is to fork the project (button toward the top right, click on the word, not the number), push to your local fork of the code, and then open a pull request into the main project. Or Damien can add you as a contributor.Dilbert wrote: ↑Sun Jan 17, 2021 7:37 pm I went to push up a new branch with support for the auris, but got a permissions error.
Looking at the auris data, there's about 20 zeros, I'm wondering is this for 3 motor systems to control the mgr. The main data appears to be in similar locations.
I haven't identified the battery capacity values yet, but I'm wondering do these change over time as the battery charges or would they be fixed
If you need help with the git piece let me know.
-Matt
Re: The ZombieVerter VCU Project
I created the fork and cloned it locally. I'm now getting build errors on libopencm3
In file included from ../cm3/vector.c:22:
../../include/libopencm3/cm3/vector.h:41:10: fatal error: libopencm3/cm3/nvic.h: No such file or directory
#include <libopencm3/cm3/nvic.h>
In file included from ../cm3/vector.c:22:
../../include/libopencm3/cm3/vector.h:41:10: fatal error: libopencm3/cm3/nvic.h: No such file or directory
#include <libopencm3/cm3/nvic.h>
- johu
- Site Admin
- Posts: 6645
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 348 times
- Been thanked: 1508 times
- Contact:
Re: The ZombieVerter VCU Project
lacking python?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- Jack Bauer
- Posts: 3646
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 288 times
- Contact:
Re: The ZombieVerter VCU Project
I just uploaded those 2 files. I have them on my local repo. Don't know why they werent on the github version. Sorry!
I'm going to need a hacksaw
-
- Posts: 53
- Joined: Wed Jul 03, 2019 1:32 am
- Location: Central Virginia, USA
Re: The ZombieVerter VCU Project
I'm working my way thru that error with the main inverter code now. It appears the libopencm3 makefile uses python scripts to create a bunch of "repetitive" header .h files. I'm trying to do everything on a Windows machine, not Linux, because I'm old and stubborn. We'll see.Dilbert wrote: ↑Mon Jan 18, 2021 8:37 am I created the fork and cloned it locally. I'm now getting build errors on libopencm3
In file included from ../cm3/vector.c:22:
../../include/libopencm3/cm3/vector.h:41:10: fatal error: libopencm3/cm3/nvic.h: No such file or directory
#include <libopencm3/cm3/nvic.h>

Chaz Fisher
Slowly creeping up on that e-motorcycle.
Slowly creeping up on that e-motorcycle.
- Jack Bauer
- Posts: 3646
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 288 times
- Contact:
Re: The ZombieVerter VCU Project
Will be back working on this tomorrow with the prius gen 3 rig hopefully setup.
I'm going to need a hacksaw
- mdrobnak
- Posts: 692
- Joined: Thu Mar 05, 2020 5:08 pm
- Location: Colorado, United States
- Has thanked: 1 time
- Been thanked: 5 times
Re: The ZombieVerter VCU Project
Yikes.
There are windows specific build instructions on the github for libopencm3:
https://github.com/libopencm3/libopencm3
If that helps get you going with libopencm3, great!
Damien, were you able to test any of the cleanups? If we have more people joining, we should probably get that merged. Thanks!
-Matt
As pointed out:Dilbert wrote: ↑Mon Jan 18, 2021 8:37 am I created the fork and cloned it locally. I'm now getting build errors on libopencm3
In file included from ../cm3/vector.c:22:
../../include/libopencm3/cm3/vector.h:41:10: fatal error: libopencm3/cm3/nvic.h: No such file or directory
#include <libopencm3/cm3/nvic.h>
You're probably missing python. What's your build environment?
Errr...yeah, not your fault Damien. However that's probably not the right answer. What we probably should do is ask the maintainers of libopencm3 if they'll make an actual release tag with the headers generated for a ready-to-use version. Like the current state of the world here, I'm betting that library is still considered to be "not ready for prime time".Jack Bauer wrote: ↑Mon Jan 18, 2021 1:12 pm I just uploaded those 2 files. I have them on my local repo. Don't know why they werent on the github version. Sorry!
It's repetitive because it's generating a map of the interrupts that are different for all the supported ST / ARM platforms.ChazFisher wrote: ↑Mon Jan 18, 2021 3:45 pm I'm working my way thru that error with the main inverter code now. It appears the libopencm3 makefile uses python scripts to create a bunch of "repetitive" header .h files. I'm trying to do everything on a Windows machine, not Linux, because I'm old and stubborn. We'll see.![]()
There are windows specific build instructions on the github for libopencm3:
https://github.com/libopencm3/libopencm3
If that helps get you going with libopencm3, great!
Damien, were you able to test any of the cleanups? If we have more people joining, we should probably get that merged. Thanks!
-Matt
- johu
- Site Admin
- Posts: 6645
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 348 times
- Been thanked: 1508 times
- Contact:
Re: The ZombieVerter VCU Project
In my projects I'm using a libopencm3 fork anyway as they didn't want to merge all changes. I could include the generates headers if that really helps.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- mdrobnak
- Posts: 692
- Joined: Thu Mar 05, 2020 5:08 pm
- Location: Colorado, United States
- Has thanked: 1 time
- Been thanked: 5 times
Re: The ZombieVerter VCU Project
Oh, heh, we're pointing at your fork. Oops. Still too early here hehe.
Not sure if we should include them or not.
- Jack Bauer
- Posts: 3646
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 288 times
- Contact:
Re: The ZombieVerter VCU Project
Only bench tests so far. Will test in the E65 tomorrow and report back. Bit more work to do on the E46 before can test there.
I'm going to need a hacksaw