DCDiag: add dbus interface

This commit is contained in:
2025-05-27 12:59:12 +02:00
parent 58c99753a9
commit efe56672ff
3 changed files with 9 additions and 3 deletions

View File

@@ -8,6 +8,7 @@
#include <QProcess>
#include "support/JSON.h"
#include "src/ATBAPP/support/DBusControllerInterface.h"
DeviceControllerDiag::DeviceControllerDiag(PersistentData *pData, QObject *parent)
@@ -17,6 +18,7 @@ DeviceControllerDiag::DeviceControllerDiag(PersistentData *pData, QObject *paren
, eventReceiver(nullptr)
, isRequestRunning(false)
, flagInterruptDiag(false)
, isDiagBackgroundTask(false)
, lastState(DeviceController::State::INITIAL_STATE)
, _isErrorState(false)
, pData(pData)
@@ -29,10 +31,11 @@ DeviceControllerDiag::DeviceControllerDiag(PersistentData *pData, QObject *paren
}
void DeviceControllerDiag::init(hwinf *hw, QObject* eventReceiver)
void DeviceControllerDiag::init(hwinf *hw, DBusControllerInterface *dbus, QObject* eventReceiver)
{
this->hw = hw;
this->eventReceiver = eventReceiver;
this->dbus = dbus;
// make a system check on startup:
QTimer::singleShot(2000, this, &DeviceControllerDiag::diagRequest);