Allow 8-LED configuration for KarateLight (#1037)

This commit is contained in:
Demian Kellermann 2020-10-18 18:04:57 +02:00 committed by GitHub
parent 84607b4063
commit 8f991001c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
### Fixed ### Fixed
- Also allow an 8-LED configuration when using Karatelight
### Removed ### Removed

View File

@ -18,10 +18,10 @@ bool LedDeviceKarate::init(const QJsonObject &deviceConfig)
// Initialise sub-class // Initialise sub-class
if ( ProviderRs232::init(deviceConfig) ) if ( ProviderRs232::init(deviceConfig) )
{ {
if (_ledCount != 16) if (_ledCount != 8 && _ledCount != 16)
{ {
//Error( _log, "%d channels configured. This should always be 16!", _ledCount); //Error( _log, "%d channels configured. This should always be 16!", _ledCount);
QString errortext = QString ("%1 channels configured. This should always be 16!").arg(_ledCount); QString errortext = QString ("%1 channels configured. This should always be 8 or 16!").arg(_ledCount);
this->setInError(errortext); this->setInError(errortext);
isInitOK = false; isInitOK = false;
} }