PowerBroker2 / ELMduino

Arduino OBD-II Bluetooth Scanner Interface Library for Car Hacking Projects
MIT License
587 stars 117 forks source link

Fix for Custom PIDs #218 #221

Closed jimwhitelaw closed 4 months ago

jimwhitelaw commented 5 months ago

Mode 0x22 response headers always zero-pad the pid to 4 chars, even for a 2-char pid. That confused the header detection and response parsing. This change checks for the mode and pid in findResponse() and adjusts the expected header accordingly.