summaryrefslogtreecommitdiff
path: root/megaloggerHD/datalogger.h
diff options
context:
space:
mode:
authorStanley Huang <stanleyhuangyc@gmail.com>2017-01-25 23:11:46 +1100
committerStanley Huang <stanleyhuangyc@gmail.com>2017-01-25 23:11:46 +1100
commitfb398f95a37434015e770991cdda6b821a97c84d (patch)
treec1b4a00eaf53f768e14e2aec49775d4b989e98d8 /megaloggerHD/datalogger.h
parent81498dffacebd0d7c6457d820d5eaee6409f42a2 (diff)
download2021-arduino-obd-fb398f95a37434015e770991cdda6b821a97c84d.tar.gz
2021-arduino-obd-fb398f95a37434015e770991cdda6b821a97c84d.tar.bz2
2021-arduino-obd-fb398f95a37434015e770991cdda6b821a97c84d.zip
Updated MEMS reading code
Diffstat (limited to 'megaloggerHD/datalogger.h')
-rw-r--r--megaloggerHD/datalogger.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/megaloggerHD/datalogger.h b/megaloggerHD/datalogger.h
index e1a6925..8d241d6 100644
--- a/megaloggerHD/datalogger.h
+++ b/megaloggerHD/datalogger.h
@@ -195,13 +195,13 @@ public:
#endif
record(buf, len);
}
- void logData(uint16_t pid, int value1, int value2, int value3)
+ void logData(uint16_t pid, int values[])
{
char buf[24];
byte n = translatePIDName(pid, buf);
- byte len = sprintf(buf + n, "%d,%d,%d", value1, value2, value3) + n;
+ byte len = sprintf(buf + n, "%d,%d,%d", values[0], values[1], values[2]) + n;
#if STREAM_FORMAT == FORMAT_BIN
- LOG_DATA_COMM ld = {dataTime, pid, 3, 0, {value1, value2, value3}};
+ LOG_DATA_COMM ld = {dataTime, pid, 3, 0, {values[0], values[1], values[2]}};
ld.checksum = getChecksum((char*)&ld, 20);
dispatch((const char*)&ld, 20);
#else