fix: MPM protocol options missing for some protocols (#3504)
* fixes #2713 changes: - use getMultiOptionTitle() instead of rfproto->getOptionStr() as getMultiOptionTitle() takes updated MPM status in account * code cleanup: removed obsolete functions * fix #3046 * fixed my complete misunderstanding of how the chosen protocol is updated in Multi DSM auto mode * removed obsolete check * update subType list only on rf protocol change added some comments * reconsidered implementation utilizing LV_EVENT_REFRESH to avoid sporadic loss of update * editorial change * fix problem where a successful MPM DSM2 auto bind would reset the receiver ID * reset DSM2autoUpdated just in case
This commit is contained in:
@@ -136,20 +136,6 @@ void MultiRfProtocols::RfProto::fillSubProtoList(const char *const *str, int n)
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t MultiRfProtocols::RfProto::getOption() const
|
||||
{
|
||||
uint8_t opt = flags >> 4;
|
||||
if (opt >= getMaxMultiOptions()) {
|
||||
opt = 1; // Unknown options are defaulted to type 1 (basic option)
|
||||
}
|
||||
return opt;
|
||||
}
|
||||
|
||||
const char* MultiRfProtocols::RfProto::getOptionStr() const
|
||||
{
|
||||
return mm_options_strings::options[getOption()];
|
||||
}
|
||||
|
||||
MultiRfProtocols* MultiRfProtocols::instance(unsigned int moduleIdx)
|
||||
{
|
||||
if (moduleIdx >= NUM_MODULES) return nullptr;
|
||||
|
||||
@@ -73,9 +73,6 @@ class MultiRfProtocols
|
||||
|
||||
// fixed length strings concatenated
|
||||
void fillSubProtoList(const char* str, int n, int len);
|
||||
|
||||
uint8_t getOption() const;
|
||||
const char* getOptionStr() const;
|
||||
|
||||
bool supportsFailsafe() const { return flags & 0x01; }
|
||||
bool supportsDisableMapping() const { return flags & 0x02; }
|
||||
|
||||
Reference in New Issue
Block a user