Tom-evnut / TeslaBMSV2

39 stars 32 forks source link

Victron Lynx VE.CAN Shunt + bugfixes #13

Closed relevante closed 4 years ago

relevante commented 4 years ago

Added CAN parsing for the Victron Lynx VE.CAN shunt for current measurement.

Also fixed a couple of bugs: one logical error with & instead of && in a comparison, and also that booleans were not being saved/interpreted correctly in EEPROM settings. They were getting saved/returned as 254 when false and 255 when true (because unused bits were left as 1), so they were always being interpreted as true (since 254 != 0). I just changed them in the struct to uint8_t which takes the same space as the bool in the EEPROM, but forces unused bits to zero.

vinistoisr commented 4 years ago

Relevante, Tom,

Can we use the Lynx VE.CAN code on the BMW file as well?

I have a BMV-712s connected, the GX can put its data onto ve.can, it might be the same PGNs as the Lynx...

Tom-evnut commented 4 years ago

No we cannot, Lynx is locked at 250 kbps I believe