Aliases for common menu item types

This commit is contained in:
Scott Lahteine
2019-10-03 05:38:30 -05:00
parent df48ef6df3
commit 273cbe931e
23 changed files with 594 additions and 590 deletions

View File

@@ -35,17 +35,17 @@
void menu_spindle_laser() {
START_MENU();
MENU_BACK(MSG_MAIN);
BACK_ITEM(MSG_MAIN);
if (cutter.enabled()) {
#if ENABLED(SPINDLE_LASER_PWM)
MENU_ITEM_EDIT_CALLBACK(CUTTER_MENU_TYPE, MSG_CUTTER(POWER), &cutter.power, SPEED_POWER_MIN, SPEED_POWER_MAX, cutter.update_output);
EDIT_ITEM(CUTTER_MENU_TYPE, MSG_CUTTER(POWER), &cutter.power, SPEED_POWER_MIN, SPEED_POWER_MAX, cutter.update_output);
#endif
MENU_ITEM(function, MSG_CUTTER(OFF), cutter.disable);
ACTION_ITEM(MSG_CUTTER(OFF), cutter.disable);
}
else {
MENU_ITEM(function, MSG_CUTTER(ON), cutter.enable_forward);
ACTION_ITEM(MSG_CUTTER(ON), cutter.enable_forward);
#if ENABLED(SPINDLE_CHANGE_DIR)
MENU_ITEM(function, MSG_SPINDLE_REVERSE, cutter.enable_reverse);
ACTION_ITEM(MSG_SPINDLE_REVERSE, cutter.enable_reverse);
#endif
}
END_MENU();