play with the interrupt

pull/1/head
Simon Stuerz 2013-08-24 13:29:09 +02:00
parent 2803149e24
commit df6ce3af06
1 changed files with 6 additions and 6 deletions

View File

@ -18,6 +18,11 @@ RadioReciver::RadioReciver(QObject *parent) :
} }
void RadioReciver::handleInterrupt() void RadioReciver::handleInterrupt()
{
}
void RadioReciver::handleRC433Interrupt()
{ {
if(!m_enable){ if(!m_enable){
return; return;
@ -58,11 +63,6 @@ void RadioReciver::handleInterrupt()
lastTime = time; lastTime = time;
} }
void RadioReciver::handleRC433Interrupt()
{
}
void RadioReciver::handleRC868Interrupt() void RadioReciver::handleRC868Interrupt()
{ {
@ -276,7 +276,7 @@ void RadioReciver::setFrequency(RadioReciver::Frequency frequency)
} }
m_pin433 = 2; m_pin433 = 2;
pinMode(m_pin433,INPUT); pinMode(m_pin433,INPUT);
wiringPiISR(m_pin433, INT_EDGE_BOTH, handleInterrupt); wiringPiISR(m_pin433, INT_EDGE_BOTH, &handleRC433Interrupt);
qDebug() << "GPIO setup for 433.92 MHz receiver ok."; qDebug() << "GPIO setup for 433.92 MHz receiver ok.";
} }
if(frequency == RadioReciver::RF868MHz){ if(frequency == RadioReciver::RF868MHz){