Send sensor events as QDateTime instead of just an int
This commit is contained in:
parent
c41a84b582
commit
12fdaf2d77
2 changed files with 3 additions and 2 deletions
|
@ -160,6 +160,6 @@ void WINAPI TelldusCoreObject::deviceEventCallback(int deviceId, int method, con
|
|||
void WINAPI TelldusCoreObject::sensorEventCallback(const char *protocol, const char *model, int id, int dataType, const char *value, int timestamp, int callbackId, void *context) {
|
||||
TelldusCoreObject *parent = static_cast<TelldusCoreObject *>(context);
|
||||
if (parent) {
|
||||
emit parent->sensorEvent(QString::fromUtf8(protocol), QString::fromUtf8(model), id, dataType, QString::fromUtf8(value), timestamp);
|
||||
emit parent->sensorEvent(QString::fromUtf8(protocol), QString::fromUtf8(model), id, dataType, QString::fromUtf8(value), QDateTime::fromTime_t(timestamp));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <QObject>
|
||||
#include <QVariantMap>
|
||||
#include <QDateTime>
|
||||
#include <telldus-core.h>
|
||||
|
||||
class TelldusCoreObject : public QObject
|
||||
|
@ -15,7 +16,7 @@ public:
|
|||
signals:
|
||||
void deviceChange( int deviceId, int eventId );
|
||||
void deviceEvent( int deviceId, int method, const QString &data );
|
||||
void sensorEvent( const QString &protocol, const QString &model, int id, int dataType, const QString &value, int timestamp);
|
||||
void sensorEvent( const QString &protocol, const QString &model, int id, int dataType, const QString &value, const QDateTime timestamp);
|
||||
void errorOccurred( int deviceId, int errorId, const QString &errorString );
|
||||
|
||||
public slots:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue