The ZombieVerter VCU Project

Locked
User avatar
Jack Bauer
Posts: 3648
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Hmmm....the frame certainly "looks" similar on the logic analyser and scope shot. I messed about with hsdn,ilk,ilko,igct. No effects. Does the data I captured make any sense?
I'm going to need a hacksaw
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: The ZombieVerter VCU Project

Post by Dilbert »

I just pulled the logicdata file there. What is the best application to review the waveforms?
User avatar
Jack Bauer
Posts: 3648
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

https://www.saleae.com/downloads/

You'll want version 1.2.18 as my analyser is quite old:) it can export to csv etc.
I'm going to need a hacksaw
User avatar
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

Post by mdrobnak »

Ugh. I don't understand why reverse is still a problem. Let me put it all the way back, to see if it's even there that's causing the issue.
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: The ZombieVerter VCU Project

Post by Dilbert »

Perfect i'll have a look later.

I'm kinda thinking it's not the encoding/timing as all that stuff works pretty reliably for the GS450H. So it must be something in how we are sending the data.

I'm trying to figure out how to replay the logged data on the HTM from our ECU
User avatar
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

Post by mdrobnak »

Nope, found the issue.

This is why C sucks sometimes.

I did gear = ... instead of this-> gear = ... AND IT COMPILED?!

No idea why.

Try now. :)
User avatar
Jack Bauer
Posts: 3648
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Thanks Matt as usual:) I only have about 4 inches of driveway left before the E65 makes contact with the E31 so here's hoping reverse works this time:)
I'm going to need a hacksaw
User avatar
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

Post by mdrobnak »

That's what Park Distance Control is for :D
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: The ZombieVerter VCU Project

Post by Dilbert »

I'm considering connecting the rx pins on two can transceivers to the rx pins on two ftdi cables and open at 500kbps for logging and see if we can capture more MTH and htm frames.

Capture into two binary files and write a python script to extract them to csv.

Based on what we have seen with the stm32 it should be possible to recover the data
User avatar
Jack Bauer
Posts: 3648
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

We have reverse! Dilbert, let me know if you need me to setup anything on my end. Have ftdi cables etc.
I'm going to need a hacksaw
User avatar
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

Post by mdrobnak »

Awesome. See, I make silly mistakes too. :D

Ok, if we're happy with this, please merge this PR: https://github.com/damienmaguire/Stm32-vcu/pull/5
and then I'll clean up the E65 PR to include the recent fixes. Then master will be one step closer to lates-and-greatest.

-Matt
User avatar
Jack Bauer
Posts: 3648
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Merged:) Finally got some work done on the E46 so hope to get a vcu fitted to that car over the next few days for leaf and integration testing. Also have to start looking at a charger control module. Lots of hacky Damien code on the way:)
I'm going to need a hacksaw
User avatar
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

Post by mdrobnak »

Jack Bauer wrote: Thu Jan 21, 2021 5:47 pm Merged:) Finally got some work done on the E46 so hope to get a vcu fitted to that car over the next few days for leaf and integration testing. Also have to start looking at a charger control module. Lots of hacky Damien code on the way:)
Nice!

I'm definitely conflicted on the charger code, I'm sure you can understand why. ;)

-Matt
User avatar
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

Post by mdrobnak »

I had to re-fix again the submodule stuff in master, but that is indeed done.

E65 PR is up-to-date with all fixes from the submodules_and_split branch:
https://github.com/damienmaguire/Stm32-vcu/pull/6

There's probably a better workflow than what I'm doing, but both PRs are now significantly easier to read. Please feel free to go to a given line in a file, and then you'll see a blue + appear, where you can add comments / ask questions.

Else, hit merge. :)

-Matt
User avatar
Jack Bauer
Posts: 3648
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Ok merged them in, did a pull then get :

Code: Select all

  GIT SUBMODULE
fatal: could not get a repository handle for submodule 'libopencm3'
make: *** [Makefile:115: get-deps] Error 1
I'm going to need a hacksaw
User avatar
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

Post by mdrobnak »

uhhhhhhhhhhhhh
User avatar
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

Post by mdrobnak »

Good news:
git pull in mine works fine.

thankfully the code base is small, so just re-clone to another directory.

I'd bet money you have files in the libopencm3 folder (nvic.h) and it's having trouble reconciling that on the master branch.

