mirror of https://github.com/nymea/nymea.git
interrupt problems...
parent
823907d34e
commit
2803149e24
|
|
@ -17,7 +17,7 @@ RadioReciver::RadioReciver(QObject *parent) :
|
|||
|
||||
}
|
||||
|
||||
void RadioReciver::handleRC433Interrupt()
|
||||
void RadioReciver::handleInterrupt()
|
||||
{
|
||||
if(!m_enable){
|
||||
return;
|
||||
|
|
@ -58,6 +58,11 @@ void RadioReciver::handleRC433Interrupt()
|
|||
lastTime = time;
|
||||
}
|
||||
|
||||
void RadioReciver::handleRC433Interrupt()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RadioReciver::handleRC868Interrupt()
|
||||
{
|
||||
|
||||
|
|
@ -269,8 +274,9 @@ void RadioReciver::setFrequency(RadioReciver::Frequency frequency)
|
|||
if(wiringPiSetup() == -1){
|
||||
qDebug() << "ERROR: GPIO setup for 433.92 MHz receiver failed.";
|
||||
}
|
||||
pinMode(2,INPUT);
|
||||
wiringPiISR(2, INT_EDGE_BOTH, &handleRC433Interrupt);
|
||||
m_pin433 = 2;
|
||||
pinMode(m_pin433,INPUT);
|
||||
wiringPiISR(m_pin433, INT_EDGE_BOTH, handleInterrupt);
|
||||
qDebug() << "GPIO setup for 433.92 MHz receiver ok.";
|
||||
}
|
||||
if(frequency == RadioReciver::RF868MHz){
|
||||
|
|
|
|||
|
|
@ -17,12 +17,16 @@ public:
|
|||
};
|
||||
|
||||
private:
|
||||
void handleInterrupt();
|
||||
static void handleRC433Interrupt();
|
||||
static void handleRC868Interrupt();
|
||||
|
||||
static void detectProtocol(int signalCount);
|
||||
static float parseTemperature(QByteArray codeBin);
|
||||
|
||||
int m_pin433;
|
||||
int m_pin868;
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
|
|
|||
Loading…
Reference in New Issue