diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2021-06-13 13:01:31 +0200 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2021-06-13 13:01:31 +0200 |
commit | 0282f200a3e0236f5baca9d3fd9db2fb2b66c5e6 (patch) | |
tree | 157fc41c58b0abb58c7bda24a14e09588c238441 /lpo/MyOBD.h | |
parent | 8bf6263cbf36c27533c1d24dbbd183dc2ad91533 (diff) | |
download | 2021-arduino-obd-0282f200a3e0236f5baca9d3fd9db2fb2b66c5e6.tar.gz 2021-arduino-obd-0282f200a3e0236f5baca9d3fd9db2fb2b66c5e6.tar.bz2 2021-arduino-obd-0282f200a3e0236f5baca9d3fd9db2fb2b66c5e6.zip |
MyOBD: Trace every read and write to OBD adapter, lpo.ino: adapt for tracing
Extra for future : cap readDTC() call frequency to not struggle the CAN bus
Diffstat (limited to 'lpo/MyOBD.h')
-rw-r--r-- | lpo/MyOBD.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lpo/MyOBD.h b/lpo/MyOBD.h index ea143be..f2124c3 100644 --- a/lpo/MyOBD.h +++ b/lpo/MyOBD.h @@ -1,8 +1,20 @@ #ifndef __MYOBD_H #define __MYOBD_H #include <OBD.h> + +#include <MyLCD.h> +extern MyLCD lcd; + class MyOBD : public COBDI2C { public: + void write(const char* s) { + 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); + } /* Fake OBD for testing int i; MyOBD() { |