mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
General tidy up
This commit is contained in:
@@ -3,14 +3,10 @@
|
||||
#include <cassert>
|
||||
|
||||
LedDeviceAdalight::LedDeviceAdalight(const QJsonObject &deviceConfig)
|
||||
: ProviderRs232()
|
||||
: ProviderRs232(deviceConfig)
|
||||
, _headerSize(6)
|
||||
, _ligthBerryAPA102Mode(false)
|
||||
{
|
||||
_devConfig = deviceConfig;
|
||||
_isDeviceReady = false;
|
||||
|
||||
_activeDeviceType = deviceConfig["type"].toString("UNSPECIFIED").toLower();
|
||||
}
|
||||
|
||||
LedDevice* LedDeviceAdalight::construct(const QJsonObject &deviceConfig)
|
||||
|
@@ -2,15 +2,10 @@
|
||||
#include "LedDeviceAtmo.h"
|
||||
|
||||
LedDeviceAtmo::LedDeviceAtmo(const QJsonObject &deviceConfig)
|
||||
: ProviderRs232()
|
||||
: ProviderRs232(deviceConfig)
|
||||
{
|
||||
_devConfig = deviceConfig;
|
||||
_isDeviceReady = false;
|
||||
|
||||
_activeDeviceType = deviceConfig["type"].toString("UNSPECIFIED").toLower();
|
||||
}
|
||||
|
||||
|
||||
LedDevice* LedDeviceAtmo::construct(const QJsonObject &deviceConfig)
|
||||
{
|
||||
return new LedDeviceAtmo(deviceConfig);
|
||||
|
@@ -6,20 +6,15 @@
|
||||
#endif
|
||||
|
||||
LedDeviceDMX::LedDeviceDMX(const QJsonObject &deviceConfig)
|
||||
: ProviderRs232()
|
||||
: ProviderRs232(deviceConfig)
|
||||
, _dmxDeviceType(0)
|
||||
, _dmxStart(1)
|
||||
, _dmxSlotsPerLed(3)
|
||||
, _dmxLedCount(0)
|
||||
, _dmxChannelCount(0)
|
||||
{
|
||||
_devConfig = deviceConfig;
|
||||
_isDeviceReady = false;
|
||||
|
||||
_activeDeviceType = deviceConfig["type"].toString("UNSPECIFIED").toLower();
|
||||
}
|
||||
|
||||
|
||||
LedDevice* LedDeviceDMX::construct(const QJsonObject &deviceConfig)
|
||||
{
|
||||
return new LedDeviceDMX(deviceConfig);
|
||||
|
@@ -2,12 +2,8 @@
|
||||
#include "LedDeviceKarate.h"
|
||||
|
||||
LedDeviceKarate::LedDeviceKarate(const QJsonObject &deviceConfig)
|
||||
: ProviderRs232()
|
||||
: ProviderRs232(deviceConfig)
|
||||
{
|
||||
_devConfig = deviceConfig;
|
||||
_isDeviceReady = false;
|
||||
|
||||
_activeDeviceType = deviceConfig["type"].toString("UNSPECIFIED").toLower();
|
||||
}
|
||||
|
||||
LedDevice* LedDeviceKarate::construct(const QJsonObject &deviceConfig)
|
||||
|
@@ -7,12 +7,8 @@ struct FrameSpec
|
||||
};
|
||||
|
||||
LedDeviceSedu::LedDeviceSedu(const QJsonObject &deviceConfig)
|
||||
: ProviderRs232()
|
||||
: ProviderRs232(deviceConfig)
|
||||
{
|
||||
_devConfig = deviceConfig;
|
||||
_isDeviceReady = false;
|
||||
|
||||
_activeDeviceType = deviceConfig["type"].toString("UNSPECIFIED").toLower();
|
||||
}
|
||||
|
||||
LedDevice* LedDeviceSedu::construct(const QJsonObject &deviceConfig)
|
||||
|
@@ -2,15 +2,10 @@
|
||||
|
||||
|
||||
LedDeviceTpm2::LedDeviceTpm2(const QJsonObject &deviceConfig)
|
||||
: ProviderRs232()
|
||||
: ProviderRs232(deviceConfig)
|
||||
{
|
||||
_devConfig = deviceConfig;
|
||||
_isDeviceReady = false;
|
||||
|
||||
_activeDeviceType = deviceConfig["type"].toString("UNSPECIFIED").toLower();
|
||||
}
|
||||
|
||||
|
||||
LedDevice* LedDeviceTpm2::construct(const QJsonObject &deviceConfig)
|
||||
{
|
||||
return new LedDeviceTpm2(deviceConfig);
|
||||
|
@@ -15,8 +15,9 @@ constexpr std::chrono::milliseconds OPEN_TIMEOUT{5000}; // device open timeout
|
||||
const int MAX_WRITE_TIMEOUTS = 5; // Maximum number of allowed timeouts
|
||||
const int NUM_POWEROFF_WRITE_BLACK = 2; // Number of write "BLACK" during powering off
|
||||
|
||||
ProviderRs232::ProviderRs232()
|
||||
: _rs232Port(this)
|
||||
ProviderRs232::ProviderRs232(const QJsonObject &deviceConfig)
|
||||
: LedDevice(deviceConfig)
|
||||
, _rs232Port(this)
|
||||
,_baudRate_Hz(1000000)
|
||||
,_isAutoDeviceName(false)
|
||||
,_delayAfterConnect_ms(0)
|
||||
|
@@ -19,7 +19,7 @@ public:
|
||||
///
|
||||
/// @brief Constructs a RS232 LED-device
|
||||
///
|
||||
ProviderRs232();
|
||||
ProviderRs232(const QJsonObject &deviceConfig);
|
||||
|
||||
///
|
||||
/// @brief Destructor of the UDP LED-device
|
||||
|
Reference in New Issue
Block a user