summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanley Huang <stanleyhuangyc@gmail.com>2017-05-24 21:10:53 +1000
committerStanley Huang <stanleyhuangyc@gmail.com>2017-05-24 21:10:53 +1000
commit821eb39d129954138ae929865a2b52997bce089b (patch)
treec6d38ca798928e34118d10f95139cdb9d40eab87
parent7dd3022a62be93d9cbedf94585160c4cbfce2f8e (diff)
download2021-arduino-obd-821eb39d129954138ae929865a2b52997bce089b.tar.gz
2021-arduino-obd-821eb39d129954138ae929865a2b52997bce089b.tar.bz2
2021-arduino-obd-821eb39d129954138ae929865a2b52997bce089b.zip
Update
-rw-r--r--esplogger/datalogger.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/esplogger/datalogger.h b/esplogger/datalogger.h
index 6c4b60a..bf4ccb1 100644
--- a/esplogger/datalogger.h
+++ b/esplogger/datalogger.h
@@ -82,12 +82,6 @@ public:
cacheBytes = 0;
#endif
}
- void initSender()
- {
-#if ENABLE_DATA_OUT
- SerialRF.begin(STREAM_BAUDRATE);
-#endif
- }
byte genTimestamp(char* buf, bool absolute)
{
byte n;
@@ -104,12 +98,12 @@ public:
{
#if ENABLE_DATA_LOG
#if STREAM_FORMAT == FORMAT_BIN
- dataSize += sdfile.write(buf, len);
+ dataSize += sdfile.write((uint8_t*)buf, len);
#else
char tmp[12];
byte n = genTimestamp(tmp, dataSize == 0);
- dataSize += sdfile.write(tmp, n);
- dataSize += sdfile.write(buf, len);
+ dataSize += sdfile.write((uint8_t*)tmp, n);
+ dataSize += sdfile.write((uint8_t*)buf, len);
sdfile.println();
dataSize += 3;
#endif
@@ -128,7 +122,7 @@ public:
}
#endif
#if ENABLE_DATA_OUT
- SerialRF.write(buf, len);
+ SerialRF.write((uint8_t*)buf, len);
SerialRF.println();
#endif
}