interrupt problems...
This commit is contained in:
parent
823907d34e
commit
2803149e24
@ -17,7 +17,7 @@ RadioReciver::RadioReciver(QObject *parent) :
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadioReciver::handleRC433Interrupt()
|
void RadioReciver::handleInterrupt()
|
||||||
{
|
{
|
||||||
if(!m_enable){
|
if(!m_enable){
|
||||||
return;
|
return;
|
||||||
@ -58,6 +58,11 @@ void RadioReciver::handleRC433Interrupt()
|
|||||||
lastTime = time;
|
lastTime = time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RadioReciver::handleRC433Interrupt()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void RadioReciver::handleRC868Interrupt()
|
void RadioReciver::handleRC868Interrupt()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -269,8 +274,9 @@ void RadioReciver::setFrequency(RadioReciver::Frequency frequency)
|
|||||||
if(wiringPiSetup() == -1){
|
if(wiringPiSetup() == -1){
|
||||||
qDebug() << "ERROR: GPIO setup for 433.92 MHz receiver failed.";
|
qDebug() << "ERROR: GPIO setup for 433.92 MHz receiver failed.";
|
||||||
}
|
}
|
||||||
pinMode(2,INPUT);
|
m_pin433 = 2;
|
||||||
wiringPiISR(2, INT_EDGE_BOTH, &handleRC433Interrupt);
|
pinMode(m_pin433,INPUT);
|
||||||
|
wiringPiISR(m_pin433, INT_EDGE_BOTH, handleInterrupt);
|
||||||
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){
|
||||||
|
|||||||
@ -17,12 +17,16 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void handleInterrupt();
|
||||||
static void handleRC433Interrupt();
|
static void handleRC433Interrupt();
|
||||||
static void handleRC868Interrupt();
|
static void handleRC868Interrupt();
|
||||||
|
|
||||||
static void detectProtocol(int signalCount);
|
static void detectProtocol(int signalCount);
|
||||||
static float parseTemperature(QByteArray codeBin);
|
static float parseTemperature(QByteArray codeBin);
|
||||||
|
|
||||||
|
int m_pin433;
|
||||||
|
int m_pin868;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|||||||
Reference in New Issue
Block a user