RW fixes and test

This commit is contained in:
2023-04-07 17:02:37 +02:00
parent d98873c9a6
commit cd8bbaf1f9
7 changed files with 84 additions and 69 deletions

View File

@ -75,8 +75,8 @@ class RwHandler : public DeviceHandlerBase {
GpioIF* gpioComIF = nullptr;
gpioId_t enableGpio = gpio::NO_GPIO;
bool debugMode = false;
bool commandExecuted = false;
Countdown offTransitionCountdown = Countdown(5000);
rws::RwRequest currentRequest;
rws::StatusSet statusSet;
rws::LastResetSatus lastResetStatusSet;
@ -90,6 +90,12 @@ class RwHandler : public DeviceHandlerBase {
PoolEntry<uint16_t> rampTime = PoolEntry<uint16_t>({10});
enum class InternalState { DEFAULT, GET_TM, INIT_RW_CONTROLLER, RESET_MCU, SHUTDOWN };
enum class ShutdownState {
NONE,
SET_SPEED_ZERO,
STOP_POLLING,
DONE,
} shutdownState = ShutdownState::NONE;
InternalState internalState = InternalState::DEFAULT;