From a7837507417e36577db030a2cd2099cd645936a7 Mon Sep 17 00:00:00 2001 From: technyon Date: Fri, 7 Apr 2023 15:39:09 +0200 Subject: [PATCH] add motor blocked gpio output --- Gpio.cpp | 2 ++ Gpio.h | 1 + NukiWrapper.cpp | 3 +++ 3 files changed, 6 insertions(+) diff --git a/Gpio.cpp b/Gpio.cpp index 51df9d9..af70ce7 100644 --- a/Gpio.cpp +++ b/Gpio.cpp @@ -144,6 +144,8 @@ String Gpio::getRoleDescription(PinRole role) const return "Output: High when locked"; case PinRole::OutputHighUnlocked: return "Output: High when unlocked"; + case PinRole::OutputHighMotorBlocked: + return "Output: High when motor blocked"; default: return "Unknown"; } diff --git a/Gpio.h b/Gpio.h index e36f498..242849e 100644 --- a/Gpio.h +++ b/Gpio.h @@ -12,6 +12,7 @@ enum class PinRole InputUnlatch, OutputHighLocked, OutputHighUnlocked, + OutputHighMotorBlocked, }; enum class GpioAction diff --git a/NukiWrapper.cpp b/NukiWrapper.cpp index 28c517b..8b527f8 100644 --- a/NukiWrapper.cpp +++ b/NukiWrapper.cpp @@ -758,6 +758,9 @@ void NukiWrapper::updateGpioOutputs() case PinRole::OutputHighUnlocked: _gpio->setPinOutput(entry.pin, lockState == LockState::Locked || lockState == LockState::Locking ? LOW : HIGH); break; + case PinRole::OutputHighMotorBlocked: + _gpio->setPinOutput(entry.pin, lockState == LockState::MotorBlocked ? HIGH : LOW); + break; } } }