Skip to content

Commit

Permalink
Merge pull request #37 from Tom-evnut/Ignore-Button-Locked
Browse files Browse the repository at this point in the history
Update pushbutton.cpp
  • Loading branch information
uhi22 authored Sep 15, 2024
2 parents 0b0c558 + 40d8235 commit 755255c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ccs/pushbutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ static void pushbutton_processPushButtonSeries(void) {

bool pushbutton_isPressed500ms()
{
return pushbutton_tButtonPressTime>(PUSHBUTTON_CYCLES_PER_SECOND/2);
if(Param::GetInt(Param::AllowUnlock) == 1) //check unlocking is allowed and thus vehicle is not in lockstate, read button
{
return pushbutton_tButtonPressTime>(PUSHBUTTON_CYCLES_PER_SECOND/2);
}
else
{
return 0;
}
}

int pushButton_getAccumulatedDigits()
Expand Down

0 comments on commit 755255c

Please sign in to comment.