From 4d43c23de6e5c735b9b498869fb21b949627d4e8 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 10 Apr 2024 20:14:31 +0800 Subject: [PATCH] [Controller] add timestamp for recv data --- Controller/src/serialobject.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Controller/src/serialobject.cpp b/Controller/src/serialobject.cpp index b617927..3c6fde2 100644 --- a/Controller/src/serialobject.cpp +++ b/Controller/src/serialobject.cpp @@ -1,4 +1,5 @@ #include +#include #include "serialobject.h" SerialObject::SerialObject(QObject *parent):QObject(parent),radioPacket(&serial){ // add needed settings @@ -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 = "";