Fixed #142
This commit is contained in:
@ -162,7 +162,7 @@ void InputDispatcher::quickActionButtonDown(bool pressed)
|
|||||||
|
|
||||||
if (settings.handbremse.enable)
|
if (settings.handbremse.enable)
|
||||||
{
|
{
|
||||||
if (angezogen)
|
if (stateWish == StateWish::brake || angezogen)
|
||||||
stateWish = StateWish::release;
|
stateWish = StateWish::release;
|
||||||
else
|
else
|
||||||
stateWish = StateWish::brake;
|
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)
|
if (handbremse::angezogen)
|
||||||
{
|
{
|
||||||
using namespace handbremse;
|
using namespace handbremse;
|
||||||
@ -100,15 +110,6 @@ void DefaultMode::update()
|
|||||||
const bool gas_oder_brems = (gas_processed > 10 || brems_processed > 10);
|
const bool gas_oder_brems = (gas_processed > 10 || brems_processed > 10);
|
||||||
fixCommonParams();
|
fixCommonParams();
|
||||||
|
|
||||||
if (wishTimer)
|
|
||||||
{
|
|
||||||
if (espchrono::ago(*wishTimer) > 10s)
|
|
||||||
{
|
|
||||||
stateWish = StateWish::none;
|
|
||||||
wishTimer = std::nullopt;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stateWish == StateWish::release)
|
if (stateWish == StateWish::release)
|
||||||
{
|
{
|
||||||
lastAutoRelease = now;
|
lastAutoRelease = now;
|
||||||
|
Reference in New Issue
Block a user