Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
3djc committed May 24, 2024
1 parent 487b956 commit 40fd258
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 7 additions & 2 deletions radio/src/gui/colorlcd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ set(GUI_SRC
model_templates.cpp
output_edit.cpp
preflight_checks.cpp
function_switches.cpp
throttle_params.cpp
timeedit.cpp
timer_setup.cpp
Expand All @@ -105,7 +104,6 @@ set(GUI_SRC
preview_window.cpp
radio_calibration.cpp
radio_diaganas.cpp
radio_diagcustswitches.cpp
radio_diagkeys.cpp
radio_hardware.cpp
radio_sdmanager.cpp
Expand All @@ -116,6 +114,13 @@ set(GUI_SRC
radio_version.cpp
)

if(FUNCTION_SWITCHES)
set(GUI_SRC ${GUI_SRC}
function_switches.cpp
radio_diagcustswitches.cpp
)
endif()

macro(add_gui_src src)
set(GUI_SRC
${GUI_SRC}
Expand Down
2 changes: 0 additions & 2 deletions radio/src/gui/colorlcd/radio_diagcustswitches.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ class RadioCustSwitchesDiagsWindow : public Window
coord_t y = 2 * FH + i * FH;
new StaticText(this, {10, y, LV_SIZE_CONTENT, LV_SIZE_CONTENT}, STR_CHAR_SWITCH);
new StaticText(this, {25, y, LV_SIZE_CONTENT, LV_SIZE_CONTENT}, switchGetName(i+switchGetMaxSwitches()));
#if defined(FUNCTION_SWITCHES)
new DynamicText(this, {FS_1ST_COLUMN + 10, y, LV_SIZE_CONTENT, LV_SIZE_CONTENT}, [=]() { return getFSPhysicalState(i) ? STR_CHAR_DOWN : STR_CHAR_UP; });
new DynamicText(this, {FS_2ND_COLUMN + 10, y, LV_SIZE_CONTENT, LV_SIZE_CONTENT}, [=]() { return getFSLogicalState(i) ? STR_CHAR_DOWN : STR_CHAR_UP; });
new DynamicText(this, {FS_3RD_COLUMN + 5, y, LV_SIZE_CONTENT, LV_SIZE_CONTENT}, [=]() { return STR_OFFON[getFSLedState(i)]; });
#endif
}
}

Expand Down

0 comments on commit 40fd258

Please sign in to comment.