mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Fixes
This commit is contained in:
parent
ee956f0a30
commit
d0437be23d
3 changed files with 6 additions and 4 deletions
|
@ -264,7 +264,7 @@ enum MenuModelSetupItems {
|
||||||
|
|
||||||
void onPXX2BindMenu(const char * result)
|
void onPXX2BindMenu(const char * result)
|
||||||
{
|
{
|
||||||
reusableBuffer.moduleSetup.pxx2.bindSelectedReceiverIndex = (result - reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversNames[0]) / sizeof(reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversNames[0]);
|
reusableBuffer.moduleSetup.pxx2.bindSelectedReceiverIndex = (result - reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversNames[0]) / PXX2_LEN_RX_NAME;
|
||||||
reusableBuffer.moduleSetup.pxx2.bindStep = BIND_RX_NAME_SELECTED;
|
reusableBuffer.moduleSetup.pxx2.bindStep = BIND_RX_NAME_SELECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1344,6 +1344,7 @@ void menuModelSetup(event_t event)
|
||||||
if (event == EVT_KEY_BREAK(KEY_ENTER)) {
|
if (event == EVT_KEY_BREAK(KEY_ENTER)) {
|
||||||
reusableBuffer.moduleSetup.pxx2.bindStep = BIND_START;
|
reusableBuffer.moduleSetup.pxx2.bindStep = BIND_START;
|
||||||
reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversCount = 0;
|
reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversCount = 0;
|
||||||
|
reusableBuffer.moduleSetup.pxx2.bindReceiverSlot = receiverSlot;
|
||||||
moduleSettings[moduleIdx].mode ^= MODULE_MODE_BIND;
|
moduleSettings[moduleIdx].mode ^= MODULE_MODE_BIND;
|
||||||
}
|
}
|
||||||
if (moduleSettings[moduleIdx].mode == MODULE_MODE_BIND) {
|
if (moduleSettings[moduleIdx].mode == MODULE_MODE_BIND) {
|
||||||
|
@ -1863,7 +1864,7 @@ void menuModelFailsafe(event_t event)
|
||||||
const int32_t channelValue = channelOutputs[ch+channelStart];
|
const int32_t channelValue = channelOutputs[ch+channelStart];
|
||||||
int32_t failsafeValue = g_model.failsafeChannels[ch];
|
int32_t failsafeValue = g_model.failsafeChannels[ch];
|
||||||
|
|
||||||
//Channel
|
// Channel
|
||||||
putsChn(x+1, y, ch+1, SMLSIZE);
|
putsChn(x+1, y, ch+1, SMLSIZE);
|
||||||
|
|
||||||
// Value
|
// Value
|
||||||
|
|
|
@ -1132,6 +1132,7 @@ union ReusableBuffer
|
||||||
char registrationID[PXX2_LEN_REGISTRATION_ID];
|
char registrationID[PXX2_LEN_REGISTRATION_ID];
|
||||||
char bindCandidateReceiversNames[PXX2_MAX_RECEIVERS_PER_MODULE][PXX2_LEN_RX_NAME];
|
char bindCandidateReceiversNames[PXX2_MAX_RECEIVERS_PER_MODULE][PXX2_LEN_RX_NAME];
|
||||||
uint8_t bindCandidateReceiversCount;
|
uint8_t bindCandidateReceiversCount;
|
||||||
|
uint8_t bindReceiverSlot;
|
||||||
union {
|
union {
|
||||||
uint8_t bindSelectedReceiverIndex;
|
uint8_t bindSelectedReceiverIndex;
|
||||||
uint8_t shareReceiverIndex;
|
uint8_t shareReceiverIndex;
|
||||||
|
|
|
@ -143,8 +143,8 @@ bool Pxx2Pulses::setupBindFrame(uint8_t module)
|
||||||
for (uint8_t i=0; i<PXX2_LEN_RX_NAME; i++) {
|
for (uint8_t i=0; i<PXX2_LEN_RX_NAME; i++) {
|
||||||
Pxx2Transport::addByte(reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversNames[reusableBuffer.moduleSetup.pxx2.bindSelectedReceiverIndex][i]);
|
Pxx2Transport::addByte(reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversNames[reusableBuffer.moduleSetup.pxx2.bindSelectedReceiverIndex][i]);
|
||||||
}
|
}
|
||||||
Pxx2Transport::addByte(1); // TODO RX_UID
|
Pxx2Transport::addByte(reusableBuffer.moduleSetup.pxx2.bindReceiverSlot); // RX_UID is the slot index (which is unique and never moved)
|
||||||
Pxx2Transport::addByte(g_model.header.modelId[INTERNAL_MODULE]);
|
Pxx2Transport::addByte(g_model.header.modelId[module]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Pxx2Transport::addByte(0x00);
|
Pxx2Transport::addByte(0x00);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue