summaryrefslogtreecommitdiff
path: root/lpo/MyOBD.h
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2021-06-13 13:21:21 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2021-06-13 13:21:21 +0200
commit0fba6d59eb011c6254ba67e51462205eadad007a (patch)
tree40a7605914c8566d44c45458a4c680984624aa70 /lpo/MyOBD.h
parent0282f200a3e0236f5baca9d3fd9db2fb2b66c5e6 (diff)
download2021-arduino-obd-master.tar.gz
2021-arduino-obd-master.tar.bz2
2021-arduino-obd-master.zip
MyOBD : make debug runtime-controllable, lpo.ino: wait(20s) before readPID loopHEADmaster
Diffstat (limited to 'lpo/MyOBD.h')
-rw-r--r--lpo/MyOBD.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/lpo/MyOBD.h b/lpo/MyOBD.h
index f2124c3..0f3004d 100644
--- a/lpo/MyOBD.h
+++ b/lpo/MyOBD.h
@@ -7,13 +7,18 @@ extern MyLCD lcd;
class MyOBD : public COBDI2C {
public:
+ int debug;
+ MyOBD() {
+ debug=0;
+ }
void write(const char* s) {
- lcd.print("<<<"); lcd.println(s);
+ if (this->debug) lcd.print("<<<"); lcd.println(s);
COBDI2C::write(s);
}
byte receive(char* buffer, byte bufsize, int timeout) {
byte res = COBDI2C::receive(buffer,bufsize, timeout);
- lcd.print(">>>"); lcd.println(buffer);
+ if (this->debug) lcd.print(">>>"); lcd.println(buffer);
+ return res;
}
/* Fake OBD for testing
int i;