fixed some Radio433 bugs

This commit is contained in:
Simon Stürz 2014-07-06 22:58:08 +02:00 committed by Michael Zanetti
parent 4242c480ed
commit 944adda293
3 changed files with 4 additions and 3 deletions

View File

@ -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.

View File

@ -31,6 +31,7 @@ public:
explicit Radio433(QObject *parent = 0);
~Radio433();
bool available();
bool enabel();
bool disabel();

View File

@ -37,6 +37,7 @@ public:
bool startTransmitter();
bool stopTransmitter();
bool setUpGpio();
void sendData(QList<int> rawData);
@ -51,7 +52,6 @@ private:
bool m_allowSending;
void run();
bool setUpGpio();
QMutex m_queueMutex;
QQueue<QList<int> > m_rawDataQueue;