From c5a9fdb80df58015c0705d23e2208cb576affd7c Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Wed, 6 Jul 2016 14:57:50 +0800 Subject: Renaming read() to readPID() in OBD library --- libraries/OBD/examples/obd_i2c_test/obd_i2c_test.ino | 6 +++--- libraries/OBD/examples/obd_uart_test/obd_uart_test.ino | 4 ++-- libraries/OBD/examples/rpm_led_i2c/rpm_led_i2c.ino | 2 +- libraries/OBD/examples/rpm_led_uart/rpm_led_uart.ino | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'libraries/OBD/examples') 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 fe9141a..c5b89fe 100644 --- a/libraries/OBD/examples/obd_i2c_test/obd_i2c_test.ino +++ b/libraries/OBD/examples/obd_i2c_test/obd_i2c_test.ino @@ -74,7 +74,7 @@ void readMEMS() Serial.println(gz); } -void readPID() +void readPIDs() { static const byte pidlist[] = {PID_ENGINE_LOAD, PID_COOLANT_TEMP, PID_RPM, PID_SPEED, PID_TIMING_ADVANCE, PID_INTAKE_TEMP, PID_THROTTLE, PID_FUEL_LEVEL}; Serial.print('['); @@ -87,7 +87,7 @@ void readPID() Serial.print('='); if (valid) { int value; - if (obd.read(pid, value)) { + if (obd.readPID(pid, value)) { Serial.print(value); } } @@ -117,7 +117,7 @@ void setup() { } void loop() { - readPID(); + readPIDs(); readMEMS(); } diff --git a/libraries/OBD/examples/obd_uart_test/obd_uart_test.ino b/libraries/OBD/examples/obd_uart_test/obd_uart_test.ino index 484262e..08106ec 100644 --- a/libraries/OBD/examples/obd_uart_test/obd_uart_test.ino +++ b/libraries/OBD/examples/obd_uart_test/obd_uart_test.ino @@ -55,7 +55,7 @@ void readPIDSingle() mySerial.print(millis()); mySerial.print(']'); mySerial.print("RPM="); - if (obd.read(PID_RPM, value)) { + if (obd.readPID(PID_RPM, value)) { mySerial.print(value); } mySerial.println(); @@ -65,7 +65,7 @@ void readPIDMultiple() { static const byte pids[] = {PID_SPEED, PID_ENGINE_LOAD, PID_THROTTLE, PID_COOLANT_TEMP, PID_INTAKE_TEMP}; int values[sizeof(pids)]; - if (obd.read(pids, sizeof(pids), values) == sizeof(pids)) { + if (obd.readPID(pids, sizeof(pids), values) == sizeof(pids)) { for (byte i = 0; i < sizeof(pids) ; i++) { mySerial.print('['); mySerial.print(millis()); diff --git a/libraries/OBD/examples/rpm_led_i2c/rpm_led_i2c.ino b/libraries/OBD/examples/rpm_led_i2c/rpm_led_i2c.ino index d999159..619ae32 100644 --- a/libraries/OBD/examples/rpm_led_i2c/rpm_led_i2c.ino +++ b/libraries/OBD/examples/rpm_led_i2c/rpm_led_i2c.ino @@ -24,7 +24,7 @@ void setup() void loop() { int value; - if (obd.read(PID_RPM, value)) { + if (obd.readPID(PID_RPM, value)) { // RPM is successfully read and its value stored in variable 'value' // light on LED when RPM exceeds 3000 digitalWrite(13, value > 3000 ? HIGH : LOW); diff --git a/libraries/OBD/examples/rpm_led_uart/rpm_led_uart.ino b/libraries/OBD/examples/rpm_led_uart/rpm_led_uart.ino index 691ee9c..a248307 100644 --- a/libraries/OBD/examples/rpm_led_uart/rpm_led_uart.ino +++ b/libraries/OBD/examples/rpm_led_uart/rpm_led_uart.ino @@ -24,7 +24,7 @@ void setup() void loop() { int value; - if (obd.read(PID_RPM, value)) { + if (obd.readPID(PID_RPM, value)) { // RPM is successfully read and its value stored in variable 'value' // light on LED when RPM exceeds 3000 digitalWrite(13, value > 3000 ? HIGH : LOW); -- cgit v1.2.3