Cosmetics

This commit is contained in:
Bertrand Songis
2019-10-19 13:03:08 +02:00
parent 5e111dd00c
commit e2f84b8047
108 changed files with 791 additions and 1035 deletions
@@ -206,7 +206,7 @@ void gvarWeightItem(coord_t x, coord_t y, MixData * md, LcdFlags attr, event_t e
{
u_int8int16_t weight;
MD_WEIGHT_TO_UNION(md, weight);
weight.word = GVAR_MENU_ITEM(x, y, weight.word, GV_RANGELARGE_WEIGHT_NEG, GV_RANGELARGE_WEIGHT, attr, 0, event);
weight.word = GVAR_MENU_ITEM(x, y, weight.word, MIX_WEIGHT_MIN, MIX_WEIGHT_MAX, attr, 0, event);
MD_UNION_TO_WEIGHT(weight, md);
}
@@ -220,7 +220,7 @@ void drawGVarName(coord_t x, coord_t y, int8_t idx, LcdFlags flags)
void editStickHardwareSettings(coord_t x, coord_t y, int idx, event_t event, LcdFlags flags)
{
lcdDrawTextAtIndex(INDENT_WIDTH, y, STR_VSRCRAW, idx+1, 0);
if (ZEXIST(g_eeGeneral.anaNames[idx]) || (flags && s_editMode > 0))
if (g_eeGeneral.anaNames[idx][0] || (flags && s_editMode > 0))
editName(x, y, g_eeGeneral.anaNames[idx], LEN_ANA_NAME, event, flags);
else
lcdDrawMMM(x, y, flags);
+1 -1
View File
@@ -21,7 +21,7 @@
#include "opentx.h"
MenuHandlerFunc menuHandlers[5];
uint8_t menuEvent = 0;
event_t menuEvent = 0;
uint8_t menuVerticalPositions[4];
uint8_t menuLevel = 0;
+1 -1
View File
@@ -36,7 +36,7 @@ extern uint8_t menuCalibrationState;
extern MenuHandlerFunc menuHandlers[5];
extern uint8_t menuVerticalPositions[4];
extern uint8_t menuLevel;
extern uint8_t menuEvent;
extern event_t menuEvent;
void chainMenu(MenuHandlerFunc newMenu);
void pushMenu(MenuHandlerFunc newMenu);
+4 -3
View File
@@ -36,9 +36,10 @@ void drawCurve(coord_t offset)
do {
point_t point = getPoint(i);
i++;
if (point.x == 0) break;
lcdDrawFilledRect(point.x-offset, point.y-1, 3, 3, SOLID, FORCE); // do markup square
} while (1);
if (point.x == 0)
break;
lcdDrawFilledRect(point.x - offset, point.y - 1, 3, 3, SOLID, FORCE); // do markup square
} while (true);
}
void menuModelCurvesAll(event_t event)
+1 -1
View File
@@ -413,7 +413,7 @@ void menuModelExposAll(event_t event)
if (cur-menuVerticalOffset >= 0 && cur-menuVerticalOffset < NUM_BODY_LINES) {
LcdFlags attr = ((s_copyMode || sub != cur) ? 0 : INVERS);
GVAR_MENU_ITEM(EXPO_LINE_WEIGHT_POS, y, ed->weight, MIN_EXPO_WEIGHT, 100, RIGHT | attr | (isExpoActive(i) ? BOLD : 0), 0, 0);
GVAR_MENU_ITEM(EXPO_LINE_WEIGHT_POS, y, ed->weight, -100, 100, RIGHT | attr | (isExpoActive(i) ? BOLD : 0), 0, 0);
displayExpoLine(y, ed);
if (s_copyMode) {
@@ -398,7 +398,7 @@ void menuRadioHardware(event_t event)
uint8_t shift = (2*idx);
uint8_t mask = (0x03 << shift);
lcdDrawTextAtIndex(INDENT_WIDTH, y, STR_VSRCRAW, NUM_STICKS+idx+1, menuHorizontalPosition < 0 ? attr : 0);
if (ZEXIST(g_eeGeneral.anaNames[NUM_STICKS+idx]) || (attr && s_editMode > 0 && menuHorizontalPosition == 0))
if (g_eeGeneral.anaNames[NUM_STICKS+idx][0] || (attr && s_editMode > 0 && menuHorizontalPosition == 0))
editName(HW_SETTINGS_COLUMN1, y, g_eeGeneral.anaNames[NUM_STICKS+idx], LEN_ANA_NAME, event, attr && menuHorizontalPosition == 0);
else
lcdDrawMMM(HW_SETTINGS_COLUMN1, y, menuHorizontalPosition==0 ? attr : 0);