mirror of
https://github.com/opentx/opentx.git
synced 2025-07-24 00:35:18 +03:00
5 pins were displayed when max was 4 in RX options
This commit is contained in:
parent
16a0baf4e1
commit
b18fa3b60b
3 changed files with 30 additions and 19 deletions
|
@ -122,6 +122,7 @@ void menuModelReceiverOptions(event_t event)
|
|||
// Pin
|
||||
{
|
||||
uint8_t pin = i - ITEM_RECEIVER_PINMAP_FIRST;
|
||||
if (pin < reusableBuffer.hardwareAndSettings.receiverSettings.outputsCount) {
|
||||
uint8_t channel = g_model.moduleData[g_moduleIdx].channelsStart + reusableBuffer.hardwareAndSettings.receiverSettings.outputsMapping[pin];
|
||||
int32_t channelValue = channelOutputs[channel];
|
||||
lcdDrawText(0, y, "Pin");
|
||||
|
@ -145,6 +146,7 @@ void menuModelReceiverOptions(event_t event)
|
|||
const coord_t xChannel = (channelValue > 0) ? LCD_W - 3 - wbar / 2 : LCD_W - 2 - wbar / 2 - lenChannel;
|
||||
lcdDrawHorizontalLine(xChannel, y + 2, lenChannel, SOLID, 0);
|
||||
lcdDrawHorizontalLine(xChannel, y + 3, lenChannel, SOLID, 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1358,7 +1358,7 @@ void menuModelSetup(event_t event)
|
|||
|
||||
if (attr && EVT_KEY_MASK(event) == KEY_ENTER) {
|
||||
killEvents(event);
|
||||
if (isPXX2ReceiverEmpty(moduleIdx, receiverIdx)) {
|
||||
if (!isSimu() && isPXX2ReceiverEmpty(moduleIdx, receiverIdx)) {
|
||||
onPXX2ReceiverMenu(STR_BIND);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -1400,4 +1400,13 @@ enum JackMode {
|
|||
#include "gyro.h"
|
||||
#endif
|
||||
|
||||
inline bool isSimu()
|
||||
{
|
||||
#if defined(SIMU)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // _OPENTX_H_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue