Diag: use enum for dc-state (including warnings)
This commit is contained in:
@@ -7,6 +7,42 @@
|
||||
#include "ATBMachineEvent.h"
|
||||
#include "interfaces.h"
|
||||
|
||||
namespace DeviceController {
|
||||
Q_NAMESPACE
|
||||
|
||||
enum State {
|
||||
O000,
|
||||
|
||||
E001,
|
||||
E002,
|
||||
E003,
|
||||
E004,
|
||||
E005,
|
||||
E006,
|
||||
E007,
|
||||
E008,
|
||||
E009,
|
||||
E010,
|
||||
E011,
|
||||
E012,
|
||||
E013,
|
||||
E014,
|
||||
E015,
|
||||
|
||||
E252,
|
||||
E253,
|
||||
E254,
|
||||
E255,
|
||||
|
||||
W001,
|
||||
W002,
|
||||
W003,
|
||||
W004
|
||||
};
|
||||
Q_ENUM_NS(State)
|
||||
}
|
||||
|
||||
|
||||
class DeviceControllerDiag : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -33,16 +69,17 @@ private:
|
||||
|
||||
QTimer *diagRequestTimeoutTimer;
|
||||
|
||||
uint8_t sub_componentAssessment();
|
||||
uint8_t sys_getSystemErrors();
|
||||
//uint8_t sub_componentAssessment();
|
||||
DeviceController::State sub_componentAssessment();
|
||||
DeviceController::State sys_getSystemErrors();
|
||||
|
||||
int lastVoltage;
|
||||
|
||||
private slots:
|
||||
void onDiagRequestTimeoutTimerTimeout();
|
||||
|
||||
void private_startDiag(); // diag entry method
|
||||
void private_finishedDiag(uint8_t result); // diag exit method
|
||||
void private_startDiag(); // diag entry method
|
||||
void private_finishedDiag(DeviceController::State result); // diag exit method
|
||||
|
||||
void sys_superviseSystem();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user