Merge pull request #327 from OpenKNX/upstream/fix/subgroup0-warning

Fix: Do Not warn on Construction of DPT 14.000, 15.000, 16.000
This commit is contained in:
thelsing 2025-11-04 20:58:30 +01:00 committed by GitHub
commit 980c047ad7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,8 +8,8 @@ Dpt::Dpt()
Dpt::Dpt(short mainGroup, short subGroup, short index /* = 0 */)
: mainGroup(mainGroup), subGroup(subGroup), index(index)
{
if (subGroup == 0)
println("WARNING: You used and invalid Dpt *.0");
if (subGroup == 0 && (mainGroup < 14 || mainGroup > 16))
println("WARNING: You used an invalid Dpt *.0");
}
bool Dpt::operator==(const Dpt& other) const