instructions unclear, wrote a whole state machine
This commit is contained in:
@ -22,6 +22,12 @@ class EiveSystem : public Subsystem, public HasActionsIF {
|
||||
[[nodiscard]] MessageQueueId_t getCommandQueue() const override;
|
||||
|
||||
private:
|
||||
enum class ForcePlOffState {
|
||||
NONE,
|
||||
FORCE_ALL_EXCEPT_SUPV_OFF,
|
||||
WAITING,
|
||||
FORCE_SUPV_OFF
|
||||
} forcePlOffState = ForcePlOffState::NONE;
|
||||
enum class I2cRebootState {
|
||||
NONE,
|
||||
SYSTEM_MODE_BOOT,
|
||||
@ -37,6 +43,7 @@ class EiveSystem : public Subsystem, public HasActionsIF {
|
||||
bool alreadyTriedI2cRecovery = false;
|
||||
|
||||
uint8_t frameDirtyErrorCounter = 0;
|
||||
Countdown supvOffDelay = Countdown(3000);
|
||||
Countdown frameDirtyCheckCd = Countdown(10000);
|
||||
// If the PDEC reset was already attempted in the last 2 minutes, there is a high chance that
|
||||
// only a full reboot will fix the issue.
|
||||
|
Reference in New Issue
Block a user