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:
Michael
2023-05-23 10:05:12 +10:00
committed by GitHub
parent 5327c890f2
commit 8893db2726
3 changed files with 39 additions and 26 deletions
-14
View File
@@ -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;