fix adalight in lightberry mode

fix issue #332
This commit is contained in:
redPanther 2016-12-12 23:28:27 +01:00 committed by GitHub
parent 2410c6021e
commit 0e6866fb23

View File

@ -5,7 +5,6 @@ LedDeviceAdalight::LedDeviceAdalight(const QJsonObject &deviceConfig)
, _ligthBerryAPA102Mode(false)
{
_deviceReady = init(deviceConfig);
_ligthBerryAPA102Mode = deviceConfig["lightberry_apa102_mode"].toBool(false);
}
LedDevice* LedDeviceAdalight::construct(const QJsonObject &deviceConfig)
@ -16,6 +15,7 @@ LedDevice* LedDeviceAdalight::construct(const QJsonObject &deviceConfig)
bool LedDeviceAdalight::init(const QJsonObject &deviceConfig)
{
ProviderRs232::init(deviceConfig);
_ligthBerryAPA102Mode = deviceConfig["lightberry_apa102_mode"].toBool(false);
// create ledBuffer
unsigned int bufferSize = 6; // 6 bytes header