chore(color): cleanup UI code (#6989)
This commit is contained in:
@@ -19,12 +19,16 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "edgetx.h"
|
||||
#include "battery_driver.h"
|
||||
|
||||
#include "boards/generic_stm32/rgb_leds.h"
|
||||
#undef UNUSED
|
||||
#include "bsp_io.h"
|
||||
#include "edgetx.h"
|
||||
#include "mainwindow.h"
|
||||
#include "static.h"
|
||||
#include "stm32_ws2812.h"
|
||||
#include "LvglWrapper.h"
|
||||
|
||||
#define __BATTERY_DRIVER_C__
|
||||
|
||||
@@ -267,6 +271,8 @@ void drawChargingInfo(uint16_t chargeState) {
|
||||
}
|
||||
|
||||
if (chargeWindow == nullptr) {
|
||||
// Ensure lvgl is initialised before creating windows
|
||||
LvglWrapper::instance();
|
||||
chargeWindow = new Window(MainWindow::instance(), {0, 0, LCD_W, LCD_H});
|
||||
etx_solid_bg(chargeWindow->getLvObj(), COLOR_THEME_PRIMARY1_INDEX);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user