Fixed #142
This commit is contained in:
@ -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;
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user