diff --git a/CHANGELOG.md b/CHANGELOG.md index 10f5f39d..83de2cde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,8 +15,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix High CPU load (RPI3B+) (#1013) ### Fixed + +- Fix issue #1127: LED-Devices: Correct total packet count in tpm2net implementation - LED-Hue: Proper black in Entertainement mode if min brightness is set + ### Removed ## [2.0.0-alpha.9](https://github.com/hyperion-project/hyperion.ng/releases/tag/2.0.0-alpha.9) - 2020-11-18 diff --git a/libsrc/leddevice/dev_net/LedDeviceTpm2net.cpp b/libsrc/leddevice/dev_net/LedDeviceTpm2net.cpp index 99d6b701..6bff67f7 100644 --- a/libsrc/leddevice/dev_net/LedDeviceTpm2net.cpp +++ b/libsrc/leddevice/dev_net/LedDeviceTpm2net.cpp @@ -23,7 +23,7 @@ bool LedDeviceTpm2net::init(const QJsonObject &deviceConfig) { _tpm2_max = deviceConfig["max-packet"].toInt(170); _tpm2ByteCount = 3 * _ledCount; - _tpm2TotalPackets = 1 + _tpm2ByteCount / _tpm2_max; + _tpm2TotalPackets = (_tpm2ByteCount / _tpm2_max) + ((_tpm2ByteCount % _tpm2_max) != 0); isInitOK = true; }