Dev commit

This commit is contained in:
CommanderRedYT
2022-10-06 22:37:31 +02:00
parent 4e0fdd65c3
commit 9db3da4b27
17 changed files with 267 additions and 24 deletions

View File

@ -380,3 +380,27 @@ std::string toString(esp_chip_model_t esp_chip_model)
return "invalid";
}
}
std::optional<SetupStep> checkIfInCalibration()
{
if (!configs.boardcomputerHardware.setupFinished.value())
{
return SetupStep::INFORMATION;
}
else if (
configs.dpadMappingLeft.value() == INPUT_MAPPING_NONE ||
configs.dpadMappingRight.value() == INPUT_MAPPING_NONE ||
configs.dpadMappingUp.value() == INPUT_MAPPING_NONE ||
configs.dpadMappingDown.value() == INPUT_MAPPING_NONE
)
{
// espgui::switchScreen<ButtonCalibrateDisplay>(true);
return SetupStep::BASIC_BUTTONS;
}
else if (!gas || !brems || *gas > 200.f || *brems > 200.f)
{
// espgui::switchScreen<PotisCalibrateDisplay>(true);
return SetupStep::CALIBRATE_POTIS;
}
return std::nullopt;
}