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;
|
extern uint8_t menuCalibrationState;
|
||||||
|
|
||||||
// Temporary no highlight
|
// 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);
|
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 CheckBox(window, grid.getFieldSlot(2, 0), GET_SET_DEFAULT(g_model.extendedTrims));
|
||||||
new TextButton(window, grid.getFieldSlot(2, 1), STR_RESET_BTN,
|
new TextButton(window, grid.getFieldSlot(2, 1), STR_RESET_BTN,
|
||||||
[]() -> uint8_t {
|
[]() -> uint8_t {
|
||||||
START_NO_HIGHLIGHT();
|
|
||||||
for (auto &flightModeData : g_model.flightModeData) {
|
for (auto &flightModeData : g_model.flightModeData) {
|
||||||
memclear(&flightModeData, TRIMS_ARRAY_SIZE);
|
memclear(&flightModeData, TRIMS_ARRAY_SIZE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,13 +33,9 @@ void drawSplash()
|
|||||||
static BitmapBuffer * splashImg = nullptr;
|
static BitmapBuffer * splashImg = nullptr;
|
||||||
|
|
||||||
if (loadImgFromSD && splashImg == nullptr) {
|
if (loadImgFromSD && splashImg == nullptr) {
|
||||||
bool sd_mounted = sdMounted();
|
if (!sdMounted()) sdInit();
|
||||||
if (!sd_mounted)
|
|
||||||
sdInit();
|
|
||||||
splashImg = BitmapBuffer::loadBitmap(BITMAPS_PATH "/" SPLASH_FILE);
|
splashImg = BitmapBuffer::loadBitmap(BITMAPS_PATH "/" SPLASH_FILE);
|
||||||
loadImgFromSD = false;
|
loadImgFromSD = false;
|
||||||
if (!sd_mounted)
|
|
||||||
sdDone();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lcd->clear();
|
lcd->clear();
|
||||||
|
|||||||
@@ -126,9 +126,7 @@ void per10ms()
|
|||||||
#if defined(GUI)
|
#if defined(GUI)
|
||||||
if (lightOffCounter) lightOffCounter--;
|
if (lightOffCounter) lightOffCounter--;
|
||||||
if (flashCounter) flashCounter--;
|
if (flashCounter) flashCounter--;
|
||||||
#if defined(LIBOPENUI)
|
#if !defined(LIBOPENUI)
|
||||||
#warning "TODO remove noHighlightCounter on LIBOPENUI"
|
|
||||||
#else
|
|
||||||
if (noHighlightCounter) noHighlightCounter--;
|
if (noHighlightCounter) noHighlightCounter--;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -1797,7 +1795,9 @@ void opentxInit()
|
|||||||
#if defined(SDCARD)
|
#if defined(SDCARD)
|
||||||
// SDCARD related stuff, only done if not unexpectedShutdown
|
// SDCARD related stuff, only done if not unexpectedShutdown
|
||||||
if (!globalData.unexpectedShutdown) {
|
if (!globalData.unexpectedShutdown) {
|
||||||
sdInit();
|
|
||||||
|
if (!sdMounted())
|
||||||
|
sdInit();
|
||||||
|
|
||||||
#if defined(AUTOUPDATE)
|
#if defined(AUTOUPDATE)
|
||||||
sportStopSendByteLoop();
|
sportStopSendByteLoop();
|
||||||
|
|||||||
@@ -366,13 +366,13 @@ void lcdInit()
|
|||||||
LTDC_Cmd(ENABLE);
|
LTDC_Cmd(ENABLE);
|
||||||
|
|
||||||
/* Set Background layer */
|
/* Set Background layer */
|
||||||
|
memset(LCD_FIRST_FRAME_BUFFER, 0, sizeof(LCD_FIRST_FRAME_BUFFER));
|
||||||
LCD_SetLayer(LCD_FIRST_LAYER);
|
LCD_SetLayer(LCD_FIRST_LAYER);
|
||||||
// lcdClear();
|
|
||||||
LCD_SetTransparency(0);
|
LCD_SetTransparency(0);
|
||||||
|
|
||||||
/* Set Foreground layer */
|
/* Set Foreground layer */
|
||||||
|
memset(LCD_SECOND_FRAME_BUFFER, 0, sizeof(LCD_SECOND_FRAME_BUFFER));
|
||||||
LCD_SetLayer(LCD_SECOND_LAYER);
|
LCD_SetLayer(LCD_SECOND_LAYER);
|
||||||
lcd->clear();
|
|
||||||
LCD_SetTransparency(255);
|
LCD_SetTransparency(255);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
Submodule radio/src/thirdparty/libopenui updated: a7c793cc72...1bc7de6c42
Reference in New Issue
Block a user