Working TCP subsystem
This commit is contained in:
38
ampmanager.h
38
ampmanager.h
@ -1,16 +1,46 @@
|
||||
#ifndef AMPMANAGER_H
|
||||
#define AMPMANAGER_H
|
||||
|
||||
#include <iostream>
|
||||
|
||||
class AmpManager : public QObject
|
||||
#include <QObject>
|
||||
#include <QRunnable>
|
||||
#include <QScopedPointer>
|
||||
#include <QEventLoop>
|
||||
#include <QTimer>
|
||||
#include <QProcess>
|
||||
#include <QByteArray>
|
||||
#include <QtDebug>
|
||||
|
||||
#include "microcontroller.h"
|
||||
|
||||
|
||||
class AmpManager : public QObject, public QRunnable
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AmpManager(QObject *parent = 0);
|
||||
explicit AmpManager(Microcontroller *micro, int relayNumber, QObject *parent = 0);
|
||||
~AmpManager();
|
||||
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
void run();
|
||||
void abort();
|
||||
void doTick();
|
||||
|
||||
private:
|
||||
QScopedPointer<QEventLoop> loop;
|
||||
|
||||
long silenceCount = 0;
|
||||
Microcontroller *_micro;
|
||||
int _relayNumber;
|
||||
|
||||
|
||||
QProcess arecord;
|
||||
|
||||
bool relayState = false;
|
||||
|
||||
};
|
||||
|
||||
#endif // AMPMANAGER_H
|
||||
#endif // AMPMANAGER_H
|
||||
|
Reference in New Issue
Block a user