From 40d823590e4c6a251243ce2f027cb8423bc3e1a2 Mon Sep 17 00:00:00 2001 From: tomdebree Date: Sat, 14 Sep 2024 20:30:56 +0100 Subject: [PATCH] Update pushbutton.cpp --- ccs/pushbutton.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ccs/pushbutton.cpp b/ccs/pushbutton.cpp index 1e92577..60dffbf 100644 --- a/ccs/pushbutton.cpp +++ b/ccs/pushbutton.cpp @@ -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()