Add persistentData to store dc-fw-version

Reading dc-fw-version is somehow complicated ...
Id does not work reliable on startup, so we do read it also on every
diagRequest().
Version string is then stored in persistent data.
This data can be used e.g. by other tools to show the
device-controller-firmware-version.
This commit is contained in:
2024-01-31 11:34:00 +01:00
parent b058b6aee0
commit d2efe566c5
7 changed files with 217 additions and 8 deletions

View File

@@ -9,6 +9,8 @@
#include "interfaces.h"
#include "DeviceControllerInterface.h"
#include "support/PersistentData.h"
namespace DeviceController {
Q_NAMESPACE
@@ -60,7 +62,7 @@ class DeviceControllerDiag : public QObject
Q_OBJECT
public:
DeviceControllerDiag(QObject *parent = nullptr);
DeviceControllerDiag(PersistentData *pData, QObject *parent = nullptr);
void init(hwinf* hw, QObject* eventReceiver);
@@ -90,7 +92,7 @@ private:
QSet<DeviceController::State> machineEventSet;
PersistentData* pData;
private slots:
void onDiagRequestTimeoutTimerTimeout();