android-obd-reader icon indicating copy to clipboard operation
android-obd-reader copied to clipboard

Add Mode 22 Support

Open malibu1320 opened this issue 9 years ago • 6 comments

Would be nice to work on adding mode 22 support for enhanced PID's. I can assist.

malibu1320 avatar Oct 12 '16 19:10 malibu1320

Please, go ahead. github.com/pires/obd-java-api is where it should be implemented.

pires avatar Oct 12 '16 19:10 pires

Do you have any guidance on what needs to be modified? I'm not seeing where the base request header is setup that needs changed. I have the source running locally and connected to my bench PCMs.

malibu1320 avatar Oct 12 '16 20:10 malibu1320

Share here what you have and I'll take a look.

pires avatar Oct 12 '16 21:10 pires

Here's an example for GM vs standard OBD. You request on mode $22 with PID "119D". Now I need to see where to adjust analyzing the buffer for a valid response.

public BarometricPressureCommand() {super("01 33");} //Standard OBD PID
public GMBarometricPressureCommand() {super("22 11 9D"); //GM Mode $22 PID

malibu1320 avatar Oct 13 '16 15:10 malibu1320

@pires , do you have any tips on how I can implement this? I tried adding new command classes as seen above and adjusting the buffer offset for finding the data but didn't have any luck (yet).

malibu1320 avatar Oct 25 '16 17:10 malibu1320

Just override fillBuffer or readRawData, depending on your needs.

pires avatar Oct 25 '16 17:10 pires