Merge pull request #584 from eshifri/fix_579_581

Fix 579 581
This commit is contained in:
Raphael Coeffic
2021-08-14 08:30:31 +02:00
committed by GitHub
3 changed files with 14 additions and 1 deletions
+9
View File
@@ -57,6 +57,15 @@ SetupTopBarWidgetsPage::SetupTopBarWidgetsPage(ScreenMenu* menu):
auto widget = new SetupWidgetsPageSlot(this, rect, topbar, i);
if (i == 0) widget->setFocus();
}
#if defined(HARDWARE_TOUCH)
new Button(
this, {0, 0, MENU_HEADER_BUTTON_WIDTH, MENU_HEADER_BUTTON_WIDTH},
[this]() -> uint8_t {
this->deleteLater();
return 1;
},
NO_FOCUS | FORM_NO_BORDER);
#endif
}
void SetupTopBarWidgetsPage::deleteLater(bool detach, bool trash)
@@ -29,7 +29,11 @@
#define WIDGET_NAME_LEN 10
#define MAX_WIDGET_OPTIONS 5 // Name?
#if LCD_W > LCD_H
#define MAX_TOPBAR_ZONES 4
#else
#define MAX_TOPBAR_ZONES 2
#endif
#define MAX_TOPBAR_OPTIONS 1 // just because of VC++ which doesn't like 0-size arrays :(
// Common 'ZoneOptionValue's among all layouts
+1 -1
View File
@@ -67,7 +67,7 @@ const etx_hal_adc_driver_t* etx_hal_adc_driver = nullptr;
const uint8_t adcMapping[NUM_ANALOGS] = { 0 /*STICK1*/, 1 /*STICK2*/, 2 /*STICK3*/, 3 /*STICK4*/,
4 /*POT1*/, 5 /*POT2*/, 6 /*SWA*/, 14 /*SWB*/,
7 /*SWC*/, 15 /*SWD*/, 8 /*SWE*/, 9 /*SWF*/,
10/*SWG*/, 11/*SWH*/,
11/*SWG*/, 10/*SWH*/,
12 /*TX_VOLTAGE*/, 13 /* TX_VBAT */ };
const int8_t adcDirection[NUM_ANALOGS] = { 0 /*STICK1*/, 0 /*STICK2*/, 0 /*STICK3*/, 0 /*STICK4*/,