I did manage to somewhat figure out how the PDP/PDH values are encoded. You can find what I did here.
But in summary everything is the same from version 3 except for this:
- There are 4 bytes before the PDP values now, these lets us know the PDP type (the 3rd byte is 25 for CTRE, 33 for REV, and 0 for No PDP)
- The PDP data encoding did not change for CTRE
- The PDH data encoding for REV:
- The first 20 channels are encoded via 10 bit decimals (7.3), every 3 channels make up a 32 bit block (the last 2 bits in the block are ignored) except for channels 18/19 which are in a 24 bit block with the last 4 bits ignored.
- The last 4 channels (20/21/22/23) are each encoded in their own single byte (4.4)
- Unlike CTRE the REV PDH does not provide a voltage and resistance value
- And for some reason the REV PDH data is encoded with little-endian even though everything else is in big-endian…
I think this is mostly right but, I only have tested it out on a few log files so far.