1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-26 17:55:19 +03:00

[PXX2] R9M/R9 BIND options added

This commit is contained in:
Bertrand Songis 2019-04-24 11:13:29 +02:00
parent 2df7002b43
commit 3a99fcd826
29 changed files with 335 additions and 227 deletions

View file

@ -154,16 +154,16 @@ void sendFrameProtocolHeader(uint8_t port, bool failsafe)
int8_t optionValue = g_model.moduleData[port].multi.optionValue;
uint8_t protoByte = 0;
if (moduleSettings[port].mode == MODULE_MODE_BIND)
if (moduleState[port].mode == MODULE_MODE_BIND)
protoByte |= MULTI_SEND_BIND;
else if (moduleSettings[port].mode == MODULE_MODE_RANGECHECK)
else if (moduleState[port].mode == MODULE_MODE_RANGECHECK)
protoByte |= MULTI_SEND_RANGECHECK;
// rfProtocol
if (g_model.moduleData[port].getMultiProtocol(true) == MM_RF_PROTO_DSM2) {
// Autobinding should always be done in DSMX 11ms
if (g_model.moduleData[port].multi.autoBindMode && moduleSettings[port].mode == MODULE_MODE_BIND)
if (g_model.moduleData[port].multi.autoBindMode && moduleState[port].mode == MODULE_MODE_BIND)
subtype = MM_RF_DSM2_SUBTYPE_AUTO;
// Multi module in DSM mode wants the number of channels to be used as option value