Correct total packet count in tpm2net implementation (fix #1127) (#1128)

* Fixed calculation for _tpm2TotalPackets
This commit is contained in:
mlaurijsse 2021-02-23 20:42:54 +01:00 committed by GitHub
parent 3ae9bc998b
commit 68d06f14fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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;
}