Small fixes
- no double SD card init - removed "noHighlightCounter" warning - wipe the screen buffers before setting up the layer (removes shadow image on boot)
This commit is contained in:
@@ -31,9 +31,6 @@ extern int menuVerticalOffset;
|
||||
extern uint8_t menuCalibrationState;
|
||||
|
||||
// Temporary no highlight
|
||||
extern uint8_t noHighlightCounter;
|
||||
#define NO_HIGHLIGHT() (noHighlightCounter > 0)
|
||||
#define START_NO_HIGHLIGHT() do { noHighlightCounter = 25; } while(0)
|
||||
|
||||
typedef bool (*MenuHandlerFunc)(event_t event);
|
||||
|
||||
|
||||
@@ -1085,7 +1085,6 @@ void ModelSetupPage::build(FormWindow * window)
|
||||
new CheckBox(window, grid.getFieldSlot(2, 0), GET_SET_DEFAULT(g_model.extendedTrims));
|
||||
new TextButton(window, grid.getFieldSlot(2, 1), STR_RESET_BTN,
|
||||
[]() -> uint8_t {
|
||||
START_NO_HIGHLIGHT();
|
||||
for (auto &flightModeData : g_model.flightModeData) {
|
||||
memclear(&flightModeData, TRIMS_ARRAY_SIZE);
|
||||
}
|
||||
|
||||
@@ -33,13 +33,9 @@ void drawSplash()
|
||||
static BitmapBuffer * splashImg = nullptr;
|
||||
|
||||
if (loadImgFromSD && splashImg == nullptr) {
|
||||
bool sd_mounted = sdMounted();
|
||||
if (!sd_mounted)
|
||||
sdInit();
|
||||
if (!sdMounted()) sdInit();
|
||||
splashImg = BitmapBuffer::loadBitmap(BITMAPS_PATH "/" SPLASH_FILE);
|
||||
loadImgFromSD = false;
|
||||
if (!sd_mounted)
|
||||
sdDone();
|
||||
}
|
||||
|
||||
lcd->clear();
|
||||
|
||||
@@ -126,9 +126,7 @@ void per10ms()
|
||||
#if defined(GUI)
|
||||
if (lightOffCounter) lightOffCounter--;
|
||||
if (flashCounter) flashCounter--;
|
||||
#if defined(LIBOPENUI)
|
||||
#warning "TODO remove noHighlightCounter on LIBOPENUI"
|
||||
#else
|
||||
#if !defined(LIBOPENUI)
|
||||
if (noHighlightCounter) noHighlightCounter--;
|
||||
#endif
|
||||
#endif
|
||||
@@ -1797,7 +1795,9 @@ void opentxInit()
|
||||
#if defined(SDCARD)
|
||||
// SDCARD related stuff, only done if not unexpectedShutdown
|
||||
if (!globalData.unexpectedShutdown) {
|
||||
sdInit();
|
||||
|
||||
if (!sdMounted())
|
||||
sdInit();
|
||||
|
||||
#if defined(AUTOUPDATE)
|
||||
sportStopSendByteLoop();
|
||||
|
||||
@@ -366,13 +366,13 @@ void lcdInit()
|
||||
LTDC_Cmd(ENABLE);
|
||||
|
||||
/* Set Background layer */
|
||||
memset(LCD_FIRST_FRAME_BUFFER, 0, sizeof(LCD_FIRST_FRAME_BUFFER));
|
||||
LCD_SetLayer(LCD_FIRST_LAYER);
|
||||
// lcdClear();
|
||||
LCD_SetTransparency(0);
|
||||
|
||||
/* Set Foreground layer */
|
||||
memset(LCD_SECOND_FRAME_BUFFER, 0, sizeof(LCD_SECOND_FRAME_BUFFER));
|
||||
LCD_SetLayer(LCD_SECOND_LAYER);
|
||||
lcd->clear();
|
||||
LCD_SetTransparency(255);
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
Submodule radio/src/thirdparty/libopenui updated: a7c793cc72...1bc7de6c42
Reference in New Issue
Block a user