Skip to content

Commit

Permalink
Merge branch 'master' of github.com:collin80/SavvyCAN
Browse files Browse the repository at this point in the history
  • Loading branch information
collin80 committed Apr 12, 2023
2 parents bce7321 + 95690a0 commit 5779460
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions connections/mqtt_bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,10 @@ void MQTT_BUS::clientMessageReceived(const QMQTT::Message& message)
if(frame_p)
{
uint32_t frameID = message.topic().split("/")[1].toInt();
uint64_t timeStamp = message.payload()[0] + (message.payload()[1] << 8) + (message.payload()[2] << 16) + (message.payload()[3] << 24)
+ ((uint64_t)message.payload()[4] << 32ull) + ((uint64_t)message.payload()[5] << 40ull)
+ ((uint64_t)message.payload()[6] << 48ull) + ((uint64_t)message.payload()[7] << 56ull);

QByteArray timeStampBytes = message.payload().left(8);
uint64_t timeStamp = qFromLittleEndian<uint64_t>(timeStampBytes.data());

int flags = message.payload()[8];
frame_p->setPayload(message.payload().right(message.payload().count() - 9));
frame_p->bus = 0;
Expand Down

0 comments on commit 5779460

Please sign in to comment.