diff options
author | Stanley Huang <stanleyhuangyc@gmail.com> | 2017-01-30 23:42:15 +1100 |
---|---|---|
committer | Stanley Huang <stanleyhuangyc@gmail.com> | 2017-01-30 23:42:15 +1100 |
commit | 8ce5b2fdea4f8321f3bdee8e43c4ac21b2826bbb (patch) | |
tree | 538f1ebd3fdf0af83c97a9950aa608a5b82d8e07 /libraries/OBD2UART/OBD2UART.h | |
parent | fb398f95a37434015e770991cdda6b821a97c84d (diff) | |
download | 2021-arduino-obd-8ce5b2fdea4f8321f3bdee8e43c4ac21b2826bbb.tar.gz 2021-arduino-obd-8ce5b2fdea4f8321f3bdee8e43c4ac21b2826bbb.tar.bz2 2021-arduino-obd-8ce5b2fdea4f8321f3bdee8e43c4ac21b2826bbb.zip |
Fixed manual setting protocol issue
Diffstat (limited to 'libraries/OBD2UART/OBD2UART.h')
-rw-r--r-- | libraries/OBD2UART/OBD2UART.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libraries/OBD2UART/OBD2UART.h b/libraries/OBD2UART/OBD2UART.h index 149e635..2103cc5 100644 --- a/libraries/OBD2UART/OBD2UART.h +++ b/libraries/OBD2UART/OBD2UART.h @@ -125,20 +125,16 @@ public: virtual float getVoltage(); // get VIN as a string, buffer length should be >= OBD_RECV_BUF_SIZE virtual bool getVIN(char* buffer, byte bufsize); - // get device temperature (in celsius degree) - virtual float getTemperature(); - // get accelerometer data - virtual bool readAccel(int& x, int& y, int& z); - // get gyroscope data - virtual bool readGyro(int& x, int& y, int& z); + // initialize MEMS sensor + virtual bool memsInit() { return version > 10; } + // read out MEMS data (acc for accelerometer, gyr for gyroscope, temp in 0.1 celcius degree) + virtual bool memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0); // send query for specified PID virtual void sendQuery(byte pid); // retrive and parse the response of specifie PID virtual bool getResult(byte& pid, int& result); // determine if the PID is supported virtual bool isValidPID(byte pid); - // init GPS module - // parse GPS data // set current PID mode byte dataMode; // occurrence of errors |