diff --git a/libguh/hardware/gpio.cpp b/libguh/hardware/gpio.cpp index d036faec..6ce72cbd 100644 --- a/libguh/hardware/gpio.cpp +++ b/libguh/hardware/gpio.cpp @@ -96,9 +96,9 @@ int Gpio::openGpio() int fd = open(buf, O_RDONLY | O_NONBLOCK ); if (fd < 0) { qDebug() << "ERROR: could not open /sys/class/gpio" << m_gpio << "/direction"; - return fd; + return false; } - return fd; + return true; } /*! Returns true, if the direction \a dir of the GPIO could be set correctly. diff --git a/libguh/hardware/radio433.h b/libguh/hardware/radio433.h index eba0a1ab..c1500258 100644 --- a/libguh/hardware/radio433.h +++ b/libguh/hardware/radio433.h @@ -31,6 +31,7 @@ public: explicit Radio433(QObject *parent = 0); ~Radio433(); + bool available(); bool enabel(); bool disabel(); diff --git a/libguh/hardware/radio433transmitter.h b/libguh/hardware/radio433transmitter.h index 9211cf27..16d63161 100644 --- a/libguh/hardware/radio433transmitter.h +++ b/libguh/hardware/radio433transmitter.h @@ -37,6 +37,7 @@ public: bool startTransmitter(); bool stopTransmitter(); + bool setUpGpio(); void sendData(QList rawData); @@ -51,7 +52,6 @@ private: bool m_allowSending; void run(); - bool setUpGpio(); QMutex m_queueMutex; QQueue > m_rawDataQueue;