Skip to content
Snippets Groups Projects
Commit b208e15a authored by hjk's avatar hjk
Browse files

debugger: work on trk

parent 9b405512
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
...@@ -111,7 +111,7 @@ public: ...@@ -111,7 +111,7 @@ public:
explicit TrkWriteQueueDevice(QObject *parent = 0); explicit TrkWriteQueueDevice(QObject *parent = 0);
virtual ~TrkWriteQueueDevice(); virtual ~TrkWriteQueueDevice();
// Construct as 'TrkWriteQueueDevice::Callback(instance, &Klass::method);' // Construct as 'TrkWriteQueueDevice::Callback(instance, &Class::method);'
typedef TrkFunctor1<const TrkResult &> Callback; typedef TrkFunctor1<const TrkResult &> Callback;
// Enqueue a message with a notification callback. // Enqueue a message with a notification callback.
......
...@@ -492,6 +492,7 @@ void TrkDevice::tryTrkRead() ...@@ -492,6 +492,7 @@ void TrkDevice::tryTrkRead()
while (extractResult(&d->trkReadBuffer, d->serialFrame, &r, &rawData)) { while (extractResult(&d->trkReadBuffer, d->serialFrame, &r, &rawData)) {
//if (verbose()) //if (verbose())
// logMessage("Read TrkResult " + r.data.toHex()); // logMessage("Read TrkResult " + r.data.toHex());
qDebug() << "RECEIVE DATA: " << r.data.toHex();
emit messageReceived(r); emit messageReceived(r);
if (!rawData.isEmpty()) if (!rawData.isEmpty())
emit rawDataReceived(rawData); emit rawDataReceived(rawData);
......
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
#include <QtGlobal> #include <QtGlobal>
// FIXME: rename into something less TRK-specific
namespace trk { namespace trk {
namespace Internal { namespace Internal {
/* Helper class for the 1-argument functor: /* Helper class for the 1-argument functor:
......
...@@ -72,6 +72,7 @@ enum Command { ...@@ -72,6 +72,7 @@ enum Command {
QByteArray decode7d(const QByteArray &ba); QByteArray decode7d(const QByteArray &ba);
QByteArray encode7d(const QByteArray &ba); QByteArray encode7d(const QByteArray &ba);
inline byte extractByte(const char *data) { return *data; }
ushort extractShort(const char *data); ushort extractShort(const char *data);
uint extractInt(const char *data); uint extractInt(const char *data);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment