30 lines
705 B
C++
30 lines
705 B
C++
#ifndef GPIODETECT_H
|
|
#define GPIODETECT_H
|
|
|
|
#include <QObject>
|
|
#include<QThread>
|
|
#include<QDebug>
|
|
#include<iostream>
|
|
#include"gpioinit.h"
|
|
#include<wiringPi.h>
|
|
using namespace std;
|
|
class gpiodetect : public QThread
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit gpiodetect(QObject *parent = nullptr);
|
|
void run();
|
|
private:
|
|
bool Status=true; //Decide wether The Detect is going on
|
|
void Stop(); //Stop Detect
|
|
void Start(); //Lauch Detect
|
|
signals:
|
|
void Reboot(bool a); //Detect a reboot command and send it to Controller
|
|
void Pin_High(int pin); //Detect a high GPIO and send it to Controller
|
|
void Pin_Low(int pin);
|
|
|
|
|
|
};
|
|
|
|
#endif // GPIODETECT_H
|