mickeyl / LTSupportAutomotive

An iOS / watchOS / macOS support library for OBD2, VIN-Decoding, and more.
MIT License
212 stars 59 forks source link

How to check engine light is on or off? #19

Closed JRJian closed 5 years ago

JRJian commented 5 years ago

I haven't found the API which can read the engine light status.

JRJian commented 5 years ago

found it. LTOBD2CommandELM327_IGNITION_STATUS

mickeyl commented 5 years ago

While LTOBD2CommandELM327_IGNITION_STATUS will definitely do what it's supposed to, please note that all the implementations of ELM327 that I know are having ATIGN wrongly implemented and will return ON as soon as the chip has power, i.e. no matter whether you really have ignition on or not.

Unfortunately there doesn't seem to be a way to reliably tell this by looking at the OBD2 responses – at least I don't know any. The only thing you can tell is whether the engine is actually running or not (by checking RPM).

JRJian commented 5 years ago

@mickeyl Thanks for your comment. After reading your comment, I changed to use RPM to detect engine light status.