19#ifndef SRC_SUPLA_DEVICE_FACTORY_TEST_H_
20#define SRC_SUPLA_DEVICE_FACTORY_TEST_H_
22#include <supla/action_handler.h>
23#include <supla/element.h>
32 TestStage_RegisteredAndReady = 2,
33 TestStage_WaitForCfgButton = 3,
39 TestAction_CfgButtonOnPress = 11000,
40 TestAction_DeviceStatusChange = 11101
48 virtual ~FactoryTest();
52 void handleAction(
int event,
int action)
override;
54 virtual int16_t getManufacturerId();
55 virtual void waitForConfigButtonPress();
56 virtual bool checkTestStep();
58 void setTestFailed(
int reason);
59 void setTestFinished();
60 Supla::TestStage getTestStage()
const;
62 void dontCheckAutomaticFirmwareUpdate();
65 bool testFailed =
false;
66 bool testFinished =
false;
67 bool waitForRegisteredAndReady =
true;
68 bool testingMachineEnabled =
true;
70 uint32_t timeoutS = 30;
71 uint32_t initTimestamp = 0;
72 Supla::TestStage testStage = Supla::TestStage_None;
77 bool checkAutomaticFirmwareUpdate =
true;
Definition SuplaDevice.h:96
Definition action_handler.h:21
void iterateAlways() override
Method called on each SuplaDevice iteration.
Definition factory_test.cpp:153
void onInit() override
Third method called on element in SuplaDevice.begin()
Definition factory_test.cpp:45
Base class for all elements of SuplaDevice.
Definition element.h:37