[X7D/X9E] GVars display fixed (menus INPUTS / MIXES / OUTPUTS) (#4053)

This commit is contained in:
Bertrand Songis
2016-11-20 11:07:59 +01:00
committed by GitHub
parent 2d0a8a9611
commit b93b0a6500
6 changed files with 25 additions and 14 deletions
+3 -3
View File
@@ -154,7 +154,7 @@ void onMixesMenu(const char * result)
}
#if LCD_W >= 212
#define MIX_LINE_WEIGHT_POS 2*FW+32
#define MIX_LINE_WEIGHT_POS 2*FW+34
#define MIX_LINE_SRC_POS 7*FW+5
#define MIX_LINE_CURVE_POS 13*FW+3
#define MIX_LINE_SWITCH_POS 19*FW+1
@@ -402,7 +402,7 @@ void menuModelMixAll(event_t event)
int cur = 0;
int i = 0;
for (int ch=1; ch<=MAX_OUTPUT_CHANNELS; ch++) {
for (uint8_t ch=1; ch<=MAX_OUTPUT_CHANNELS; ch++) {
MixData * md;
coord_t y = MENU_HEADER_HEIGHT+1+(cur-menuVerticalOffset)*FH;
if (i<MAX_MIXERS && (md=mixAddress(i))->srcRaw && md->destCh+1 == ch) {
@@ -426,7 +426,7 @@ void menuModelMixAll(event_t event)
s_currIdx = i;
}
if (cur-menuVerticalOffset >= 0 && cur-menuVerticalOffset < NUM_BODY_LINES) {
uint8_t attr = ((s_copyMode || sub != cur) ? 0 : INVERS);
LcdFlags attr = ((s_copyMode || sub != cur) ? 0 : INVERS);
if (mixCnt > 0) lcdDrawTextAtIndex(FW, y, STR_VMLTPX2, md->mltpx, 0);
+9 -3
View File
@@ -20,10 +20,16 @@
#include "opentx.h"
void drawStringWithIndex(coord_t x, coord_t y, const pm_char * str, uint8_t idx, LcdFlags att)
void drawStringWithIndex(coord_t x, coord_t y, const pm_char * str, uint8_t idx, LcdFlags flags)
{
lcdDrawText(x, y, str, att & ~LEADING0);
lcdDrawNumber(lcdNextPos, y, idx, att|LEFT, 2);
if (flags & RIGHT) {
lcdDrawNumber(x, y, idx, flags);
lcdDrawText(x-FW, y, str, flags & ~LEADING0);
}
else {
lcdDrawText(x, y, str, flags & ~LEADING0);
lcdDrawNumber(lcdNextPos, y, idx, flags|LEFT, 2);
}
}
#if defined(CPUARM)