It can be fixed, but I'd make a backup copy of the folder first so you don't lose anything you're in progress with (this is the reason I suggested re-cloning).
(git reset and git restore are some of the commands you'd need)

-Matt
User avatar
Jack Bauer
Posts: 3648
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

That solved it. Thanks Matt. when I said charger module I didn't mean things like ccs etc just controlling some can based onboard chargers like volt etc.
I'm going to need a hacksaw
User avatar
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

Post by mdrobnak »

Jack Bauer wrote: Thu Jan 21, 2021 8:47 pm That solved it. Thanks Matt. when I said charger module I didn't mean things like ccs etc just controlling some can based onboard chargers like volt etc.
Ok hopefully we don't have too many git fun times in the future. It'll come more naturally over time.

Re: charger - Yeah, just the potential overlap between the other code and this for the PCS... some of that took us quite some time to get going :D
User avatar
johu
Site Admin
Posts: 6645
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 349 times
Been thanked: 1508 times
Contact:

Re: The ZombieVerter VCU Project

Post by johu »

Added my first pull request :)
libopeninv as submodule.
Actually wanted that on a new branch but was too stupid ;)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Jack Bauer
Posts: 3648
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 288 times
Contact:

Re: The ZombieVerter VCU Project

Post by Jack Bauer »

Thanks Johannes. Merged in and cloned locally and get this on Make :

Code: Select all

make[1]: Leaving directory '/home/damien/bin/VCU/Stm32-vcu/libopencm3'
  CPP     obj/stm32_vcu.o
  CPP     obj/hwinit.o
make: *** No rule to make target 'obj/stm32scheduler.o', needed by 'stm32_vcu'.  Stop.
I'm going to need a hacksaw
User avatar
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

Post by mdrobnak »

Oh no, new git users everywhere :D :D :D
User avatar
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

Post by mdrobnak »

Jack Bauer wrote: Fri Jan 22, 2021 1:25 pm Thanks Johannes. Merged in and cloned locally and get this on Make :

Code: Select all

make[1]: Leaving directory '/home/damien/bin/VCU/Stm32-vcu/libopencm3'
  CPP     obj/stm32_vcu.o
  CPP     obj/hwinit.o
make: *** No rule to make target 'obj/stm32scheduler.o', needed by 'stm32_vcu'.  Stop.
That's odd.

Code: Select all

mdrobnak@dell-cp2-md-ubuntu:~/vcs/git/Stm32-vcu$ cd ..
mdrobnak@dell-cp2-md-ubuntu:~/vcs/git$ cp -pr Stm32-vcu STM32-VCU-WORKING
mdrobnak@dell-cp2-md-ubuntu:~/vcs/git$ cd Stm32-vcu/
mdrobnak@dell-cp2-md-ubuntu:~/vcs/git/Stm32-vcu$ git fetch
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 12 (delta 7), reused 11 (delta 7), pack-reused 0
Unpacking objects: 100% (12/12), 2.02 KiB | 517.00 KiB/s, done.
From github.com:damienmaguire/Stm32-vcu
   d143c17..a1c3044  master     -> origin/master
Fetching submodule libopencm3
From https://github.com/jsphuebner/libopencm3
   b70da8df..4424e4a5  master     -> origin/master
mdrobnak@dell-cp2-md-ubuntu:~/vcs/git/Stm32-vcu$ cat .gitmodules 
[submodule "libopencm3"]
	path = libopencm3
	url = https://github.com/jsphuebner/libopencm3
mdrobnak@dell-cp2-md-ubuntu:~/vcs/git/Stm32-vcu$ git status
On branch master
Your branch is behind 'origin/master' by 4 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	gs1.diff
	gs450.diff
	other.diff
	src/cdiff

nothing added to commit but untracked files present (use "git add" to track)
mdrobnak@dell-cp2-md-ubuntu:~/vcs/git/Stm32-vcu$ git pull
Updating d143c17..a1c3044
Fast-forward
 .gitmodules                         |    3 +
 Makefile                            |    2 +-
 libopencm3                          |    2 +-
 libopeninv                          |    1 +
 libopeninv/LICENSE                  |  165 -------------
 libopeninv/README.md                |    2 -
 libopeninv/include/anain.h          |   46 ----
...
stm32-vcu.cbp                       |   10 +-
 39 files changed, 21 insertions(+), 6246 deletions(-)
 create mode 160000 libopeninv
 delete mode 100644 libopeninv/LICENSE
 delete mode 100644 libopeninv/README.md
 delete mode 100644 libopeninv/include/anain.h
 delete mode 100644 libopeninv/include/digio.h
 delete mode 100644 libopeninv/include/errormessage.h
