summaryrefslogtreecommitdiff
path: root/lpo/MyOBD.h
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2021-06-12 00:42:19 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2021-06-12 00:42:19 +0200
commit7b6035179821fd7a7553ac3b60f36e84fc1cccd4 (patch)
tree45b98e634661fa1d9cc7efafacf892b5d5999d0f /lpo/MyOBD.h
parentc2d1ca81d9bcc4b5a1fbf93e61af1db14a7e5158 (diff)
download2021-arduino-obd-7b6035179821fd7a7553ac3b60f36e84fc1cccd4.tar.gz
2021-arduino-obd-7b6035179821fd7a7553ac3b60f36e84fc1cccd4.tar.bz2
2021-arduino-obd-7b6035179821fd7a7553ac3b60f36e84fc1cccd4.zip
Import inital sketch lpo pour dumper les DTC et des valeurs live
Diffstat (limited to 'lpo/MyOBD.h')
-rw-r--r--lpo/MyOBD.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/lpo/MyOBD.h b/lpo/MyOBD.h
new file mode 100644
index 0000000..ea143be
--- /dev/null
+++ b/lpo/MyOBD.h
@@ -0,0 +1,32 @@
+#ifndef __MYOBD_H
+#define __MYOBD_H
+#include <OBD.h>
+class MyOBD : public COBDI2C {
+ public:
+ /* Fake OBD for testing
+ int i;
+ MyOBD() {
+ i=0;
+ }
+ byte begin() {
+ delay(500);
+ return 1;
+ }
+ bool init() {
+ delay(500);
+ return ++i>4;
+ }
+ bool readPID(byte pid, int& result) {
+ result=millis();
+ if ( result%1000 == 0 ) { this->errors++; }
+ return true;
+ }
+ byte readDTC(uint16_t codes[], byte maxCodes = 1) {
+ codes[0]=6002;
+ codes[1]=6032;
+ codes[2]=12;
+ return 4;
+ }
+ */
+};
+#endif