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();
|
||||
|
||||
Reference in New Issue
Block a user