fix(yaml): Do not limit to static MPM protocol definitions (#4146)

This commit is contained in:
Raphael Coeffic
2023-10-18 19:24:21 +10:00
committed by GitHub
parent 1b789cafb3
commit 6d3aa573d4
3 changed files with 38 additions and 24 deletions
@@ -1994,19 +1994,8 @@ static void r_modSubtype(void* user, uint8_t* data, uint32_t bitoffs,
// convert to ETX format and write to vars
if (type > 0) {
type -= 1; // change to internal 0 based representation
if(type > MODULE_SUBTYPE_MULTI_LAST) {
TRACE("Multi protocol: %d exceeds supported protocols. Module set to: OFF", type);
md->type = MODULE_TYPE_NONE;
} else {
if(subtype > getMultiProtocolDefinition(type)->maxSubtype) {
TRACE("Multi protocol sub-type %d exceeds number of supported sub-types. Module set to: OFF", subtype);
md->type = MODULE_TYPE_NONE;
} else {
md->multi.rfProtocol = type;
md->subType = subtype;
}
}
md->multi.rfProtocol = type;
md->subType = subtype;
}
#endif
} else if (md->type == MODULE_TYPE_DSM2) {