fix ommands with auto-id (-1)

This commit is contained in:
MichaelDvP
2024-06-28 07:23:12 +02:00
parent 266a7a4e9b
commit a9de8ec046

View File

@@ -428,7 +428,7 @@ Command::CmdFunction * Command::find_command(const uint8_t device_type, const ui
for (auto & cf : cmdfunctions_) {
if (Helpers::toLower(cmd) == Helpers::toLower(cf.cmd_) && (cf.device_type_ == device_type) && (!device_id || cf.device_id_ == device_id)
&& (flag & 0x3F) == (cf.flags_ & 0x3F)) {
&& (flag == CommandFlag::CMD_FLAG_DEFAULT || (flag & 0x3F) == (cf.flags_ & 0x3F))) {
return &cf;
}
}