How can I get total number of available models knowing protocol number? #1549
-
There are two models for Gree protocol:
and 6 for Panasonic
How can I get the number of available models (2) knowing protocol number for GREE (Protocol 24)? |
Beta Was this translation helpful? Give feedback.
Answered by
crankyoldgit
Aug 5, 2021
Replies: 1 comment
-
There is no standard or easy way. uint16_t howmanymodels(const decode_type_t protocol) {
uint16_t model_count = 0;
while (irutils::modelToStr(protocol, model_count) != kUnknownStr) {
model_count++;
}
return model_count;
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
crankyoldgit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is no standard or easy way.
You could write code to (ab)use
irutils::modelToStr();
i.e. (Untested Code):