From aa5b6250d0164963de25b214f3b15b07eb56ea42 Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Mon, 8 May 2017 21:18:48 +1000 Subject: Sync some stuff with Freematics ONE library --- libraries/OBD/OBD.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libraries/OBD/OBD.cpp') diff --git a/libraries/OBD/OBD.cpp b/libraries/OBD/OBD.cpp index 116a68d..d27fe7b 100644 --- a/libraries/OBD/OBD.cpp +++ b/libraries/OBD/OBD.cpp @@ -259,12 +259,19 @@ bool COBD::getResult(byte& pid, int& result) return true; } -void COBD::sleep() +void COBD::enterLowPowerMode() { char buf[32]; sendCommand("ATLP\r", buf, sizeof(buf)); } +void COBD::leaveLowPowerMode() +{ + // simply send any command to wake the device up + char buf[32]; + sendCommand("ATI\r", buf, sizeof(buf), 1000); +} + char* COBD::getResultValue(char* buf) { char* p = buf; -- cgit v1.2.3