Bsongis/refactoring before x10 ui merge (#6678)
UI functions refactoring
This commit is contained in:
@@ -22,12 +22,6 @@ set(GUI_SRC
|
||||
view_statistics.cpp
|
||||
)
|
||||
|
||||
set(SRC
|
||||
${SRC}
|
||||
gui/common/widgets.cpp
|
||||
gui/common/arm/widgets.cpp
|
||||
)
|
||||
|
||||
if(FLIGHT_MODES)
|
||||
set(GUI_SRC
|
||||
${GUI_SRC}
|
||||
|
||||
@@ -813,21 +813,6 @@ void drawTimerMode(coord_t x, coord_t y, swsrc_t mode, LcdFlags att)
|
||||
drawSwitch(x, y, mode, att);
|
||||
}
|
||||
|
||||
void drawTrimMode(coord_t x, coord_t y, uint8_t fm, uint8_t idx, LcdFlags att)
|
||||
{
|
||||
trim_t v = getRawTrimValue(fm, idx);
|
||||
uint8_t mode = v.mode;
|
||||
uint8_t p = mode >> 1;
|
||||
char s[] = "--";
|
||||
if (mode != TRIM_MODE_NONE) {
|
||||
if (mode % 2 == 0)
|
||||
s[0] = ':';
|
||||
else
|
||||
s[0] = '+';
|
||||
s[1] = '0'+p;
|
||||
}
|
||||
lcdDrawText(x, y, s, att);
|
||||
}
|
||||
void drawShortTrimMode(coord_t x, coord_t y, uint8_t fm, uint8_t idx, LcdFlags att)
|
||||
{
|
||||
trim_t v = getRawTrimValue(fm, idx);
|
||||
@@ -841,15 +826,6 @@ void drawShortTrimMode(coord_t x, coord_t y, uint8_t fm, uint8_t idx, LcdFlags a
|
||||
}
|
||||
}
|
||||
|
||||
void drawValueWithUnit(coord_t x, coord_t y, int val, uint8_t unit, LcdFlags att)
|
||||
{
|
||||
// convertUnit(val, unit);
|
||||
lcdDrawNumber(x, y, val, att & (~NO_UNIT));
|
||||
if (!(att & NO_UNIT) && unit != UNIT_RAW) {
|
||||
lcdDrawTextAtIndex(lcdLastRightPos/*+1*/, y, STR_VTELEMUNIT, unit, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void drawGPSCoord(coord_t x, coord_t y, int32_t value, const char * direction, LcdFlags att, bool seconds=true)
|
||||
{
|
||||
att &= ~RIGHT & ~BOLD;
|
||||
|
||||
@@ -130,7 +130,6 @@ void drawSource(coord_t x, coord_t y, mixsrc_t idx, LcdFlags att=0);
|
||||
void drawCurveName(coord_t x, coord_t y, int8_t idx, LcdFlags att=0);
|
||||
void drawTimerMode(coord_t x, coord_t y, swsrc_t mode, LcdFlags att=0);
|
||||
|
||||
void drawTrimMode(coord_t x, coord_t y, uint8_t phase, uint8_t idx, LcdFlags att);
|
||||
void drawShortTrimMode(coord_t x, coord_t y, uint8_t mode, uint8_t idx, LcdFlags att);
|
||||
|
||||
#define putsChn(x, y, idx, att) drawSource(x, y, MIXSRC_CH1+idx-1, att)
|
||||
|
||||
Reference in New Issue
Block a user