fix(colorlcd): ACCESS receivers being lost after sync with Companion (#3355)
* fixes https://github.com/EdgeTX/edgetx/issues/3273 * empty commit to trigger checks * Companion: moved yaml tag receivers correction to yaml parserCompanion and radio: updated comments
This commit is contained in:
@@ -419,6 +419,7 @@ bool convert<ModuleData>::decode(const Node& node, ModuleData& rhs)
|
||||
if (rcvrname.IsMap()) {
|
||||
if (rcvrname["val"]) {
|
||||
rcvrname["val"] >> rhs.access.receiverName[i];
|
||||
rhs.access.receivers |= (1 << i); // fix colorLCD radios not writing tag receivers
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,8 +38,8 @@ static void startBindWaitDialog(Window* parent, uint8_t moduleIdx,
|
||||
bindInfo.candidateReceiversNames[bindInfo.selectedReceiverIndex];
|
||||
memcpy(g_model.moduleData[moduleIdx].pxx2.receiverName[receiverIdx],
|
||||
receiverName, PXX2_LEN_RX_NAME);
|
||||
storageDirty(EE_MODEL);
|
||||
bindInfo.step = BIND_OK;
|
||||
setPXX2ReceiverUsed(moduleIdx, receiverIdx);
|
||||
moduleState[moduleIdx].mode = MODULE_MODE_NORMAL;
|
||||
new MessageDialog(parent, STR_BIND, STR_BIND_OK);
|
||||
#else
|
||||
@@ -161,6 +161,7 @@ void BindWaitDialog::checkEvents()
|
||||
deleteLater();
|
||||
if (bindInfo.step == BIND_OK) {
|
||||
POPUP_INFORMATION(STR_REG_OK);
|
||||
setPXX2ReceiverUsed(moduleIdx, receiverIdx);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -740,6 +740,7 @@ inline bool isPXX2ReceiverUsed(uint8_t moduleIdx, uint8_t receiverIdx)
|
||||
inline void setPXX2ReceiverUsed(uint8_t moduleIdx, uint8_t receiverIdx)
|
||||
{
|
||||
g_model.moduleData[moduleIdx].pxx2.receivers |= (1 << receiverIdx);
|
||||
storageDirty(EE_MODEL);
|
||||
}
|
||||
|
||||
inline bool isPXX2ReceiverEmpty(uint8_t moduleIdx, uint8_t receiverIdx)
|
||||
|
||||
@@ -136,6 +136,19 @@ void postModelLoad(bool alarms)
|
||||
if (is_memclear(g_model.modelRegistrationID, PXX2_LEN_REGISTRATION_ID)) {
|
||||
memcpy(g_model.modelRegistrationID, g_eeGeneral.ownerRegistrationID, PXX2_LEN_REGISTRATION_ID);
|
||||
}
|
||||
|
||||
// fix colorLCD radios not writing yaml tag receivers
|
||||
ModuleData *intModule = &g_model.moduleData[INTERNAL_MODULE];
|
||||
ModuleData *extModule = &g_model.moduleData[EXTERNAL_MODULE];
|
||||
|
||||
for(uint8_t receiverIdx = 0; receiverIdx < 3; receiverIdx++) {
|
||||
if(intModule->pxx2.receiverName[receiverIdx][0])
|
||||
intModule->pxx2.receivers |= (1 << receiverIdx);
|
||||
|
||||
if(extModule->pxx2.receiverName[receiverIdx][0])
|
||||
extModule->pxx2.receivers |= (1 << receiverIdx);
|
||||
}
|
||||
storageDirty(EE_MODEL);
|
||||
#endif
|
||||
|
||||
#if defined(MULTIMODULE) && defined(MULTI_PROTOLIST)
|
||||
|
||||
Reference in New Issue
Block a user