diff --git a/main/buttons.cpp b/main/buttons.cpp index fb41599..4361ac6 100644 --- a/main/buttons.cpp +++ b/main/buttons.cpp @@ -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; diff --git a/main/modes/defaultmode.cpp b/main/modes/defaultmode.cpp index f39c619..98f5048 100644 --- a/main/modes/defaultmode.cpp +++ b/main/modes/defaultmode.cpp @@ -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;