From d7a34df81729f8ca14a8df1c18e28298bec8d48d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Sun, 5 Sep 2021 12:33:11 +0200 Subject: [PATCH] Add monitor gpio number get method --- libnymea-gpio/gpiomonitor.cpp | 5 +++++ libnymea-gpio/gpiomonitor.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/libnymea-gpio/gpiomonitor.cpp b/libnymea-gpio/gpiomonitor.cpp index 4e6a3c1..cbd9e85 100644 --- a/libnymea-gpio/gpiomonitor.cpp +++ b/libnymea-gpio/gpiomonitor.cpp @@ -92,6 +92,11 @@ GpioMonitor::~GpioMonitor() wait(200); } +int GpioMonitor::gpioNumber() const +{ + return m_gpioNumber; +} + /*! Returns the edge interrupt configuration for this GpioMonitor. */ Gpio::Edge GpioMonitor::edge() const { diff --git a/libnymea-gpio/gpiomonitor.h b/libnymea-gpio/gpiomonitor.h index e1e6fe6..5eb1c5d 100644 --- a/libnymea-gpio/gpiomonitor.h +++ b/libnymea-gpio/gpiomonitor.h @@ -44,6 +44,8 @@ public: explicit GpioMonitor(int gpio, QObject *parent = nullptr); ~GpioMonitor() override; + int gpioNumber() const; + Gpio::Edge edge() const; void setEdge(Gpio::Edge edge);