diff options
author | Stanley Huang <stanleyhuangyc@gmail.com> | 2013-06-29 11:53:55 +0800 |
---|---|---|
committer | Stanley Huang <stanleyhuangyc@gmail.com> | 2013-06-29 11:53:55 +0800 |
commit | 6884a5731ae4bbae7a3457b332e00174e5abe080 (patch) | |
tree | 729f99ceb1939ee3924ef95d38edf9e89070e114 /libraries/OBD | |
parent | 17abc0d3cf9b226b06e5d62790a8d5e576846571 (diff) | |
download | 2021-arduino-obd-6884a5731ae4bbae7a3457b332e00174e5abe080.tar.gz 2021-arduino-obd-6884a5731ae4bbae7a3457b332e00174e5abe080.tar.bz2 2021-arduino-obd-6884a5731ae4bbae7a3457b332e00174e5abe080.zip |
fix serial UART initialization bug
Diffstat (limited to 'libraries/OBD')
-rw-r--r-- | libraries/OBD/OBD.cpp | 4 | ||||
-rw-r--r-- | libraries/OBD/OBD.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libraries/OBD/OBD.cpp b/libraries/OBD/OBD.cpp index 5a78de9..38fbf01 100644 --- a/libraries/OBD/OBD.cpp +++ b/libraries/OBD/OBD.cpp @@ -227,9 +227,9 @@ bool COBD::isValidPID(byte pid) return pidmap[i] & b; } -void COBD::begin(int baudrate) +void COBD::begin() { - OBDUART.begin(baudrate); + OBDUART.begin(OBD_SERIAL_BAUDRATE); } bool COBD::init(bool passive) diff --git a/libraries/OBD/OBD.h b/libraries/OBD/OBD.h index 144d0a9..28cc19d 100644 --- a/libraries/OBD/OBD.h +++ b/libraries/OBD/OBD.h @@ -43,8 +43,8 @@ unsigned char hex2uint8(const char *p); class COBD { public: - COBD():dataMode(1),errors(0) {} - void begin(int baudrate = OBD_SERIAL_BAUDRATE); + COBD():dataMode(1),errors(0) {} + void begin(); bool init(bool passive = false); bool readSensor(byte pid, int& result, bool passive = false); bool isValidPID(byte pid); |