✏️ ProUI followup

This commit is contained in:
Scott Lahteine 2023-01-14 07:44:57 -06:00
parent 7503ac3c67
commit 5fd5cb02f6
3 changed files with 10 additions and 10 deletions

View file

@ -874,7 +874,7 @@ void update_variable() {
bool DWIN_lcd_sd_status = false; bool DWIN_lcd_sd_status = false;
void SetMediaAutoMount() { void SetMediaAutoMount() {
Toogle_Chkb_Line(HMI_data.MediaAutoMount); Toggle_Chkb_Line(HMI_data.MediaAutoMount);
} }
inline uint16_t nr_sd_menu_items() { inline uint16_t nr_sd_menu_items() {
@ -2036,7 +2036,7 @@ void SetLanguage() {
} }
bool EnableLiveMove = false; bool EnableLiveMove = false;
void SetLiveMove() { Toogle_Chkb_Line(EnableLiveMove); } void SetLiveMove() { Toggle_Chkb_Line(EnableLiveMove); }
void LiveMove() { void LiveMove() {
planner.synchronize(); planner.synchronize();
if (!EnableLiveMove) return; if (!EnableLiveMove) return;
@ -2082,7 +2082,7 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS
#if ENABLED(POWER_LOSS_RECOVERY) #if ENABLED(POWER_LOSS_RECOVERY)
void SetPwrLossr() { void SetPwrLossr() {
Toogle_Chkb_Line(recovery.enabled); Toggle_Chkb_Line(recovery.enabled);
recovery.changed(); recovery.changed();
} }
#endif #endif
@ -2108,7 +2108,7 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS
#if ENABLED(CASE_LIGHT_MENU) #if ENABLED(CASE_LIGHT_MENU)
void SetCaseLight() { void SetCaseLight() {
Toogle_Chkb_Line(caselight.on); Toggle_Chkb_Line(caselight.on);
caselight.update_enabled(); caselight.update_enabled();
} }
#if ENABLED(CASELIGHT_USES_BRIGHTNESS) #if ENABLED(CASELIGHT_USES_BRIGHTNESS)
@ -2144,7 +2144,7 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS
#if ENABLED(SOUND_MENU_ITEM) #if ENABLED(SOUND_MENU_ITEM)
void SetEnableSound() { void SetEnableSound() {
Toogle_Chkb_Line(ui.sound_on); Toggle_Chkb_Line(ui.sound_on);
} }
#endif #endif
@ -2168,7 +2168,7 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS
#if ENABLED(BLTOUCH_HS_MODE) #if ENABLED(BLTOUCH_HS_MODE)
void SetHSMode() { void SetHSMode() {
Toogle_Chkb_Line(bltouch.high_speed_mode); Toggle_Chkb_Line(bltouch.high_speed_mode);
} }
#endif #endif
@ -2177,7 +2177,7 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS
#if HAS_FILAMENT_SENSOR #if HAS_FILAMENT_SENSOR
void SetRunoutEnable() { void SetRunoutEnable() {
runout.reset(); runout.reset();
Toogle_Chkb_Line(runout.enabled); Toggle_Chkb_Line(runout.enabled);
} }
#if HAS_FILAMENT_RUNOUT_DISTANCE #if HAS_FILAMENT_RUNOUT_DISTANCE
void ApplyRunoutDistance() { runout.set_runout_distance(MenuData.Value / MINUNITMULT); } void ApplyRunoutDistance() { runout.set_runout_distance(MenuData.Value / MINUNITMULT); }
@ -2439,7 +2439,7 @@ void TramC () { Tram(4); }
} }
void SetManualTramming() { void SetManualTramming() {
Toogle_Chkb_Line(HMI_data.FullManualTramming); Toggle_Chkb_Line(HMI_data.FullManualTramming);
} }
#endif // HAS_BED_PROBE && HAS_MESH #endif // HAS_BED_PROBE && HAS_MESH

View file

@ -115,7 +115,7 @@ void Show_Chkb_Line(const bool checked) {
DWIN_UpdateLCD(); DWIN_UpdateLCD();
} }
void Toogle_Chkb_Line(bool &checked) { void Toggle_Chkb_Line(bool &checked) {
checked = !checked; checked = !checked;
Show_Chkb_Line(checked); Show_Chkb_Line(checked);
} }

View file

@ -145,7 +145,7 @@ void Draw_Menu_Line(const uint8_t line, const uint8_t icon=0, const char * const
void Draw_Menu_Line(const uint8_t line, const uint8_t icon=0, FSTR_P label=nullptr, bool more=false, bool selected=false); void Draw_Menu_Line(const uint8_t line, const uint8_t icon=0, FSTR_P label=nullptr, bool more=false, bool selected=false);
void Draw_Chkb_Line(const uint8_t line, const bool checked); void Draw_Chkb_Line(const uint8_t line, const bool checked);
void Show_Chkb_Line(const bool checked); void Show_Chkb_Line(const bool checked);
void Toogle_Chkb_Line(bool &checked); void Toggle_Chkb_Line(bool &checked);
void Draw_Menu_IntValue(uint16_t bcolor, const uint8_t line, uint8_t iNum, const int32_t value=0); void Draw_Menu_IntValue(uint16_t bcolor, const uint8_t line, uint8_t iNum, const int32_t value=0);
void onDrawMenuItem(MenuItemClass* menuitem, int8_t line); void onDrawMenuItem(MenuItemClass* menuitem, int8_t line);
void onDrawSubMenu(MenuItemClass* menuitem, int8_t line); void onDrawSubMenu(MenuItemClass* menuitem, int8_t line);