Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Makefile compilation; tweaked Touch UI button for clarity #22361

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Marlin/src/feature/power.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
#include "../gcode/gcode.h"
#endif

#if EITHER(PSU_CONTROL, AUTO_POWER_CONTROL)

Power powerManager;
bool Power::psu_on;

Expand Down Expand Up @@ -214,3 +216,5 @@ void Power::power_off() {
#endif

#endif // AUTO_POWER_CONTROL

#endif // PSU_CONTROL || AUTO_POWER_CONTROL
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
.tag(13) .button(BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE))
.tag(14) .button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_RESTORE_DEFAULTS))
.colors(action_btn)
.tag(1). button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));
.tag(1). button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE));
#undef GRID_COLS
#undef GRID_ROWS
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void MainMenu::onRedraw(draw_mode_t what) {
.tag(8).button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_ADVANCED_SETTINGS))
.tag(9).button(BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_INFO_MENU))
.colors(action_btn)
.tag(1).button(BTN_POS(1,10), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));
.tag(1).button(BTN_POS(1,10), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE));
}

#undef GRID_COLS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void TuneMenu::onRedraw(draw_mode_t what) {
.enabled(!isPrinting()).tag(5).button(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_MOVE_TO_HOME))
.enabled(!isPrinting()).tag(6).button(BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_RAISE_PLUNGER))
.enabled(!isPrinting()).tag(7).button(BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_RELEASE_XY_AXIS))
.colors(action_btn) .tag(1).button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));
.colors(action_btn) .tag(1).button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE));
}
#undef GRID_COLS
#undef GRID_ROWS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
.tag(10).button(DISPLAY_POS, GET_TEXT_F(MSG_DISPLAY_MENU))
.tag(11).button(RESTORE_DEFAULTS_POS, GET_TEXT_F(MSG_RESTORE_DEFAULTS))
.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void LevelingMenu::onRedraw(draw_mode_t what) {
#undef GRID_COLS
#define GRID_COLS 3
.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void LoadChocolateScreen::draw_buttons(draw_mode_t what) {
cmd.tag(3).button(x, y, h, v, GET_TEXT_F(MSG_FULL_LOAD));

ui.bounds(POLY(load_screen_back_btn), x, y, h, v);
cmd.tag(1).colors(action_btn).button(x, y, h, v, GET_TEXT_F(MSG_BACK));
cmd.tag(1).colors(action_btn).button(x, y, h, v, GET_TEXT_F(MSG_BUTTON_DONE));
}

void LoadChocolateScreen::draw_text(draw_mode_t what) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void MainMenu::onRedraw(draw_mode_t what) {
.tag(10).button(LEVELING_POS, GET_TEXT_F(MSG_LEVELING))
.tag(11).button(ABOUT_PRINTER_POS, GET_TEXT_F(MSG_INFO_MENU))
.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void PreheatMenu::onRedraw(draw_mode_t what) {
}
#endif
cmd.colors(action_btn)
.tag(1) .button(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));
.tag(1) .button(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void PreheatTimerScreen::draw_interaction_buttons(draw_mode_t what) {
CommandProcessor cmd;
cmd.colors(normal_btn)
.font(font_medium)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void AboutScreen::onRedraw(draw_mode_t) {
.tag(2).button(STATS_POS, GET_TEXT_F(MSG_INFO_STATS_MENU));
#endif
cmd.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}

bool AboutScreen::onTouchEnd(uint8_t tag) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
.enabled(ENABLED(BACKLASH_GCODE))
.tag(8).button(BACKLASH_POS, GET_TEXT_F(MSG_BACKLASH))
.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ BaseNumericAdjustmentScreen::widgets_t::widgets_t(draw_mode_t what) : _what(what
#else
BTN_POS(15,7), BTN_SIZE(4,1),
#endif
GET_TEXT_F(MSG_BACK), true, true
GET_TEXT_F(MSG_BUTTON_DONE), true, true
);

_line = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void BedMeshEditScreen::drawHighlightedPointValue() {
if (mydata.highlight.x != NONE)
draw_adjuster(cmd, Z_VALUE_POS, 3, getHighlightedValue(), GET_TEXT_F(MSG_UNITS_MM), 4, 3);
cmd.colors(mydata.needSave ? normal_btn : action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_BACK))
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE))
.colors(mydata.needSave ? action_btn : normal_btn)
.enabled(mydata.needSave)
.tag(2).button(SAVE_POS, GET_TEXT_F(MSG_TOUCHMI_SAVE));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
.tag(6) .enabled(t_ok).button (LOAD_MOMN_POS, GET_TEXT_F(MSG_MOMENTARY))
.tag(7).TOG_STYLE(tog7).enabled(t_ok).button (UNLD_CONT_POS, GET_TEXT_F(MSG_CONTINUOUS))
.tag(8).TOG_STYLE(tog8).enabled(t_ok).button (LOAD_CONT_POS, GET_TEXT_F(MSG_CONTINUOUS))
.tag(1).colors(action_btn) .button (BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).colors(action_btn) .button (BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void CustomUserMenus::onRedraw(draw_mode_t what) {
_USER_ITEM(20)
#endif
.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) {

cmd.font(font_medium)
.colors(action_btn)
.tag(1).button(BTN_POS(1,7), BTN_SIZE(6,1), GET_TEXT_F(MSG_BACK));
.tag(1).button(BTN_POS(1,7), BTN_SIZE(6,1), GET_TEXT_F(MSG_BUTTON_DONE));
#undef GRID_COLS
#undef GRID_ROWS
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void FilamentMenu::onRedraw(draw_mode_t what) {
.enabled(ENABLED(LIN_ADVANCE))
.tag(3).button(LIN_ADVANCE_POS, GET_TEXT_F(MSG_LINEAR_ADVANCE))
.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void FilesScreen::drawFooter() {
cmd.colors(normal_btn)
.font(font_medium)
.colors(has_selection ? normal_btn : action_btn)
.tag(back_tag).button(BTN_POS(4,y), BTN_SIZE(3,h), GET_TEXT_F(MSG_BACK))
.tag(back_tag).button(BTN_POS(4,y), BTN_SIZE(3,h), GET_TEXT_F(MSG_BUTTON_DONE))
.enabled(has_selection)
.colors(has_selection ? action_btn : normal_btn);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) {
.colors(normal_btn)
.tag(6).button (BTN_POS(1,6), BTN_SIZE(4,1), GET_TEXT_F(MSG_SOUNDS))
.colors(action_btn)
.tag(1).button (BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BACK));
.tag(1).button (BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BUTTON_DONE));
#else
.tag(6).button (BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_SOUNDS))
.colors(action_btn)
.tag(1).button (BTN_POS(3,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));
.tag(1).button (BTN_POS(3,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE));
#endif
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void InterfaceSoundsScreen::onRedraw(draw_mode_t what) {
.tag(5).button (BTN_POS(3,6), BTN_SIZE(2,1), getSoundSelection(PRINTING_FINISHED))
.tag(6).button (BTN_POS(3,7), BTN_SIZE(2,1), getSoundSelection(PRINTING_FAILED))
.colors(action_btn)
.tag(1).button (BTN_POS(1,9), BTN_SIZE(4,1), GET_TEXT_F(MSG_BACK));
.tag(1).button (BTN_POS(1,9), BTN_SIZE(4,1), GET_TEXT_F(MSG_BUTTON_DONE));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void LevelingMenu::onRedraw(draw_mode_t what) {
.tag(8).button(BLTOUCH_TEST_POS, GET_TEXT_F(MSG_BLTOUCH_SELFTEST))
#endif
.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void MainMenu::onRedraw(draw_mode_t what) {
.tag(11).button(CUSTOM_MENU_POS, GET_TEXT_F(MSG_CUSTOM_COMMANDS))
#endif
.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void StatisticsScreen::onRedraw(draw_mode_t what) {
if (what & FOREGROUND) {
cmd.font(Theme::font_medium)
.colors(action_btn)
.tag(1).button(BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BACK));
.tag(1).button(BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BUTTON_DONE));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void TuneMenu::onRedraw(draw_mode_t what) {
.tag(10).button(CASE_LIGHT_POS, GET_TEXT_F(MSG_CASE_LIGHT))
.tag(11).button(ADVANCED_SETTINGS_POS, GET_TEXT_F(MSG_ADVANCED_SETTINGS))
.tag(1).colors(action_btn)
.button(BACK_POS, GET_TEXT_F(MSG_BACK));
.button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
#undef GRID_COLS
#undef GRID_ROWS
Expand Down