arduino-OBD2 icon indicating copy to clipboard operation
arduino-OBD2 copied to clipboard

Added way to check if OBD is ready for another request

Open TwoTenPvP opened this issue 3 years ago • 1 comments

Great library and super useful.

I have a modified version I use to ensure the lib never blocks with delays. But I think this fix is good to have upstream to allow a simple check before entering a read. It does not do away with delays when reading large packets but is a step in the right direction. (I use a modified pidRead that returns a constant until it has all the responses to prevent delay, but that's for a different time)

TwoTenPvP avatar Jan 12 '22 16:01 TwoTenPvP

This also allows for some refactoring to lessen code reuse by calling this method instead of duplicating the check everywhere.

TwoTenPvP avatar Jan 12 '22 19:01 TwoTenPvP