Lots of color fixes and screen enhancements (#833)

* consolidated all color fixes and screen enhancements into one new branch

* Bump libopenui

* enhanced telementry sensor display

* fix discover and add sensor buttons on NV14.

* changed quick menu to not use theme colors as per JimB.  Fixed telemetry buttons for NV14

* fix colors on trainer page

* Merge cleanup

* Update libopenui

Co-authored-by: kkoenig1@optonline.com <kkoenig1@optonline.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
Kevin Koenig
2021-09-29 22:27:11 +10:00
committed by GitHub
co-authored by kkoenig1@optonline.com <kkoenig1@optonline.com> Peter Feerick
parent c0f792c392
commit 2f65ec4c58
22 changed files with 205 additions and 129 deletions
+1 -1
View File
@@ -53,6 +53,6 @@ void FabButton::paint(BitmapBuffer * dc)
const BitmapBuffer* mask = theme->getIconMask(icon);
if (mask) {
dc->drawMask((width() - mask->width()) / 2,
(FAB_BUTTON_SIZE - mask->height()) / 2, mask, COLOR_THEME_SECONDARY3);
(FAB_BUTTON_SIZE - mask->height()) / 2, mask, COLOR2FLAGS(WHITE));
}
}
+3 -4
View File
@@ -261,10 +261,10 @@ class CurveButton : public Button {
// curve characteristics
if (isCurveUsed(index)) {
CurveHeader &curve = g_model.curves[index];
dc->drawNumber(130, 5, 5 + curve.points, LEFT | COLOR_THEME_PRIMARY1, 0, nullptr, STR_PTS);
dc->drawTextAtIndex(130, 25, STR_CURVE_TYPES, curve.type, COLOR_THEME_PRIMARY1);
dc->drawNumber(130, 5, 5 + curve.points, LEFT | COLOR_THEME_SECONDARY1, 0, nullptr, STR_PTS);
dc->drawTextAtIndex(130, 25, STR_CURVE_TYPES, curve.type, COLOR_THEME_SECONDARY1);
if (curve.smooth)
dc->drawText(130, 45, STR_SMOOTH, COLOR_THEME_PRIMARY1);
dc->drawText(130, 45, STR_SMOOTH, COLOR_THEME_SECONDARY1);
}
}
@@ -387,7 +387,6 @@ void ModelCurvesPage::build(FormWindow * window, int8_t focusIndex)
} else {
auto button = new TextButton(window, grid.getLabelSlot(),
getCurveString(1 + index));
button->setPressHandler([=]() {
Menu *menu = new Menu(window);
menu->addLine(STR_EDIT, [=]() {
+82 -18
View File
@@ -24,6 +24,8 @@
#define SET_DIRTY() storageDirty(EE_MODEL)
#define LABEL_RIGHT_MARGIN 10
ModelFlightModesPage::ModelFlightModesPage():
PageTab(STR_MENUFLIGHTMODES, ICON_MODEL_FLIGHT_MODES)
{
@@ -41,6 +43,9 @@ class FlightModeGroup: public FormGroup
FormGroup(parent, rect),
index(index)
{
setFocusHandler([=] (bool focus) {
setSubWindowColors(focus);
});
}
void checkEvents() override
@@ -55,20 +60,44 @@ class FlightModeGroup: public FormGroup
void paint(BitmapBuffer * dc) override
{
if (index == getFlightMode()) {
dc->drawSolidFilledRect(0, 0, width(), height(), COLOR_THEME_ACTIVE);
}
else {
dc->drawSolidFilledRect(0, 0, width(), height(), COLOR_THEME_PRIMARY2);
}
uint32_t fillColor = getFocus() != this ? COLOR_THEME_SECONDARY2 : COLOR_THEME_FOCUS;
dc->drawSolidFilledRect(0, 0, width(), height(), fillColor);
FormGroup::paint(dc);
}
void setSubWindowColors(bool focus)
{
int32_t color = focus ? COLOR_THEME_PRIMARY2 : COLOR_THEME_PRIMARY1;
for (auto window: getChildren()) {
if (dynamic_cast<StaticText *>(window) != nullptr) {
LcdFlags flags = dynamic_cast<Subtitle *>(window) == nullptr ? RIGHT : 0;
window->setTextFlags(flags | color);
}
}
}
protected:
uint8_t index;
bool active = false;
};
rect_t getRightAlignedLabelSlot(FormGridLayout &grid)
{
auto rect = grid.getLabelSlot();
rect.w -= LABEL_RIGHT_MARGIN;
return rect;
}
rect_t getRightAlignedFieldSlot(FormGridLayout &grid, uint8_t count, uint8_t index)
{
auto rect = grid.getFieldSlot(count, index);
rect.w -= LABEL_RIGHT_MARGIN;
return rect;
}
void ModelFlightModesPage::build(FormWindow * window)
{
coord_t y = 2;
@@ -86,24 +115,52 @@ void ModelFlightModesPage::build(FormWindow * window)
grid.spacer();
char label[16];
getFlightModeString(label, i+1);
getFlightModeString(label, i + 1);
new Subtitle(group, grid.getLabelSlot(), label, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
FormField *a = nullptr;
std::function<uint32_t (FormField *)> backgroundHandler = [=](FormField *field) {
if (! field->isEditMode() && !field->hasFocus())
return i == getFlightMode() ? COLOR_THEME_ACTIVE : COLOR_THEME_PRIMARY2;
else if (field->hasFocus() && ! field->isEditMode())
return COLOR_THEME_FOCUS;
else
return COLOR_THEME_EDIT;
};
bool bNarrowScreen = LCD_W < LCD_H;
// Flight mode name
new StaticText(group, grid.getLabelSlot(true), STR_NAME, 0, COLOR_THEME_PRIMARY1);
new ModelTextEdit(group, grid.getFieldSlot(), g_model.flightModeData[i].name, LEN_FLIGHT_MODE_NAME);
grid.nextLine();
new StaticText(group, getRightAlignedLabelSlot(grid), STR_NAME, 0, RIGHT | COLOR_THEME_PRIMARY1);
rect_t r = grid.getFieldSlot();;
if (! bNarrowScreen) {
r = grid.getFieldSlot(3,0);
r.w += 53;
}
a = new ModelTextEdit(group, r, g_model.flightModeData[i].name, LEN_FLIGHT_MODE_NAME);
a->setBackgroundHandler(backgroundHandler);
// Flight mode switch
if (i > 0) {
new StaticText(group, grid.getLabelSlot(true), STR_SWITCH, 0, COLOR_THEME_PRIMARY1);
new SwitchChoice(group, grid.getFieldSlot(), SWSRC_FIRST_IN_MIXES, SWSRC_LAST_IN_MIXES, GET_SET_DEFAULT(g_model.flightModeData[i].swtch));
if (! bNarrowScreen) {
new StaticText(group, getRightAlignedFieldSlot(grid, 3, 1), STR_SWITCH, 0, RIGHT | COLOR_THEME_PRIMARY1);
a = new SwitchChoice(group, grid.getFieldSlot(3, 2), SWSRC_FIRST_IN_MIXES, SWSRC_LAST_IN_MIXES, GET_SET_DEFAULT(g_model.flightModeData[i].swtch));
}
else {
grid.nextLine();
new StaticText(group, getRightAlignedLabelSlot(grid), STR_SWITCH, 0, RIGHT | COLOR_THEME_PRIMARY1);
a = new SwitchChoice(group, grid.getFieldSlot(), SWSRC_FIRST_IN_MIXES, SWSRC_LAST_IN_MIXES, GET_SET_DEFAULT(g_model.flightModeData[i].swtch));
}
a->setBackgroundHandler(backgroundHandler);
grid.nextLine();
}
else {
grid.nextLine();
}
// Flight mode trims
new StaticText(group, grid.getLabelSlot(true), STR_TRIMS, 0, COLOR_THEME_PRIMARY1);
new StaticText(group, getRightAlignedLabelSlot(grid), STR_TRIMS, 0, RIGHT | COLOR_THEME_PRIMARY1);
const char * STR_VTRIMS_MODES = "\002"
"--"
@@ -127,28 +184,35 @@ void ModelFlightModesPage::build(FormWindow * window)
"+8";
for (int t = 0; t < NUM_TRIMS; t++) {
// TODO isTrimModeAvailable to avoid +{{CURRENT}}
new Choice(group, grid.getFieldSlot(NUM_TRIMS, t), STR_VTRIMS_MODES, -1, 2*MAX_FLIGHT_MODES-1,
a = new Choice(group, grid.getFieldSlot(NUM_TRIMS, t), STR_VTRIMS_MODES, -1, 2*MAX_FLIGHT_MODES-1,
GET_DEFAULT(g_model.flightModeData[i].trim[t].mode==TRIM_MODE_NONE ? -1 : g_model.flightModeData[i].trim[t].mode),
SET_DEFAULT(g_model.flightModeData[i].trim[t].mode));
a->setBackgroundHandler(backgroundHandler);
}
grid.nextLine();
// Flight mode fade in / out
new StaticText(group, grid.getLabelSlot(true), "Fade in/out", 0, COLOR_THEME_PRIMARY1);
new NumberEdit(group, grid.getFieldSlot(2, 0), 0, DELAY_MAX,
new StaticText(group, getRightAlignedLabelSlot(grid), "Fade in/out", 0, RIGHT | COLOR_THEME_PRIMARY1);
a = new NumberEdit(group, grid.getFieldSlot(2, 0), 0, DELAY_MAX,
GET_DEFAULT(g_model.flightModeData[i].fadeIn),
SET_VALUE(g_model.flightModeData[i].fadeIn, newValue),
0, PREC1);
new NumberEdit(group, grid.getFieldSlot(2, 1), 0, DELAY_MAX,
a->setBackgroundHandler(backgroundHandler);
a = new NumberEdit(group, grid.getFieldSlot(2, 1), 0, DELAY_MAX,
GET_DEFAULT(g_model.flightModeData[i].fadeOut),
SET_VALUE(g_model.flightModeData[i].fadeOut, newValue),
0, PREC1);
a->setBackgroundHandler(backgroundHandler);
grid.nextLine();
grid.spacer();
coord_t height = grid.getWindowHeight();
group->setHeight(height);
y += height + 2;
if (i == 0)
group->setSubWindowColors(true);
}
char label[32];
+2 -2
View File
@@ -25,7 +25,7 @@
#define SET_DIRTY() storageDirty(EE_MODEL)
#define TEXT_LEFT_MARGIN 2
#define GVAR_NAME_SIZE 50
#define GVAR_NAME_SIZE 45
GVarButton::GVarButton(FormGroup * parent, const rect_t &rect, uint8_t gvar) :
Button(parent, rect),
@@ -64,7 +64,7 @@ void GVarButton::paint(BitmapBuffer * dc)
currentFlightMode = getFlightMode();
gvarSum = 0;
LcdFlags bgColor = COLOR_THEME_PRIMARY2;
LcdFlags bgColor = COLOR_THEME_SECONDARY2;
LcdFlags textColor = COLOR_THEME_PRIMARY1;
if (hasFocus()) {
bgColor = COLOR_THEME_FOCUS;
-1
View File
@@ -598,7 +598,6 @@ void ModelInputsPage::build(FormWindow *window, int8_t focusIndex)
} else {
auto button = new TextButton(window, grid.getLabelSlot(),
getSourceString(MIXSRC_FIRST_INPUT + input));
if (focusIndex == inputIndex) button->setFocus(SET_FOCUS_DEFAULT);
button->setPressHandler([=]() -> uint8_t {
button->bringToTop();
Menu *menu = new Menu(window);
@@ -244,7 +244,6 @@ class LogicalSwitchEditPage: public Page
static constexpr coord_t line1 = FIELD_PADDING_TOP;
static constexpr coord_t line2 = line1 + PAGE_LINE_HEIGHT;
static constexpr coord_t line3 = line2 + PAGE_LINE_HEIGHT;
static constexpr coord_t col1 = 20;
static constexpr coord_t col2 = (LCD_W - 100) / 3 + col1;
static constexpr coord_t col3 = ((LCD_W - 100) / 3) * 2 + col1;
@@ -258,7 +257,6 @@ class LogicalSwitchButton : public Button
LogicalSwitchData* ls = lswAddress(lsIndex);
if (ls->andsw != SWSRC_NONE || ls->duration != 0 || ls->delay != 0)
setHeight(height() + 20);
if (lswFamily(ls->func) == LS_FAMILY_EDGE) setHeight(height() + 20);
}
bool isActive() const
@@ -282,38 +280,38 @@ class LogicalSwitchButton : public Button
uint8_t lsFamily = lswFamily(ls->func);
// CSW func
dc->drawTextAtIndex(col1, line1, STR_VCSWFUNC, ls->func, COLOR_THEME_PRIMARY1);
dc->drawTextAtIndex(col1, line1, STR_VCSWFUNC, ls->func, COLOR_THEME_SECONDARY1);
// CSW params
if (lsFamily == LS_FAMILY_BOOL || lsFamily == LS_FAMILY_STICKY) {
drawSwitch(dc, col2, line1, ls->v1, COLOR_THEME_PRIMARY1);
drawSwitch(dc, col3, line1, ls->v2, COLOR_THEME_PRIMARY1);
drawSwitch(dc, col2, line1, ls->v1, COLOR_THEME_SECONDARY1);
drawSwitch(dc, col3, line1, ls->v2, COLOR_THEME_SECONDARY1);
} else if (lsFamily == LS_FAMILY_EDGE) {
drawSwitch(dc, col1, line2, ls->v1, COLOR_THEME_PRIMARY1);
putsEdgeDelayParam(dc, col2, line2, ls, COLOR_THEME_PRIMARY1);
drawSwitch(dc, col2, line1, ls->v1, COLOR_THEME_SECONDARY1);
putsEdgeDelayParam(dc, col3, line1, ls, COLOR_THEME_SECONDARY1);
} else if (lsFamily == LS_FAMILY_COMP) {
drawSource(dc, col2, line1, ls->v1, COLOR_THEME_PRIMARY1);
drawSource(dc, col3, line1, ls->v2, COLOR_THEME_PRIMARY1);
drawSource(dc, col2, line1, ls->v1, COLOR_THEME_SECONDARY1);
drawSource(dc, col3, line1, ls->v2, COLOR_THEME_SECONDARY1);
} else if (lsFamily == LS_FAMILY_TIMER) {
dc->drawNumber(col2, line1, lswTimerValue(ls->v1), COLOR_THEME_PRIMARY1 | LEFT | PREC1);
dc->drawNumber(col3, line1, lswTimerValue(ls->v2), COLOR_THEME_PRIMARY1 | LEFT | PREC1);
dc->drawNumber(col2, line1, lswTimerValue(ls->v1), COLOR_THEME_SECONDARY1 | LEFT | PREC1);
dc->drawNumber(col3, line1, lswTimerValue(ls->v2), COLOR_THEME_SECONDARY1 | LEFT | PREC1);
} else {
drawSource(dc, col2, line1, ls->v1, COLOR_THEME_PRIMARY1);
drawSource(dc, col2, line1, ls->v1, COLOR_THEME_SECONDARY1);
drawSourceCustomValue(dc, col3, line1, ls->v1,
(ls->v1 <= MIXSRC_LAST_CH ? calc100toRESX(ls->v2) : ls->v2), COLOR_THEME_PRIMARY1);
(ls->v1 <= MIXSRC_LAST_CH ? calc100toRESX(ls->v2) : ls->v2), COLOR_THEME_SECONDARY1);
}
// AND switch
drawSwitch(dc, col1, (lsFamily == LS_FAMILY_EDGE) ? line3 : line2, ls->andsw, COLOR_THEME_PRIMARY1);
drawSwitch(dc, col1, line2, ls->andsw, COLOR_THEME_SECONDARY1);
// CSW duration
if (ls->duration > 0) {
dc->drawNumber(col2, (lsFamily == LS_FAMILY_EDGE) ? line3 : line2, ls->duration, COLOR_THEME_PRIMARY1 | PREC1 | LEFT);
dc->drawNumber(col2, line2, ls->duration, COLOR_THEME_SECONDARY1 | PREC1 | LEFT);
}
// CSW delay
if (lsFamily != LS_FAMILY_EDGE && ls->delay > 0) {
dc->drawNumber(col3, (lsFamily == LS_FAMILY_EDGE) ? line3 : line2, ls->delay, COLOR_THEME_PRIMARY1 | PREC1 | LEFT);
dc->drawNumber(col3, line2, ls->delay, COLOR_THEME_SECONDARY1 | PREC1 | LEFT);
}
}
@@ -385,6 +383,7 @@ void ModelLogicalSwitchesPage::build(FormWindow* window, int8_t focusIndex)
}
return 0;
});
grid.spacer(button->height() + 5);
} else {
auto txt = new StaticText(window, grid.getLabelSlot(),
+3 -3
View File
@@ -1664,14 +1664,14 @@ void ModelSetupPage::build(FormWindow * window)
// Pots and sliders warning
#if NUM_POTS + NUM_SLIDERS
{
new StaticText(window, grid.getLabelSlot(true), STR_POTWARNINGSTATE);
new StaticText(window, grid.getLabelSlot(true), STR_POTWARNINGSTATE, 0, COLOR_THEME_PRIMARY1);
new Choice(window, grid.getFieldSlot(), {"OFF", "ON", "AUTO"}, 0, 2,
GET_SET_DEFAULT(g_model.potsWarnMode));
grid.nextLine();
#if (NUM_POTS)
{
new StaticText(window, grid.getLabelSlot(true), STR_POTWARNING);
new StaticText(window, grid.getLabelSlot(true), STR_POTWARNING, 0, COLOR_THEME_PRIMARY1);
auto group =
new FormGroup(window, grid.getFieldSlot(),
FORM_BORDER_FOCUS_ONLY | PAINT_CHILDREN_FIRST);
@@ -1705,7 +1705,7 @@ void ModelSetupPage::build(FormWindow * window)
#if (NUM_SLIDERS)
{
new StaticText(window, grid.getLabelSlot(true), STR_SLIDERWARNING);
new StaticText(window, grid.getLabelSlot(true), STR_SLIDERWARNING, 0, COLOR_THEME_PRIMARY1);
auto group =
new FormGroup(window, grid.getFieldSlot(),
FORM_BORDER_FOCUS_ONLY | PAINT_CHILDREN_FIRST);
+22 -8
View File
@@ -24,9 +24,10 @@
#define SET_DIRTY() storageDirty(EE_MODEL)
static constexpr coord_t SENSOR_COL1 = 30;
static constexpr coord_t SENSOR_LABEL_WIDTH = 80;
static constexpr coord_t SENSOR_COL1 = 10;
static constexpr coord_t SENSOR_COL2 = SENSOR_COL1 + 70;
static constexpr coord_t SENSOR_COL3 = LCD_W - 50;
static constexpr coord_t SENSOR_COL3 = LCD_W - SENSOR_LABEL_WIDTH - 30; // 66 for label column 30 to move it to the right of the screen
class SensorSourceChoice : public SourceChoice
{
@@ -88,9 +89,7 @@ class SensorButton : public Button {
dc->drawSolidFilledRect(2, 2, rect.w - 4, rect.h - 4, COLOR_THEME_PRIMARY2);
if (telemetryItem.isFresh())
dc->drawFilledCircle(24, (2 + rect.h - 4)/2, 4, COLOR_THEME_SECONDARY1);
dc->drawNumber(2, 1, number, LEFT, 0, nullptr, ":");
dc->drawFilledCircle(SENSOR_COL2 - 10, (2 + rect.h - 4)/2, 4, COLOR_THEME_SECONDARY1);
dc->drawSizedText(SENSOR_COL1, line1, g_model.telemetrySensors[index].label, TELEM_LABEL_LEN);
@@ -443,17 +442,20 @@ void ModelTelemetryPage::build(FormWindow * window, int8_t focusSensorIndex)
// Sensors columns titles
uint8_t sensorsCount = getTelemetrySensorsCount();
if (sensorsCount > 0) {
new StaticText(window, {SENSOR_COL2, grid.getWindowHeight() + 3, SENSOR_COL3 - SENSOR_COL2, PAGE_LINE_HEIGHT}, STR_VALUE, 0, FONT(XS) | COLOR_THEME_DISABLED);
// put in the +14 and +17 to align the text correctly. Not sure why we need this
new StaticText(window, { SENSOR_LABEL_WIDTH + SENSOR_COL1, grid.getWindowHeight() + 3, SENSOR_COL2 - SENSOR_COL1, PAGE_LINE_HEIGHT}, STR_NAME, 0, FONT(XS) | COLOR_THEME_PRIMARY1);
new StaticText(window, { SENSOR_LABEL_WIDTH + SENSOR_COL2, grid.getWindowHeight() + 3, SENSOR_COL3 - SENSOR_COL2, PAGE_LINE_HEIGHT}, STR_VALUE, 0, FONT(XS) | COLOR_THEME_PRIMARY1);
if (!g_model.ignoreSensorIds && !IS_SPEKTRUM_PROTOCOL()) {
new StaticText(window, {SENSOR_COL3, grid.getWindowHeight() + 3, LCD_W - SENSOR_COL3, PAGE_LINE_HEIGHT}, STR_ID, 0, FONT(XS) | COLOR_THEME_DISABLED);
new StaticText(window, { SENSOR_LABEL_WIDTH + SENSOR_COL3, grid.getWindowHeight() + 3, LCD_W - SENSOR_COL3, PAGE_LINE_HEIGHT}, STR_ID, 0, FONT(XS) | COLOR_THEME_PRIMARY1);
}
}
grid.nextLine();
grid.setLabelWidth(PAGE_PADDING + PAGE_INDENT_WIDTH);
grid.setLabelWidth(SENSOR_LABEL_WIDTH);
for (uint8_t idx = 0, count = 0; idx < MAX_TELEMETRY_SENSORS; idx++) {
if (g_model.telemetrySensors[idx].isAvailable()) {
auto txt = new StaticText(window, grid.getLabelSlot(), std::to_string(idx), BUTTON_BACKGROUND, CENTERED | COLOR_THEME_PRIMARY1);
Button * button = new SensorButton(window, grid.getFieldSlot(), idx, ++count);
button->setPressHandler([=]() -> uint8_t {
button->bringToTop();
@@ -483,6 +485,18 @@ void ModelTelemetryPage::build(FormWindow * window, int8_t focusSensorIndex)
});
return 0;
});
button->setFocusHandler([=](bool focus) {
if (focus) {
txt->setBackgroundColor(COLOR_THEME_FOCUS);
txt->setTextFlags(COLOR_THEME_PRIMARY2 | CENTERED);
} else {
txt->setBackgroundColor(COLOR_THEME_SECONDARY2);
txt->setTextFlags(COLOR_THEME_PRIMARY1 | CENTERED);
}
txt->invalidate();
});
if (focusSensorIndex == idx) {
button->setFocus(SET_FOCUS_DEFAULT);
}
+12 -12
View File
@@ -56,10 +56,10 @@ class RadioAnalogsDiagsWindow: public Window {
coord_t y = 1 + i * FH;
uint8_t x = 10;
#endif
dc->drawNumber(x, y, i + 1, LEADING0 | LEFT, 2);
dc->drawText(x + 2 * 15 - 2, y, ":");
dc->drawNumber(x + 3 * 15 - 1, y, hall_raw_values[i], LEFT);
dc->drawNumber(x + ANA_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT);
dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2);
dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1);
dc->drawNumber(x + 3 * 15 - 1, y, hall_raw_values[i], LEFT | COLOR_THEME_PRIMARY1);
dc->drawNumber(x + ANA_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1);
}
for (uint8_t i = FLYSKY_HALL_CHANNEL_COUNT; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) {
@@ -70,10 +70,10 @@ class RadioAnalogsDiagsWindow: public Window {
coord_t y = 1 + i * FH;
uint8_t x = 10;
#endif
dc->drawNumber(x, y, i + 1, LEADING0 | LEFT, 2);
dc->drawText(x + 2 * 15 - 2, y, ":");
dc->drawNumber(x + 3 * 15 -1, y, anaIn(i), LEFT);
dc->drawNumber(x + ANA_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT);
dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2);
dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1);
dc->drawNumber(x + 3 * 15 -1, y, anaIn(i), LEFT | COLOR_THEME_PRIMARY1);
dc->drawNumber(x + ANA_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1);
}
#else
for (uint8_t i = 0; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) {
@@ -84,10 +84,10 @@ class RadioAnalogsDiagsWindow: public Window {
coord_t y = 1 + i * FH;
uint8_t x = 10;
#endif
dc->drawNumber(x, y, i + 1, LEADING0 | LEFT, 2);
dc->drawText(x + 2 * 15 - 2, y, ":");
dc->drawNumber(x + 3 * 15 -1, y, anaIn(i), LEFT);
dc->drawNumber(x + ANA_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT);
dc->drawNumber(x, y, i + 1, LEADING0 | LEFT | COLOR_THEME_PRIMARY1, 2);
dc->drawText(x + 2 * 15 - 2, y, ":", COLOR_THEME_PRIMARY1);
dc->drawNumber(x + 3 * 15 -1, y, anaIn(i), LEFT | COLOR_THEME_PRIMARY1);
dc->drawNumber(x + ANA_OFFSET, y, (int16_t) calibratedAnalogs[CONVERT_MODE(i)] * 25 / 256, RIGHT | COLOR_THEME_PRIMARY1);
}
#endif
+12 -12
View File
@@ -50,7 +50,7 @@ class RadioKeyDiagsWindow : public Window
status[0] = t + '0';
status[1] = '\0';
// TODO INVERS?
dc->drawText(x, y, status, 0);
dc->drawText(x, y, status, COLOR_THEME_PRIMARY1);
}
void paint(BitmapBuffer * dc) override
@@ -66,30 +66,30 @@ class RadioKeyDiagsWindow : public Window
constexpr coord_t TRIM_MINUS_COLUMN = TRIM_COLUMN + 60;
constexpr coord_t TRIM_PLUS_COLUMN = TRIM_MINUS_COLUMN + 20;
dc->drawText(TRIM_COLUMN, 1, "Trims");
dc->drawText(TRIM_MINUS_COLUMN, 1, "-");
dc->drawText(TRIM_PLUS_COLUMN, 1, "+");
dc->drawText(TRIM_COLUMN, 1, "Trims", COLOR_THEME_PRIMARY1);
dc->drawText(TRIM_MINUS_COLUMN, 1, "-", COLOR_THEME_PRIMARY1);
dc->drawText(TRIM_PLUS_COLUMN, 1, "+", COLOR_THEME_PRIMARY1);
#if !defined(PCBNV14)
// KEYS
for (uint8_t i = KEY_START; i <= 6; i++) {
coord_t y = 1 + FH * (i - KEY_START);
dc->drawTextAtIndex(KEY_COLUMN, y, STR_VKEYS, i, 0);
dc->drawTextAtIndex(KEY_COLUMN, y, STR_VKEYS, i, COLOR_THEME_PRIMARY1);
displayKeyState(dc, 70, y, i);
}
#if defined(ROTARY_ENCODER_NAVIGATION)
coord_t y = FH * (8 - KEY_START);
dc->drawText(KEY_COLUMN, y, STR_ROTARY_ENCODER);
dc->drawNumber(70, y, rotencValue, 0);
dc->drawText(KEY_COLUMN, y, STR_ROTARY_ENCODER, COLOR_THEME_PRIMARY1);
dc->drawNumber(70, y, rotencValue, COLOR_THEME_PRIMARY1);
#endif
#else // defined(PCBNV14)
// KEYS
{
coord_t y = 1;
dc->drawTextAtIndex(KEY_COLUMN, y, STR_VKEYS, KEY_ENTER, 0);
dc->drawTextAtIndex(KEY_COLUMN, y, STR_VKEYS, KEY_ENTER, COLOR_THEME_PRIMARY1);
displayKeyState(dc, 70, y, KEY_ENTER);
y += FH;
dc->drawTextAtIndex(KEY_COLUMN, y, STR_VKEYS, KEY_EXIT, 0);
dc->drawTextAtIndex(KEY_COLUMN, y, STR_VKEYS, KEY_EXIT, COLOR_THEME_PRIMARY1);
displayKeyState(dc, 70, y, KEY_EXIT);
}
#endif
@@ -99,7 +99,7 @@ class RadioKeyDiagsWindow : public Window
coord_t y = 1 + FH * i;
getvalue_t val = getValue(MIXSRC_FIRST_SWITCH + i);
getvalue_t sw = ((val < 0) ? 3 * i + 1 : ((val == 0) ? 3 * i + 2 : 3 * i + 3));
drawSwitch(dc, SWITCHES_COLUMN, y, sw, 0);
drawSwitch(dc, SWITCHES_COLUMN, y, sw, COLOR_THEME_PRIMARY1);
}
}
@@ -112,8 +112,8 @@ class RadioKeyDiagsWindow : public Window
#endif
coord_t y = 1 + FH + FH * (i / 2);
if (i & 1) {
dc->drawText(TRIM_COLUMN, y, "T", 0);
dc->drawNumber(TRIM_COLUMN + 10, y, i / 2 + 1, 0);
dc->drawText(TRIM_COLUMN, y, "T", COLOR_THEME_PRIMARY1);
dc->drawNumber(TRIM_COLUMN + 10, y, i / 2 + 1, COLOR_THEME_PRIMARY1);
}
displayKeyState(dc, i & 1 ? TRIM_PLUS_COLUMN : TRIM_MINUS_COLUMN, y, TRM_BASE + trimMap[i]);
}
+4 -6
View File
@@ -158,7 +158,6 @@ class FilePreview : public Window
{
coord_t y = parent->getScrollPositionY() + 2;
coord_t h = MENU_BODY_HEIGHT - 4;
lcd->drawSolidFilledRect(0, y, width(), h, COLOR_THEME_DISABLED);
if (bitmap) {
coord_t bitmapHeight = min<coord_t>(h, bitmap->height());
coord_t bitmapWidth = min<coord_t>(width(), bitmap->width());
@@ -272,14 +271,14 @@ void RadioSdManagerPage::build(FormWindow * window)
files.sort(compare_nocase);
for (auto name: directories) {
auto b = new SDmanagerButton(window, grid.getLabelSlot(), name, [=]() -> uint8_t {
new SDmanagerButton(window, grid.getLabelSlot(), name, [=]() -> uint8_t {
std::string fullpath = currentPath + "/" + name;
f_chdir((TCHAR*)fullpath.c_str());
window->clear();
build(window);
return 0;
}, OPAQUE);
b->setBgColorHandler([=]() -> LcdFlags { return COLOR_THEME_PRIMARY2; });
});
grid.nextLine();
}
@@ -418,8 +417,7 @@ void RadioSdManagerPage::build(FormWindow * window)
});
}
return 0;
}, OPAQUE);
button->setBgColorHandler([=]() -> LcdFlags { return COLOR_THEME_PRIMARY2; });
}, BUTTON_BACKGROUND, COLOR_THEME_PRIMARY1);
button->setFocusHandler([=](bool active) {
if (active) {
preview->setFile(getFullPath(name));
+3 -1
View File
@@ -130,7 +130,9 @@ void RadioToolsPage::rebuild(FormWindow * window)
return 0;
},
OPAQUE);
b->setBgColorHandler([=]() -> LcdFlags { return COLOR_THEME_PRIMARY2; });
b->setBgColorHandler([=]() {
return COLOR_THEME_PRIMARY2;
});
b->setFocusHandler([=](bool focus) {
if (focus) {
txt->setBackgroundColor(COLOR_THEME_FOCUS);
+2 -2
View File
@@ -96,9 +96,9 @@ void RadioTrainerPage::build(FormWindow * window)
for (int i = 0; i < NUM_STICKS; i++) {
#if defined (PPM_UNIT_PERCENT_PREC1)
auto calib = new StaticNumber(window, grid.getFieldSlot(4, i), [=]() { return (ppmInput[i]-g_eeGeneral.trainer.calib[i]) * 2; }, 0, LEFT | PREC1);
auto calib = new StaticNumber(window, grid.getFieldSlot(4, i), [=]() { return (ppmInput[i]-g_eeGeneral.trainer.calib[i]) * 2; }, 0, LEFT | PREC1 | COLOR_THEME_PRIMARY1);
#else
auto calib = new StaticNumber(window, grid.getFieldSlot(4, i), [=]() { return (ppmInput[i]-g_eeGeneral.trainer.calib[i]) / 5; }, 0, LEFT);
auto calib = new StaticNumber(window, grid.getFieldSlot(4, i), [=]() { return (ppmInput[i]-g_eeGeneral.trainer.calib[i]) / 5; }, 0, LEFT | COLOR_THEME_PRIMARY1);
#endif
calib->setWindowFlags(REFRESH_ALWAYS);
+4 -4
View File
@@ -265,14 +265,14 @@ void ScreenUserInterfacePage::build(FormWindow * window)
FormGridLayout grid;
// Theme choice
new StaticText(window, grid.getLabelSlot(), STR_THEME, 0, 0);
new StaticText(window, grid.getLabelSlot(), STR_THEME, 0, COLOR_THEME_PRIMARY1);
// TODO: Theme picklist
grid.nextLine();
// Theme options ?
// Top Bar
new StaticText(window, grid.getLabelSlot(), STR_TOP_BAR, 0, 0);
new StaticText(window, grid.getLabelSlot(), STR_TOP_BAR, 0, COLOR_THEME_PRIMARY1);
auto menu = this->menu;
auto setupTopbarWidgets = new TextButton(window, grid.getFieldSlot(), STR_SETUP_WIDGETS);
@@ -380,7 +380,7 @@ static void updateLayoutOptions(FormGroup* optionsWindow, unsigned customScreenI
ZoneOptionValue * value = &layoutData->options[index].value;
// Option label
new StaticText(optionsWindow, grid.getLabelSlot(false), option->name);
new StaticText(optionsWindow, grid.getLabelSlot(false), option->name, 0, COLOR_THEME_PRIMARY1);
// Option value
switch (option->type) {
@@ -407,7 +407,7 @@ void ScreenSetupPage::build(FormWindow * window)
grid.spacer(PAGE_PADDING);
// Layout choice...
new StaticText(window, grid.getLabelSlot(false), STR_LAYOUT);
new StaticText(window, grid.getLabelSlot(false), STR_LAYOUT, 0, COLOR_THEME_PRIMARY1);
auto layoutSlot = grid.getFieldSlot();
layoutSlot.h = 2 * PAGE_LINE_HEIGHT - 1;
+4 -3
View File
@@ -42,18 +42,19 @@ void SelectFabButton::paint(BitmapBuffer* dc)
auto pos = title.find('\n');
auto y_pos = FAB_BUTTON_SIZE;
dc->drawSizedText(width() / 2, y_pos,
title.c_str(), pos,
COLOR_THEME_PRIMARY2 | CENTERED | VCENTERED);
COLOR2FLAGS(WHITE) | CENTERED | VCENTERED);
if (pos != std::string::npos) {
y_pos += PAGE_LINE_HEIGHT;
dc->drawSizedText(width() / 2, y_pos, title.substr(pos+1).c_str(),
255, COLOR_THEME_PRIMARY2 | CENTERED | VCENTERED);
255, COLOR2FLAGS(WHITE) | CENTERED | VCENTERED);
}
if (hasFocus()) {
dc->drawSolidRect(0, 0, width(), height(), 2, COLOR_THEME_FOCUS);
dc->drawSolidRect(0, 0, width(), height(), 2, COLOR2FLAGS(WHITE));
}
}
+24 -24
View File
@@ -462,18 +462,18 @@ class SpecialFunctionButton : public Button
}
uint8_t func = CFN_FUNC(cfn);
drawSwitch(dc, col1, line1, CFN_SWITCH(cfn), COLOR_THEME_PRIMARY1);
drawSwitch(dc, col1, line1, CFN_SWITCH(cfn), COLOR_THEME_SECONDARY1);
if (cfn->isEmpty()) return;
dc->drawTextAtIndex(col2, line1, STR_VFSWFUNC, func, COLOR_THEME_PRIMARY1);
dc->drawTextAtIndex(col2, line1, STR_VFSWFUNC, func, COLOR_THEME_SECONDARY1);
int16_t val_min = 0;
int16_t val_max = 255;
switch (func) {
case FUNC_OVERRIDE_CHANNEL:
drawChn(dc, col1, line2, CFN_CH_INDEX(cfn) + 1, COLOR_THEME_PRIMARY1);
drawChn(dc, col1, line2, CFN_CH_INDEX(cfn) + 1, COLOR_THEME_SECONDARY1);
getMixSrcRange(MIXSRC_FIRST_CH, val_min, val_max);
dc->drawNumber(col2, line2, CFN_PARAM(cfn), COLOR_THEME_PRIMARY1);
dc->drawNumber(col2, line2, CFN_PARAM(cfn), COLOR_THEME_SECONDARY1);
break;
case FUNC_TRAINER: {
@@ -485,77 +485,77 @@ class SpecialFunctionButton : public Button
text = std::string(STR_CHANS);
else
text = TEXT_AT_INDEX(STR_VSRCRAW, value);
dc->drawText(col1, line2, text.c_str(), COLOR_THEME_PRIMARY1);
dc->drawText(col1, line2, text.c_str(), COLOR_THEME_SECONDARY1);
break;
}
case FUNC_RESET:
if (CFN_PARAM(cfn) < FUNC_RESET_PARAM_FIRST_TELEM) {
dc->drawTextAtIndex(col1, line2, STR_VFSWRESET, CFN_PARAM(cfn), COLOR_THEME_PRIMARY1);
dc->drawTextAtIndex(col1, line2, STR_VFSWRESET, CFN_PARAM(cfn), COLOR_THEME_SECONDARY1);
} else {
TelemetrySensor *sensor =
&g_model.telemetrySensors[CFN_PARAM(cfn) -
FUNC_RESET_PARAM_FIRST_TELEM];
dc->drawSizedText(col1, line2, sensor->label, TELEM_LABEL_LEN, COLOR_THEME_PRIMARY1);
dc->drawSizedText(col1, line2, sensor->label, TELEM_LABEL_LEN, COLOR_THEME_SECONDARY1);
}
break;
case FUNC_VOLUME:
drawSource(dc, col1, line2, CFN_PARAM(cfn), COLOR_THEME_PRIMARY1);
drawSource(dc, col1, line2, CFN_PARAM(cfn), COLOR_THEME_SECONDARY1);
break;
case FUNC_BACKLIGHT:
drawSource(dc, col1, line2, CFN_PARAM(cfn), COLOR_THEME_PRIMARY1);
drawSource(dc, col1, line2, CFN_PARAM(cfn), COLOR_THEME_SECONDARY1);
break;
case FUNC_PLAY_SOUND:
dc->drawTextAtIndex(col1, line2, STR_FUNCSOUNDS, CFN_PARAM(cfn), COLOR_THEME_PRIMARY1);
dc->drawTextAtIndex(col1, line2, STR_FUNCSOUNDS, CFN_PARAM(cfn), COLOR_THEME_SECONDARY1);
break;
case FUNC_PLAY_TRACK:
case FUNC_BACKGND_MUSIC:
case FUNC_PLAY_SCRIPT:
if (ZEXIST(cfn->play.name))
dc->drawSizedText(col1, line2, cfn->play.name, sizeof(cfn->play.name), COLOR_THEME_PRIMARY1);
dc->drawSizedText(col1, line2, cfn->play.name, sizeof(cfn->play.name), COLOR_THEME_SECONDARY1);
else
dc->drawTextAtIndex(col1, line2, STR_VCSWFUNC, 0, COLOR_THEME_PRIMARY1);
dc->drawTextAtIndex(col1, line2, STR_VCSWFUNC, 0, COLOR_THEME_SECONDARY1);
break;
case FUNC_SET_TIMER:
drawStringWithIndex(dc, col1, line2, STR_TIMER, CFN_TIMER_INDEX(cfn) + 1, COLOR_THEME_PRIMARY1);
drawStringWithIndex(dc, col1, line2, STR_TIMER, CFN_TIMER_INDEX(cfn) + 1, COLOR_THEME_SECONDARY1);
break;
case FUNC_SET_FAILSAFE:
dc->drawTextAtIndex(col1, line2, "\004Int.Ext.", CFN_PARAM(cfn), COLOR_THEME_PRIMARY1);
dc->drawTextAtIndex(col1, line2, "\004Int.Ext.", CFN_PARAM(cfn), COLOR_THEME_SECONDARY1);
break;
case FUNC_PLAY_VALUE:
drawSource(dc, col1, line2, CFN_PARAM(cfn), COLOR_THEME_PRIMARY1);
drawSource(dc, col1, line2, CFN_PARAM(cfn), COLOR_THEME_SECONDARY1);
break;
case FUNC_HAPTIC:
dc->drawNumber(col1, line2, CFN_PARAM(cfn), COLOR_THEME_PRIMARY1);
dc->drawNumber(col1, line2, CFN_PARAM(cfn), COLOR_THEME_SECONDARY1);
break;
case FUNC_LOGS:
dc->drawNumber(col3, line1, CFN_PARAM(cfn), COLOR_THEME_PRIMARY1 | PREC1, sizeof(CFN_PARAM(cfn)), nullptr, "s");
dc->drawNumber(col3, line1, CFN_PARAM(cfn), COLOR_THEME_SECONDARY1 | PREC1, sizeof(CFN_PARAM(cfn)), nullptr, "s");
break;
case FUNC_ADJUST_GVAR:
switch(CFN_GVAR_MODE(cfn)) {
case FUNC_ADJUST_GVAR_CONSTANT:
dc->drawNumber(col1, line2, CFN_PARAM(cfn), COLOR_THEME_PRIMARY1);
dc->drawNumber(col1, line2, CFN_PARAM(cfn), COLOR_THEME_SECONDARY1);
break;
case FUNC_ADJUST_GVAR_SOURCE:
drawSource(dc, col1, line2, CFN_PARAM(cfn), COLOR_THEME_PRIMARY1);
drawSource(dc, col1, line2, CFN_PARAM(cfn), COLOR_THEME_SECONDARY1);
break;
case FUNC_ADJUST_GVAR_GVAR:
drawSource(dc, col1, line2, CFN_PARAM(cfn) + MIXSRC_FIRST_GVAR, COLOR_THEME_PRIMARY1);
drawSource(dc, col1, line2, CFN_PARAM(cfn) + MIXSRC_FIRST_GVAR, COLOR_THEME_SECONDARY1);
break;
case FUNC_ADJUST_GVAR_INCDEC: {
int16_t value = CFN_PARAM(cfn);
std::string text(value >= 0 ? "+= " : "-= ");
text += std::to_string(abs(value));
dc->drawText(col1, line2, text.c_str(), COLOR_THEME_PRIMARY1);
dc->drawText(col1, line2, text.c_str(), COLOR_THEME_SECONDARY1);
break;
}
}
@@ -564,11 +564,11 @@ class SpecialFunctionButton : public Button
theme->drawCheckBox(dc, CFN_ACTIVE(cfn), col3, line2);
} else if (HAS_REPEAT_PARAM(func)) {
if (CFN_PLAY_REPEAT(cfn) == 0) {
dc->drawText(col3, line2, "1x", COLOR_THEME_PRIMARY1);
dc->drawText(col3, line2, "1x", COLOR_THEME_SECONDARY1);
} else if (CFN_PLAY_REPEAT(cfn) == CFN_PLAY_REPEAT_NOSTART) {
dc->drawText(col3, line2, "!1x", COLOR_THEME_PRIMARY1);
dc->drawText(col3, line2, "!1x", COLOR_THEME_SECONDARY1);
} else {
dc->drawNumber(col3 + 12, line2, CFN_PLAY_REPEAT(cfn) * CFN_PLAY_REPEAT_MUL, COLOR_THEME_PRIMARY1 | RIGHT, 0, nullptr, "s");
dc->drawNumber(col3 + 12, line2, CFN_PLAY_REPEAT(cfn) * CFN_PLAY_REPEAT_MUL, COLOR_THEME_SECONDARY1 | RIGHT, 0, nullptr, "s");
}
}
}
+1 -1
View File
@@ -129,7 +129,7 @@ void ViewMainMenu::paint(BitmapBuffer* dc)
rect_t zone = carouselRect;
zone.x -= 8; zone.y -= 8;
zone.w += 16; zone.h += 16;
dc->drawFilledRect(zone.x, zone.y, zone.w, zone.h, SOLID, COLOR_THEME_PRIMARY1, OPACITY(5));
dc->drawFilledRect(zone.x, zone.y, zone.w, zone.h, SOLID, BLACK, OPACITY(4));
}
void ViewMainMenu::deleteLater(bool detach, bool trash)
+2 -2
View File
@@ -38,7 +38,7 @@ WidgetSettings::WidgetSettings(Window * parent, Widget * widget) :
setCloseWhenClickOutside(true);
auto form = &content->form;
FormGridLayout grid(content->form.width());
FormGridLayout grid(content->form.width(), 10);
grid.setLabelWidth(width() / 3);
form->clear();
@@ -47,7 +47,7 @@ WidgetSettings::WidgetSettings(Window * parent, Widget * widget) :
while (optPtr && optPtr->name != nullptr) {
auto option = *optPtr;
new StaticText(form, grid.getLabelSlot(), option.name);
new StaticText(form, grid.getLabelSlot(), option.name, 0, COLOR_THEME_PRIMARY1);
switch (option.type) {
+4 -4
View File
@@ -1005,7 +1005,7 @@
#define TR_ENABLE "Enable"
#define TR_TOPLCDTIMER "Top LCD Timer"
#define TR_UNIT "Unit"
#define TR_TELEMETRY_NEWSENSOR INDENT "Add a new sensor..."
#define TR_TELEMETRY_NEWSENSOR INDENT "Add new"
#define TR_CHANNELRANGE TR(INDENT "Ch. Range", INDENT "Channel Range")
#define TR_RXFREQUENCY TR("Rx Freqency", "Rx Servo Frequency")
#define TR_ANTENNACONFIRM1 "EXT. ANTENNA"
@@ -1179,9 +1179,9 @@
#define TR_SERVOS_KO "Servos KO"
#define TR_INVERTED_SERIAL INDENT "Invert"
#define TR_IGNORE_INSTANCE TR(INDENT "No inst.", INDENT "Ignore instances")
#define TR_DISCOVER_SENSORS "Discover new sensors"
#define TR_STOP_DISCOVER_SENSORS "Stop discovery"
#define TR_DELETE_ALL_SENSORS "Delete all sensors"
#define TR_DISCOVER_SENSORS "Discover new"
#define TR_STOP_DISCOVER_SENSORS "Stop"
#define TR_DELETE_ALL_SENSORS "Delete all"
#define TR_CONFIRMDELETE "Really " LCDW_128_480_LINEBREAK "delete all ?"
#define TR_SELECT_WIDGET "Select widget"
#define TR_REMOVE_WIDGET "Remove widget"
+1 -1
View File
@@ -1193,7 +1193,7 @@
#define TR_IGNORE_INSTANCE INDENT "Ignore instance"
#define TR_DISCOVER_SENSORS "Discover new sensors"
#define TR_STOP_DISCOVER_SENSORS "Stop discovery"
#define TR_DELETE_ALL_SENSORS "Delete all sensors"
#define TR_DELETE_ALL_SENSORS "Delete all"
#define TR_CONFIRMDELETE "Really " LCDW_128_480_LINEBREAK "delete all ?"
#define TR_SELECT_WIDGET "Select widget"
#define TR_REMOVE_WIDGET "Remove widget"
+3 -3
View File
@@ -1016,7 +1016,7 @@
#define TR_ENABLE "Enable"
#define TR_TOPLCDTIMER "Top LCD Timer"
#define TR_UNIT "Unit"
#define TR_TELEMETRY_NEWSENSOR INDENT "Add a new sensor..."
#define TR_TELEMETRY_NEWSENSOR INDENT "Add new"
#define TR_CHANNELRANGE INDENT "Channel Range"
#define TR_RXFREQUENCY TR("Rx Freqency", "Rx Servo Frequency")
#define TR_AFHDS3_RX_FREQ TR("RX freq.", "RX frequency")
@@ -1195,9 +1195,9 @@
#define TR_SERVOS_KO "Servos KO"
#define TR_INVERTED_SERIAL INDENT "Invert"
#define TR_IGNORE_INSTANCE INDENT "Ignore instance"
#define TR_DISCOVER_SENSORS "Discover new sensors"
#define TR_DISCOVER_SENSORS "Discover new"
#define TR_STOP_DISCOVER_SENSORS "Stop discovery"
#define TR_DELETE_ALL_SENSORS "Delete all sensors"
#define TR_DELETE_ALL_SENSORS "Delete all"
#define TR_CONFIRMDELETE "Really " LCDW_128_480_LINEBREAK "delete all ?"
#define TR_SELECT_WIDGET "Select widget"
#define TR_REMOVE_WIDGET "Remove widget"