Update XPENG G6 profile #568
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

I managed to get all the PIDs for the XPENG G6 from an OBD app, but there is something that is not working perfectly fine.
There are two types of PIDs, the ones that come from the VCU and the ones from the BMS. The problem is that the init commands to initialize those PIDs are different, and conflict between them.
What the original app does is this:
ATZ;ATE0;ATH1;ATSP6;ATS0;ATM0;ATAT1;ATSH7E0;ATFCSH704;ATFCSD300000;ATFCSM1;ATCRA784ATFCSM0;ATARSince the wican firmware doesn't have this pre/post functionality, I tried to mimick that with the approach in the PR. I'm not sure it's the best approach, but at least I got some numbers that appear quite similar to the ones reported by the OBD app.
I still have to check the values while moving the car, to make sure they are reported correctly, so I wouldn't merge this PR yet. There's a couple that I think are not correct, but I wanted to share it early in case somebody else want to help me test it meanwhile.
A few random notes:
IsNo, doesn't look like it.220320([VCU] Fast charging voltage) actually GPS altitude? (source)220318([VCU] Rear motor speed (G6/G9)) is correct for my G6 LR with this formula:[B4:B5]-16000.0.[BMS] Vehicle speedI think is220104([BMS] RES(PID_010D)) and the value is correct