This commit is contained in:
CommanderRedYT
2021-12-11 03:43:24 +01:00
parent bd9fdeac7b
commit 70382088a0
2 changed files with 11 additions and 10 deletions

View File

@ -162,7 +162,7 @@ void InputDispatcher::quickActionButtonDown(bool pressed)
if (settings.handbremse.enable)
{
if (angezogen)
if (stateWish == StateWish::brake || angezogen)
stateWish = StateWish::release;
else
stateWish = StateWish::brake;

View File

@ -90,6 +90,16 @@ void DefaultMode::update()
}
}
if (handbremse::wishTimer)
{
using namespace handbremse;
if (espchrono::ago(*wishTimer) > 5s)
{
stateWish = StateWish::none;
wishTimer = std::nullopt;
}
}
if (handbremse::angezogen)
{
using namespace handbremse;
@ -100,15 +110,6 @@ void DefaultMode::update()
const bool gas_oder_brems = (gas_processed > 10 || brems_processed > 10);
fixCommonParams();
if (wishTimer)
{
if (espchrono::ago(*wishTimer) > 10s)
{
stateWish = StateWish::none;
wishTimer = std::nullopt;
}
}
if (stateWish == StateWish::release)
{
lastAutoRelease = now;