chore: resolve compiler warnings and cleanup code (#6952)
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "boards/generic_stm32/rgb_leds.h"
|
||||
#include "board.h"
|
||||
#if defined(LED_STRIP_GPIO)
|
||||
#undef UNUSED
|
||||
#include "stm32_ws2812.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -65,27 +65,27 @@ set(LVGL_SOURCES
|
||||
|
||||
draw/lv_draw_mask.c
|
||||
draw/sw/lv_draw_sw_gradient.c
|
||||
draw/sw/lv_draw_sw_dither.c
|
||||
# draw/sw/lv_draw_sw_dither.c
|
||||
draw/lv_draw_layer.c
|
||||
draw/lv_draw_arc.c
|
||||
draw/lv_draw_triangle.c
|
||||
|
||||
# SDL specific
|
||||
draw/sdl/lv_draw_sdl_rect.c
|
||||
draw/sdl/lv_draw_sdl_arc.c
|
||||
draw/sdl/lv_draw_sdl.c
|
||||
draw/sdl/lv_draw_sdl_mask.c
|
||||
draw/sdl/lv_draw_sdl_polygon.c
|
||||
draw/sdl/lv_draw_sdl_stack_blur.c
|
||||
draw/sdl/lv_draw_sdl_utils.c
|
||||
draw/sdl/lv_draw_sdl_img.c
|
||||
draw/sdl/lv_draw_sdl_bg.c
|
||||
draw/sdl/lv_draw_sdl_label.c
|
||||
draw/sdl/lv_draw_sdl_texture_cache.c
|
||||
draw/sdl/lv_draw_sdl_line.c
|
||||
draw/sdl/lv_draw_sdl_composite.c
|
||||
# draw/sdl/lv_draw_sdl_rect.c
|
||||
# draw/sdl/lv_draw_sdl_arc.c
|
||||
# draw/sdl/lv_draw_sdl.c
|
||||
# draw/sdl/lv_draw_sdl_mask.c
|
||||
# draw/sdl/lv_draw_sdl_polygon.c
|
||||
# draw/sdl/lv_draw_sdl_stack_blur.c
|
||||
# draw/sdl/lv_draw_sdl_utils.c
|
||||
# draw/sdl/lv_draw_sdl_img.c
|
||||
# draw/sdl/lv_draw_sdl_bg.c
|
||||
# draw/sdl/lv_draw_sdl_label.c
|
||||
# draw/sdl/lv_draw_sdl_texture_cache.c
|
||||
# draw/sdl/lv_draw_sdl_line.c
|
||||
# draw/sdl/lv_draw_sdl_composite.c
|
||||
|
||||
font/lv_font_loader.c
|
||||
# font/lv_font_loader.c
|
||||
|
||||
hal/lv_hal_indev.c
|
||||
|
||||
@@ -96,14 +96,14 @@ set(LVGL_SOURCES
|
||||
misc/lv_fs.c
|
||||
misc/lv_printf.c
|
||||
misc/lv_style.c
|
||||
misc/lv_log.c
|
||||
# misc/lv_log.c
|
||||
misc/lv_math.c
|
||||
misc/lv_lru.c
|
||||
# misc/lv_lru.c
|
||||
misc/lv_tlsf.c
|
||||
misc/lv_anim_timeline.c
|
||||
misc/lv_bidi.c
|
||||
misc/lv_async.c
|
||||
misc/lv_txt_ap.c
|
||||
# misc/lv_txt_ap.c
|
||||
|
||||
# font/lv_font_unscii_8.c
|
||||
# font/lv_font_unscii_16.c
|
||||
@@ -151,46 +151,46 @@ set(LVGL_SOURCES
|
||||
widgets/lv_arc.c
|
||||
|
||||
extra/lv_extra.c
|
||||
extra/others/monkey/lv_monkey.c
|
||||
extra/others/gridnav/lv_gridnav.c
|
||||
# extra/others/monkey/lv_monkey.c
|
||||
# extra/others/gridnav/lv_gridnav.c
|
||||
extra/others/snapshot/lv_snapshot.c
|
||||
extra/layouts/grid/lv_grid.c
|
||||
extra/layouts/flex/lv_flex.c
|
||||
extra/libs/bmp/lv_bmp.c
|
||||
extra/libs/ffmpeg/lv_ffmpeg.c
|
||||
extra/libs/gif/lv_gif.c
|
||||
extra/libs/gif/gifdec.c
|
||||
extra/libs/freetype/lv_freetype.c
|
||||
# extra/libs/bmp/lv_bmp.c
|
||||
# extra/libs/ffmpeg/lv_ffmpeg.c
|
||||
# extra/libs/gif/lv_gif.c
|
||||
# extra/libs/gif/gifdec.c
|
||||
# extra/libs/freetype/lv_freetype.c
|
||||
extra/libs/qrcode/lv_qrcode.c
|
||||
extra/libs/qrcode/qrcodegen.c
|
||||
extra/libs/sjpg/tjpgd.c
|
||||
extra/libs/sjpg/lv_sjpg.c
|
||||
extra/libs/fsdrv/lv_fs_win32.c
|
||||
extra/libs/fsdrv/lv_fs_stdio.c
|
||||
extra/libs/fsdrv/lv_fs_posix.c
|
||||
# extra/libs/sjpg/tjpgd.c
|
||||
# extra/libs/sjpg/lv_sjpg.c
|
||||
# extra/libs/fsdrv/lv_fs_win32.c
|
||||
# extra/libs/fsdrv/lv_fs_stdio.c
|
||||
# extra/libs/fsdrv/lv_fs_posix.c
|
||||
extra/libs/fsdrv/lv_fs_fatfs.c
|
||||
extra/libs/rlottie/lv_rlottie.c
|
||||
extra/libs/png/lv_png.c
|
||||
extra/libs/png/lodepng.c
|
||||
extra/widgets/imgbtn/lv_imgbtn.c
|
||||
extra/widgets/menu/lv_menu.c
|
||||
extra/widgets/win/lv_win.c
|
||||
extra/widgets/colorwheel/lv_colorwheel.c
|
||||
extra/widgets/list/lv_list.c
|
||||
extra/widgets/chart/lv_chart.c
|
||||
extra/widgets/calendar/lv_calendar_header_arrow.c
|
||||
extra/widgets/calendar/lv_calendar.c
|
||||
extra/widgets/calendar/lv_calendar_header_dropdown.c
|
||||
# extra/libs/rlottie/lv_rlottie.c
|
||||
# extra/libs/png/lv_png.c
|
||||
# extra/libs/png/lodepng.c
|
||||
# extra/widgets/imgbtn/lv_imgbtn.c
|
||||
# extra/widgets/menu/lv_menu.c
|
||||
# extra/widgets/win/lv_win.c
|
||||
# extra/widgets/colorwheel/lv_colorwheel.c
|
||||
# extra/widgets/list/lv_list.c
|
||||
# extra/widgets/chart/lv_chart.c
|
||||
# extra/widgets/calendar/lv_calendar_header_arrow.c
|
||||
# extra/widgets/calendar/lv_calendar.c
|
||||
# extra/widgets/calendar/lv_calendar_header_dropdown.c
|
||||
extra/widgets/tileview/lv_tileview.c
|
||||
extra/widgets/led/lv_led.c
|
||||
extra/widgets/spinner/lv_spinner.c
|
||||
extra/widgets/tabview/lv_tabview.c
|
||||
extra/widgets/meter/lv_meter.c
|
||||
extra/widgets/spinbox/lv_spinbox.c
|
||||
extra/widgets/animimg/lv_animimg.c
|
||||
extra/widgets/span/lv_span.c
|
||||
# extra/widgets/led/lv_led.c
|
||||
# extra/widgets/spinner/lv_spinner.c
|
||||
# extra/widgets/tabview/lv_tabview.c
|
||||
# extra/widgets/meter/lv_meter.c
|
||||
# extra/widgets/spinbox/lv_spinbox.c
|
||||
# extra/widgets/animimg/lv_animimg.c
|
||||
# extra/widgets/span/lv_span.c
|
||||
extra/widgets/keyboard/lv_keyboard.c
|
||||
extra/widgets/msgbox/lv_msgbox.c
|
||||
# extra/widgets/msgbox/lv_msgbox.c
|
||||
# extra/themes/basic/lv_theme_basic.c
|
||||
# extra/themes/default/lv_theme_default.c
|
||||
# extra/themes/mono/lv_theme_mono.c
|
||||
|
||||
@@ -277,14 +277,6 @@ class PageGroupHeader : public PageGroupHeaderBase
|
||||
menu->setCurrentTab(idx);
|
||||
}
|
||||
|
||||
void removeTab(unsigned index) override
|
||||
{
|
||||
auto pg = pages[index];
|
||||
pages.erase(pages.begin() + index);
|
||||
delete pg;
|
||||
updateLayout();
|
||||
}
|
||||
|
||||
void updateLayout()
|
||||
{
|
||||
for (uint8_t i = 0; i < pages.size(); i += 1) {
|
||||
@@ -473,13 +465,6 @@ PageGroup::PageGroup(EdgeTxIcon icon, const char* title, PageDef* pages) :
|
||||
});
|
||||
}
|
||||
|
||||
void PageGroup::removeTab(unsigned index)
|
||||
{
|
||||
if (header->isCurrent(index))
|
||||
setCurrentTab(max<unsigned>(0, index - 1));
|
||||
header->removeTab(index);
|
||||
}
|
||||
|
||||
void PageGroup::openMenu()
|
||||
{
|
||||
quickMenu = QuickMenu::openQuickMenu([=]() { quickMenu = nullptr; },
|
||||
|
||||
@@ -129,7 +129,6 @@ class PageGroupHeaderBase : public Window
|
||||
void nextTab() { chgTab(1); }
|
||||
void prevTab() { chgTab(-1); }
|
||||
|
||||
virtual void removeTab(unsigned index) {}
|
||||
void addTab(PageGroupItem* page);
|
||||
|
||||
void setCurrentIndex(uint8_t index);
|
||||
@@ -225,8 +224,6 @@ class PageGroup : public PageGroupBase
|
||||
std::string getName() const override { return "PageGroup"; }
|
||||
#endif
|
||||
|
||||
void removeTab(unsigned index);
|
||||
|
||||
PageGroupItem* getCurrentTab() const { return currentTab; }
|
||||
|
||||
bool isPageGroup() override { return true; }
|
||||
|
||||
@@ -3001,7 +3001,7 @@ static int luaSetCFSLedColor(lua_State * L)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(LED_STRIP_LENGTH)
|
||||
#if (BLING_LED_STRIP_LENGTH > 0) || (CFS_LED_STRIP_LENGTH > 0)
|
||||
/*luadoc
|
||||
@function applyRGBLedColors()
|
||||
|
||||
@@ -3012,9 +3012,7 @@ static int luaSetCFSLedColor(lua_State * L)
|
||||
|
||||
static int luaApplyRGBLedColors(lua_State * L)
|
||||
{
|
||||
|
||||
rgbLedColorApply();
|
||||
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -116,7 +116,7 @@ void LuaWidgetFactory::translateOptions(WidgetOption * options)
|
||||
lang[1] = toupper(g_eeGeneral.ttsLanguage[1]);
|
||||
lang[2] = 0;
|
||||
#else
|
||||
char* lang = TRANSLATIONS;
|
||||
const char* lang = TRANSLATIONS;
|
||||
#endif
|
||||
|
||||
auto option = options;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "edgetx.h"
|
||||
#include "battery_driver.h"
|
||||
#include "boards/generic_stm32/rgb_leds.h"
|
||||
#undef UNUSED
|
||||
#include "bsp_io.h"
|
||||
#include "stm32_ws2812.h"
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ extern "C" void SDRAM_InitSequence(void)
|
||||
{
|
||||
FMC_SDRAM_CommandTypeDef FMC_SDRAMCommandStructure;
|
||||
uint32_t tmpr = 0;
|
||||
uint32_t timeout = SDRAM_TIMEOUT;
|
||||
// uint32_t timeout = SDRAM_TIMEOUT;
|
||||
|
||||
/* Step 3 --------------------------------------------------------------------*/
|
||||
/* Configure a clock configuration enable command */
|
||||
|
||||
@@ -110,7 +110,7 @@ extern "C" void SDRAM_InitSequence(void)
|
||||
{
|
||||
FMC_SDRAM_CommandTypeDef FMC_SDRAMCommandStructure;
|
||||
uint32_t tmpr = 0;
|
||||
uint32_t timeout = SDRAM_TIMEOUT;
|
||||
// uint32_t timeout = SDRAM_TIMEOUT;
|
||||
|
||||
/* Step 3 --------------------------------------------------------------------*/
|
||||
/* Configure a clock configuration enable command */
|
||||
|
||||
@@ -109,10 +109,10 @@ static tmr10ms_t downTime = 0;
|
||||
static tmr10ms_t tapTime = 0;
|
||||
static short tapCount = 0;
|
||||
|
||||
static void _touch_exti_isr(void)
|
||||
{
|
||||
touchEventOccured = true;
|
||||
}
|
||||
// static void _touch_exti_isr(void)
|
||||
// {
|
||||
// touchEventOccured = true;
|
||||
// }
|
||||
|
||||
static void _touch_exti_stop(void) {}
|
||||
static void _touch_exti_config(void) {}
|
||||
|
||||
Reference in New Issue
Block a user