mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Serialport (#36)
* migrate serialport to qt5 serialport * remove old serialport add logging to serialport * remove try catch - qt serialport uses plain return values * tiny fix, but not working atm * make it work, tested with adalight
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
|
||||
// Serial includes
|
||||
#include <serial/serial.h>
|
||||
#include <QSerialPort>
|
||||
|
||||
// Leddevice includes
|
||||
#include <leddevice/LedDevice.h>
|
||||
|
||||
#include <utils/Logger.h>
|
||||
|
||||
///
|
||||
/// The LedRs232Device implements an abstract base-class for LedDevices using a RS232-device.
|
||||
///
|
||||
@@ -52,17 +52,23 @@ private slots:
|
||||
void unblockAfterDelay();
|
||||
|
||||
private:
|
||||
// tries to open device if not opened
|
||||
bool tryOpen();
|
||||
|
||||
/// The name of the output device
|
||||
const std::string _deviceName;
|
||||
|
||||
/// The used baudrate of the output device
|
||||
const int _baudRate_Hz;
|
||||
const qint32 _baudRate_Hz;
|
||||
|
||||
/// Sleep after the connect before continuing
|
||||
const int _delayAfterConnect_ms;
|
||||
int _delayAfterConnect_ms;
|
||||
|
||||
/// The RS232 serial-device
|
||||
serial::Serial _rs232Port;
|
||||
QSerialPort _rs232Port;
|
||||
|
||||
bool _blockedForDelay;
|
||||
|
||||
/// logger instance
|
||||
Logger* _log;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user