diff options
author | Stanley Huang <stanleyhuangyc@gmail.com> | 2015-10-13 15:40:45 +1100 |
---|---|---|
committer | Stanley Huang <stanleyhuangyc@gmail.com> | 2015-10-13 15:40:45 +1100 |
commit | 3ad28dfcd32482706e753af8eae34ab5c8562fcb (patch) | |
tree | 12113a7855d71659895a8d4a6531aa0b324865a7 /libraries/OBD/examples | |
parent | a1de0a98dc4254e3aa3ce75399f3b83ba6e6187b (diff) | |
download | 2021-arduino-obd-3ad28dfcd32482706e753af8eae34ab5c8562fcb.tar.gz 2021-arduino-obd-3ad28dfcd32482706e753af8eae34ab5c8562fcb.tar.bz2 2021-arduino-obd-3ad28dfcd32482706e753af8eae34ab5c8562fcb.zip |
Update
Diffstat (limited to 'libraries/OBD/examples')
-rw-r--r-- | libraries/OBD/examples/obd_i2c_test/obd_i2c_test.ino | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libraries/OBD/examples/obd_i2c_test/obd_i2c_test.ino b/libraries/OBD/examples/obd_i2c_test/obd_i2c_test.ino index 3888474..7a98eb7 100644 --- a/libraries/OBD/examples/obd_i2c_test/obd_i2c_test.ino +++ b/libraries/OBD/examples/obd_i2c_test/obd_i2c_test.ino @@ -65,11 +65,7 @@ void readMEMS() void showECUCap() { - static const byte PROGMEM pidlist[] = {PID_ENGINE_LOAD, PID_COOLANT_TEMP, PID_FUEL_PRESSURE, PID_INTAKE_MAP, PID_RPM, PID_SPEED, PID_TIMING_ADVANCE, PID_INTAKE_TEMP, PID_MAF_FLOW, PID_THROTTLE, PID_AUX_INPUT, - PID_EGR_ERROR, PID_COMMANDED_EVAPORATIVE_PURGE, PID_FUEL_LEVEL, PID_CONTROL_MODULE_VOLTAGE, PID_ABSOLUTE_ENGINE_LOAD, PID_AMBIENT_TEMP, PID_COMMANDED_THROTTLE_ACTUATOR, PID_ETHANOL_FUEL, - PID_FUEL_RAIL_PRESSURE, PID_HYBRID_BATTERY_PERCENTAGE, PID_ENGINE_OIL_TEMP, PID_FUEL_INJECTION_TIMING, PID_ENGINE_FUEL_RATE, PID_ENGINE_TORQUE_DEMANDED, PID_ENGINE_TORQUE_PERCENTAGE}; - - bool scanned = false; + static const byte PROGMEM pidlist[] = {PID_ENGINE_LOAD, PID_COOLANT_TEMP, PID_RPM, PID_SPEED, PID_TIMING_ADVANCE, PID_INTAKE_TEMP, PID_THROTTLE, PID_FUEL_LEVEL}; for (byte i = 0; i < sizeof(pidlist) / sizeof(pidlist[0]); i++) { byte pid = pgm_read_byte(pidlist + i); bool valid = obd.isValidPID(pid); @@ -93,6 +89,7 @@ void setup() { Wire.begin(); accelgyro.initialize(); testOut(); + readMEMS(); Serial.println("Init..."); while (!obd.init()); } |