summaryrefslogtreecommitdiff
path: root/libraries/OBD/OBD.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/OBD/OBD.cpp')
-rw-r--r--libraries/OBD/OBD.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libraries/OBD/OBD.cpp b/libraries/OBD/OBD.cpp
index 92b9bdf..03a13d4 100644
--- a/libraries/OBD/OBD.cpp
+++ b/libraries/OBD/OBD.cpp
@@ -562,7 +562,7 @@ void COBDI2C::end()
void COBDI2C::write(const char* s)
{
- COMMAND_BLOCK cmdblock = {millis(), CMD_SEND_AT_COMMAND};
+ COMMAND_BLOCK cmdblock = {(uint16_t)millis(), CMD_SEND_AT_COMMAND};
Wire.beginTransmission(I2C_ADDR);
Wire.write((byte*)&cmdblock, sizeof(cmdblock));
Wire.write(s);
@@ -571,7 +571,7 @@ void COBDI2C::write(const char* s)
bool COBDI2C::sendCommandBlock(byte cmd, uint8_t data, byte* payload, byte payloadBytes)
{
- COMMAND_BLOCK cmdblock = {millis(), cmd, data};
+ COMMAND_BLOCK cmdblock = {(uint16_t)millis(), cmd, data};
Wire.beginTransmission(I2C_ADDR);
bool success = Wire.write((byte*)&cmdblock, sizeof(COMMAND_BLOCK)) == sizeof(COMMAND_BLOCK);
if (payload) Wire.write(payload, payloadBytes);