Skip to content

Commit

Permalink
[Controller] add timestamp for recv data
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-tz committed Apr 10, 2024
1 parent bf0243c commit 4d43c23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Controller/src/serialobject.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <QtSerialPort/QSerialPortInfo>
#include <QDateTime>
#include "serialobject.h"
SerialObject::SerialObject(QObject *parent):QObject(parent),radioPacket(&serial){
// add needed settings
Expand Down Expand Up @@ -111,7 +112,8 @@ void SerialObject::readData(){
infrared = (quint8)data[3] & 0x40;
flat = (quint8)data[3] & 0x20;
chip = (quint8)data[3] & 0x10;
qDebug() << id << ' ' << infrared << ' ' << flat << ' ' << chip << ' ' << battery << ' ' << capacitance;
// get current time
qDebug() << QDateTime::currentDateTime() << id << ' ' << infrared << ' ' << flat << ' ' << chip << ' ' << battery << ' ' << capacitance;
}
}
rx = "";
Expand Down

0 comments on commit 4d43c23

Please sign in to comment.