...
mdrobnak@dell-cp2-md-ubuntu:~/vcs/git/Stm32-vcu$ make clean
  CLEAN   obj
  CLEAN   stm32_vcu
  CLEAN   stm32_vcu.bin
  CLEAN   stm32_vcu.hex
  CLEAN   stm32_vcu.srec
  CLEAN   stm32_vcu.list
mdrobnak@dell-cp2-md-ubuntu:~/vcs/git/Stm32-vcu$ make get-deps
  GIT SUBMODULE
Submodule 'libopeninv' (https://github.com/jsphuebner/libopeninv.git) registered for path 'libopeninv'
Cloning into '/home/mdrobnak/vcs/git/Stm32-vcu/libopeninv'...
Submodule path 'libopencm3': checked out '4424e4a528a9131323d4d38dd6450c58814603cb'
Submodule path 'libopeninv': checked out '216da9a441efcce59803fde583621002727383d3'
  MAKE libopencm3
make[1]: Entering directory '/home/mdrobnak/vcs/git/Stm32-vcu/libopencm3'
  GENHDR  include/libopencm3/stm32/f0/irq.json
  GENHDR  include/libopencm3/stm32/f1/irq.json
  GENHDR  include/libopencm3/stm32/f2/irq.json
  GENHDR  include/libopencm3/stm32/f3/irq.json
  GENHDR  include/libopencm3/stm32/f4/irq.json
  GENHDR  include/libopencm3/stm32/f7/irq.json
...
mdrobnak@dell-cp2-md-ubuntu:~/vcs/git/Stm32-vcu$ make
  GIT SUBMODULE
  MAKE libopencm3
make[1]: Entering directory '/home/mdrobnak/vcs/git/Stm32-vcu/libopencm3'
  GENHDR  include/libopencm3/stm32/f0/irq.json
  GENHDR  include/libopencm3/stm32/f1/irq.json
  GENHDR  include/libopencm3/stm32/f2/irq.json
...
make[2]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/mdrobnak/vcs/git/Stm32-vcu/libopencm3'
  CPP     obj/stm32_vcu.o
  CPP     obj/hwinit.o
  CPP     obj/stm32scheduler.o
  CPP     obj/params.o
  CPP     obj/terminal.o
  CPP     obj/terminal_prj.o
  CC      obj/my_string.o
....
warnings to fix...
src/leafinv.cpp: In static member function 'static void LeafINV::Send100msMessages()':
src/leafinv.cpp:323:14: warning: unused variable 'canData' [-Wunused-variable]
  323 |     uint32_t canData[2] = { 0, 0 };
      |              ^~~~~~~
  CPP     obj/utils.o
  CPP     obj/terminalcommands.o
  LD      stm32_vcu
  OBJCOPY stm32_vcu.bin
  OBJCOPY stm32_vcu.hex
   text	   data	    bss	    dec	    hex	filename
  24952	   2504	   1124	  28580	   6fa4	stm32_vcu
Did you do anything different?

EDIT: Tried with a fresh clone, worked fine as well. Super odd.
User avatar
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

Post by mdrobnak »

johu wrote: Fri Jan 22, 2021 12:20 pm Added my first pull request :)
libopeninv as submodule.
Actually wanted that on a new branch but was too stupid ;)
Thanks, that was a longer term goal, but wasn't sure if the changes were appropriate or not, so didn't open a PR to your side. :) I wasn't sure if there was a better way to do things than modifying that layer.

So, one of the points of a PR is the review process. The person reviewing should look over the code for anything they see, ask questions about things that seem odd to them, and test it locally if possible - before merging to master. Master should be relatively well tested code if possible. :)

Branches are cheap, (ie they're little overhead) so we should use them (as we have been with submodules_and_split) That said it's probably almost time for that branch to die.

Ideally you branch per feature, to kind of isolate your work. Always make sure you're up to date before starting new with - ie "git pull". Then git checkout -b my_new_awesome_feature. Do your work, "git add" any changes, "git commit", then git push. When you think it's ready, open a PR. :)

Dilbert:
I see you've forked the repo, great. I want to make sure you get credit for your work, so I look forward to a PR with your name on it. :)

-Matt
User avatar
johu
Site Admin
Posts: 6645
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 349 times
Been thanked: 1508 times
Contact:

Re: The ZombieVerter VCU Project

Post by johu »

ok thanks, will try next time. Actually I have updated the CHAdeMO module in stm32-car so I could PR that next

Also cloned Damien repo and compilation is a bit rough.

First time make: it tries to build but can't because it doesn't have the deps. THEN it pulls the deps.
Second time make: it generates the headers again and then makes flawlessly

I personally wouldn't run get-deps in the default target as it clutters the screen on every build even if you changed just one file.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Locked