mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
New LED Device - Cololight (#1070)
This commit is contained in:
@@ -24,6 +24,7 @@ LedDevice::LedDevice(const QJsonObject& deviceConfig, QObject* parent)
|
||||
, _refreshTimer(nullptr)
|
||||
, _refreshTimerInterval_ms(0)
|
||||
, _latchTime_ms(0)
|
||||
, _ledCount(0)
|
||||
, _isRestoreOrigState(false)
|
||||
, _isEnabled(false)
|
||||
, _isDeviceInitialised(false)
|
||||
@@ -454,3 +455,17 @@ QString LedDevice::uint8_t_to_hex_string(const uint8_t * data, const qint64 size
|
||||
return bytes.toHex();
|
||||
#endif
|
||||
}
|
||||
|
||||
QString LedDevice::toHex(const QByteArray& data, int number) const
|
||||
{
|
||||
if ( number <= 0 || number > data.size())
|
||||
{
|
||||
number = data.size();
|
||||
}
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
|
||||
return data.left(number).toHex(':');
|
||||
#else
|
||||
return data.left(number).toHex();
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user