dalathegreat / Nissan-LEAF-Battery-Upgrade

Software and guides for upgrading LEAFs to bigger and newer batteries
GNU General Public License v3.0
218 stars 39 forks source link

Add up all the nibbles in CSUM #3

Closed InfantEudora closed 1 month ago

InfantEudora commented 12 months ago

Hi, In your video: https://www.youtube.com/watch?v=oENNNfy5GSM you mention CSUM adds up all the nibbles, and add 2.

Mux's / Your code adds up only the nibbles from the first 7 bytes by the look of it, in calc_sum4 I was checking out some 1F2 messages from your log file, also this guy seems to send them: https://github.com/49thdiver/EV-Projects/blob/main/OBC/src/definitions.h But they don't add up at all.

Most 1F2 messages from your log have 0 for the last nibble, so it works. But your DBC file has a bit in that nibble: "unknown - may indicate charging"

dalathegreat commented 12 months ago

Not sure what is the question here?

calc_sum4 seems to work just fine, but does not fix anything. Running the code without recalculating the CSUM doesn't trigger any fault codes.

InfantEudora commented 12 months ago

I guess the question is: Is the CSUM calculation used in that message? It seems to work without it right?

dalathegreat commented 1 month ago

Yup, seems like no benefit. Closing this for now!