summaryrefslogtreecommitdiff
path: root/libraries/OBD2UART/OBD2UART.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/OBD2UART/OBD2UART.cpp')
-rw-r--r--libraries/OBD2UART/OBD2UART.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/libraries/OBD2UART/OBD2UART.cpp b/libraries/OBD2UART/OBD2UART.cpp
index 4e9a8de..0352c6a 100644
--- a/libraries/OBD2UART/OBD2UART.cpp
+++ b/libraries/OBD2UART/OBD2UART.cpp
@@ -257,12 +257,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;