From 6884a5731ae4bbae7a3457b332e00174e5abe080 Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Sat, 29 Jun 2013 11:53:55 +0800 Subject: fix serial UART initialization bug --- libraries/OBD/OBD.cpp | 4 ++-- libraries/OBD/OBD.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'libraries/OBD') 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); -- cgit v1.2.3