Commit 8f3ec3c8 authored by MagoKimbra's avatar MagoKimbra

Revert "Update 4.1.5"

This reverts commit a3be0913.
parent cf595fb3
......@@ -417,7 +417,6 @@ const unsigned int dropsegments = 5; // everything with less than this number of
// Add support for filament exchange support M600; requires display
#if ENABLED(ULTIPANEL)
//#define FILAMENTCHANGEENABLE
#if ENABLED(FILAMENTCHANGEENABLE)
#define FILAMENTCHANGE_XPOS 3
#define FILAMENTCHANGE_YPOS 3
......
......@@ -3001,21 +3001,13 @@ inline void gcode_G28() {
set_destination_to_current();
bool come_back = code_seen('B');
float lastpos[NUM_AXIS];
float oldfeedrate;
if(come_back) {
oldfeedrate = feedrate;
memcpy(lastpos, current_position, sizeof(lastpos));
}
feedrate = 0.0;
bool homeX = code_seen(axis_codes[X_AXIS]),
homeY = code_seen(axis_codes[Y_AXIS]),
homeZ = code_seen(axis_codes[Z_AXIS]),
homeE = code_seen(axis_codes[E_AXIS]);
home_all_axis = (!homeX && !homeY && !homeZ && !homeE) || (homeX && homeY && homeZ);
#ifdef NPR2
......@@ -3402,32 +3394,6 @@ inline void gcode_G28() {
#endif
clean_up_after_endstop_move();
if(come_back) {
#if ENABLED(DELTA)
feedrate = 1.732 * homing_feedrate[X_AXIS];
memcpy(destination, lastpos, sizeof(destination));
prepare_move();
feedrate = oldfeedrate;
#else
if(homeX) {
feedrate = homing_feedrate[X_AXIS];
destination[X_AXIS] = lastpos[X_AXIS];
prepare_move();
}
if(homeY) {
feedrate = homing_feedrate[Y_AXIS];
destination[Y_AXIS] = lastpos[Y_AXIS];
prepare_move();
}
if(homeZ) {
feedrate = homing_feedrate[Z_AXIS];
destination[Z_AXIS] = lastpos[Z_AXIS];
prepare_move();
}
feedrate = oldfeedrate;
#endif
}
}
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
......@@ -5999,7 +5965,7 @@ inline void gcode_M503() {
inline void gcode_M600() {
if (degHotend(active_extruder) < extrude_min_temp) {
ECHO_LM(ER, MSG_TOO_COLD_FOR_FILAMENTCHANGE);
ECHO_LM(ER, MSG_TOO_COLD_FOR_M600);
return;
}
......@@ -7088,7 +7054,7 @@ void clamp_to_software_endstops(float target[3]) {
}
}
#if ENABLED(PREVENT_DANGEROUS_EXTRUDE)
#ifdef PREVENT_DANGEROUS_EXTRUDE
FORCE_INLINE void prevent_dangerous_extrude(float &curr_e, float &dest_e) {
float de = dest_e - curr_e;
......@@ -7109,7 +7075,7 @@ void clamp_to_software_endstops(float target[3]) {
#endif // PREVENT_DANGEROUS_EXTRUDE
#if ENABLED(DELTA) || ENABLED(SCARA)
#if defined(DELTA) || defined(SCARA)
inline bool prepare_move_delta(float target[NUM_AXIS]) {
......@@ -7169,11 +7135,11 @@ void clamp_to_software_endstops(float target[3]) {
#endif // DELTA || SCARA
#if ENABLED(SCARA)
#ifdef SCARA
inline bool prepare_move_scara(float target[NUM_AXIS]) { return prepare_move_delta(target); }
#endif
#if ENABLED(DUAL_X_CARRIAGE)
#ifdef DUAL_X_CARRIAGE
inline bool prepare_move_dual_x_carriage() {
if (active_extruder_parked) {
......@@ -7211,7 +7177,7 @@ void clamp_to_software_endstops(float target[3]) {
#endif // DUAL_X_CARRIAGE
#if ENABLED(CARTESIAN) || ENABLED(COREXY) || ENABLED(COREXZ)
#if defined(CARTESIAN) || defined(COREXY) || defined(COREXZ)
inline bool prepare_move_cartesian() {
// Do not use feedrate_multiplier for E or Z only moves
......@@ -7236,21 +7202,21 @@ void prepare_move() {
clamp_to_software_endstops(destination);
refresh_cmd_timeout();
#if ENABLED(PREVENT_DANGEROUS_EXTRUDE)
#ifdef PREVENT_DANGEROUS_EXTRUDE
prevent_dangerous_extrude(current_position[E_AXIS], destination[E_AXIS]);
#endif
#if ENABLED(SCARA)
#ifdef SCARA
if (!prepare_move_scara(destination)) return;
#elif ENABLED(DELTA)
#elif defined(DELTA)
if (!prepare_move_delta(destination)) return;
#endif
#if ENABLED(DUAL_X_CARRIAGE)
#ifdef DUAL_X_CARRIAGE
if (!prepare_move_dual_x_carriage()) return;
#endif
#if ENABLED(CARTESIAN) || ENABLED(COREXY) || ENABLED(COREXZ)
#if defined(CARTESIAN) || defined(COREXY) || defined(COREXZ)
if (!prepare_move_cartesian()) return;
#endif
......@@ -7370,7 +7336,7 @@ void plan_arc(
arc_target[E_AXIS] += extruder_per_segment;
clamp_to_software_endstops(arc_target);
#if ENABLED(DELTA) || ENABLED(SCARA)
#if defined(DELTA) || defined(SCARA)
calculate_delta(arc_target);
adjust_delta(arc_target);
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], arc_target[E_AXIS], feed_rate, active_extruder, active_driver);
......@@ -7380,7 +7346,7 @@ void plan_arc(
}
// Ensure last segment arrives at target location.
#if ENABLED(DELTA) || ENABLED(SCARA)
#if defined(DELTA) || defined(SCARA)
calculate_delta(target);
adjust_delta(arc_target);
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], target[E_AXIS], feed_rate, active_extruder, active_driver);
......@@ -7438,7 +7404,7 @@ void plan_arc(
#endif // HAS_CONTROLLERFAN
#if ENABLED(SCARA)
#ifdef SCARA
void calculate_SCARA_forward_Transform(float f_scara[3]) {
// Perform forward kinematics, and place results in delta[3]
......
......@@ -395,7 +395,7 @@
* MAX_STEP_FREQUENCY differs for TOSHIBA OR ARDUINO DUE OR ARDUINO MEGA
*/
#ifdef __SAM3X8E__
#if ENABLED(CONFIG_STEPPERS_TOSHIBA) || DISABLED(ENABLE_HIGH_SPEED_STEPPING)
#if defined(CONFIG_STEPPERS_TOSHIBA)
#define MAX_STEP_FREQUENCY 150000 // Max step frequency for Toshiba Stepper Controllers
#define DOUBLE_STEP_FREQUENCY MAX_STEP_FREQUENCY
#else
......@@ -403,7 +403,7 @@
#define DOUBLE_STEP_FREQUENCY 100000 //96kHz is close to maximum for an Arduino Due
#endif
#else
#if ENABLED(CONFIG_STEPPERS_TOSHIBA)
#if defined(CONFIG_STEPPERS_TOSHIBA)
#define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
#define DOUBLE_STEP_FREQUENCY MAX_STEP_FREQUENCY
#else
......
......@@ -47,7 +47,7 @@
#define MSG_PREHEAT_GUM_ALL "Preheat GUM All"
#define MSG_PREHEAT_GUM_BEDONLY "Preheat GUM Bed"
#define MSG_PREHEAT_GUM_SETTINGS "Preheat GUM conf"
#define MSG_TOO_COLD_FOR_FILAMENTCHANGE "Hotend too cold to change filament"
#define MSG_TOO_COLD_FOR_M600 "M600 Hotend too cold to change filament"
#define MSG_COOLDOWN "Cooldown"
#define MSG_SWITCH_PS_ON "Switch power on"
#define MSG_SWITCH_PS_OFF "Switch power off"
......@@ -68,7 +68,6 @@
#define MSG_FAN_SPEED "Fan speed"
#define MSG_FLOW "Flow"
#define MSG_CONTROL "Control"
#define MSG_FIX_LOSE_STEPS "Fix axis steps"
#define MSG_MIN LCD_STR_THERMOMETER " Min"
#define MSG_MAX LCD_STR_THERMOMETER " Max"
#define MSG_FACTOR LCD_STR_THERMOMETER " Fact"
......@@ -105,7 +104,7 @@
#define MSG_E3STEPS "E3steps/mm"
#define MSG_TEMPERATURE "Temperature"
#define MSG_MOTION "Motion"
#define MSG_FILAMENT "Filament"
#define MSG_VOLUMETRIC "Filament"
#define MSG_VOLUMETRIC_ENABLED "E in mm3"
#define MSG_FILAMENT_SIZE_EXTRUDER "Fil. Dia."
#define MSG_CONTRAST "LCD contrast"
......@@ -142,10 +141,9 @@
#define MSG_ZPROBE_OUT "Z probe out. bed"
#define MSG_POSITION_UNKNOWN "Home X/Y before Z"
#define MSG_ZPROBE_ZOFFSET "Z Offset"
#define MSG_BABYSTEP "Babystep"
#define MSG_BABYSTEP_X MSG_BABYSTEP " " MSG_X
#define MSG_BABYSTEP_Y MSG_BABYSTEP " " MSG_Y
#define MSG_BABYSTEP_Z MSG_BABYSTEP " " MSG_Z
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Z "Babystep Z"
#define MSG_ENDSTOP_ABORT "Endstop abort"
#define MSG_HEATING_FAILED_LCD "Heating failed"
#define MSG_ERR_REDUNDANT_TEMP "Err: REDUNDANT TEMP ERROR"
......
......@@ -20,15 +20,15 @@
#define MSG_AUTOSTART "Autostart"
#define MSG_DISABLE_STEPPERS "Disabilita Motori"
#define MSG_AUTO_HOME "Auto Home"
#define MSG_MBL_SETTING "Liv. piatto manuale "
#define MSG_MBL_BUTTON " Premi il tasto "
#define MSG_MBL_INTRO " Liv. piatto... "
#define MSG_MBL_1 " Calibra il primo punto"
#define MSG_MBL_2 " Calibra il secondo punto"
#define MSG_MBL_3 " Calibra il terzo punto"
#define MSG_MBL_4 " Calibra il quarto punto"
#define MSG_MBL_5 " Va bene? "
#define MSG_MBL_6 " Piatto livellato! "
#define MSG_MBL_SETTING "Manual Bed Leveling "
#define MSG_MBL_BUTTON " Press the button "
#define MSG_MBL_INTRO " Leveling bed... "
#define MSG_MBL_1 " Adjust first point "
#define MSG_MBL_2 " Adjust second point"
#define MSG_MBL_3 " Adjust third point "
#define MSG_MBL_4 " Adjust fourth point"
#define MSG_MBL_5 " Is it ok? "
#define MSG_MBL_6 " BED leveled! "
#define MSG_SET_HOME_OFFSETS "Setta offset home"
#define MSG_SET_ORIGIN "Imposta Origine"
#define MSG_PREHEAT_PLA "Preriscalda PLA"
......@@ -43,14 +43,14 @@
#define MSG_PREHEAT_GUM_ALL "Preri. GOMMA Tutto"
#define MSG_PREHEAT_GUM_BEDONLY "Preri. GOMMA Piatto"
#define MSG_PREHEAT_GUM_SETTINGS "Config. prer. GOMMA"
#define MSG_TOO_COLD_FOR_FILAMENTCHANGE "Hotend troppo freddo per il cambio filo"
#define MSG_TOO_COLD_FOR_M600 "M600 Hotend troppo freddo per il cambio filo"
#define MSG_COOLDOWN "Raffredda"
#define MSG_SWITCH_PS_ON "Accendi aliment."
#define MSG_SWITCH_PS_OFF "Spegni aliment."
#define MSG_EXTRUDE "Estrudi"
#define MSG_RETRACT "Ritrai"
#define MSG_MOVE_AXIS "Muovi Asse"
#define MSG_LEVEL_BED "Liv. piatto"
#define MSG_LEVEL_BED "Level bed"
#define MSG_MOVE_X "Muovi X"
#define MSG_MOVE_Y "Muovi Y"
#define MSG_MOVE_Z "Muovi Z"
......@@ -100,7 +100,7 @@
#define MSG_E3STEPS "E3steps/mm"
#define MSG_TEMPERATURE "Temperatura"
#define MSG_MOTION "Movimento"
#define MSG_FILAMENT "Filamento"
#define MSG_VOLUMETRIC "Filamento"
#define MSG_VOLUMETRIC_ENABLED "E in mm3"
#define MSG_FILAMENT_SIZE_EXTRUDER "Diam. filo"
#define MSG_CONTRAST "Contrasto LCD"
......@@ -137,12 +137,11 @@
#define MSG_ZPROBE_OUT "Z probe out. bed"
#define MSG_POSITION_UNKNOWN "Home X/Y before Z"
#define MSG_ZPROBE_ZOFFSET "Z Offset"
#define MSG_BABYSTEP "Babystep"
#define MSG_BABYSTEP_X MSG_BABYSTEP " " MSG_X
#define MSG_BABYSTEP_Y MSG_BABYSTEP " " MSG_Y
#define MSG_BABYSTEP_Z MSG_BABYSTEP " " MSG_Z
#define MSG_ENDSTOP_ABORT "Finecorsa abort."
#define MSG_HEATING_FAILED_LCD "Riscaldamento fallito"
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Z "Babystep Z"
#define MSG_ENDSTOP_ABORT "Finecorsa abort"
#define MSG_HEATING_FAILED_LCD "Heating failed"
#define MSG_ERR_REDUNDANT_TEMP "Err: REDUNDANT TEMP ERROR"
#define MSG_THERMAL_RUNAWAY "THERMAL RUNAWAY"
#define MSG_ERR_MAXTEMP "Err: MAXTEMP"
......@@ -176,19 +175,19 @@
#define MSG_HEATING "Riscaldamento..."
#define MSG_HEATING_COMPLETE "Riscaldamento finito."
#define MSG_BED_HEATING "Riscaldamento piatto."
#define MSG_BED_DONE "Piatto riscaldato."
#define MSG_BED_HEATING "Bed Riscaldamento."
#define MSG_BED_DONE "Bed done."
// Extra
#define MSG_LASER "Laser Preset"
#define MSG_CONFIG "Configurazione"
#define MSG_E_BOWDEN_LENGTH "Estrudi " STRINGIFY(BOWDEN_LENGTH) "mm"
#define MSG_R_BOWDEN_LENGTH "Retrai " STRINGIFY(BOWDEN_LENGTH) "mm"
#define MSG_PURGE_XMM "Purga " STRINGIFY(LCD_PURGE_LENGTH) "mm"
#define MSG_RETRACT_XMM "Retrai " STRINGIFY(LCD_RETRACT_LENGTH) "mm"
#define MSG_E_BOWDEN_LENGTH "Extrude " STRINGIFY(BOWDEN_LENGTH) "mm"
#define MSG_R_BOWDEN_LENGTH "Retract " STRINGIFY(BOWDEN_LENGTH) "mm"
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm"
#define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm"
#define MSG_SAVED_POS "Posizione Salvata"
#define MSG_RESTORING_POS "Ripristino posizione"
#define MSG_INVALID_POS_SLOT "Slot invalido, slot totali: "
#define MSG_RESTORING_POS "Restoring position"
#define MSG_INVALID_POS_SLOT "Invalid slot, total slots: "
// Firmware Test
#ifdef FIRMWARE_TEST
......
......@@ -63,8 +63,6 @@ static void lcd_status_screen();
static void lcd_main_menu();
static void lcd_tune_menu();
static void lcd_prepare_menu();
static void lcd_prepare_motion_menu();
static void lcd_prepare_temperature_menu();
static void lcd_move_menu();
static void lcd_control_menu();
static void lcd_control_temperature_menu();
......@@ -496,42 +494,20 @@ void lcd_set_home_offsets() {
#if ENABLED(BABYSTEPPING)
static void _lcd_babystep(menuFunc_t menu, int axis, const char *msg) {
static void _lcd_babystep(int axis, const char *msg) {
if (encoderPosition != 0) {
babystepsTodo[axis] += (int)encoderPosition;
encoderPosition = 0;
lcdDrawUpdate = 1;
}
if (lcdDrawUpdate) lcd_implementation_drawedit(msg, "");
if (LCD_CLICKED) lcd_goto_menu(menu);
if (LCD_CLICKED) lcd_goto_menu(lcd_tune_menu);
}
static void lcd_prepare_motion_babystep();
static void lcd_tune_babystep_x() { _lcd_babystep(lcd_tune_menu, X_AXIS, PSTR(MSG_BABYSTEPPING_X)); }
static void lcd_tune_babystep_y() { _lcd_babystep(lcd_tune_menu, Y_AXIS, PSTR(MSG_BABYSTEPPING_Y)); }
static void lcd_tune_babystep_z() { _lcd_babystep(lcd_tune_menu, Z_AXIS, PSTR(MSG_BABYSTEPPING_Z)); }
static void lcd_prepare_babystep_x() { _lcd_babystep(lcd_prepare_motion_babystep, X_AXIS, PSTR(MSG_BABYSTEPPING_X)); }
static void lcd_prepare_babystep_y() { _lcd_babystep(lcd_prepare_motion_babystep, Y_AXIS, PSTR(MSG_BABYSTEPPING_Y)); }
static void lcd_prepare_babystep_z() { _lcd_babystep(lcd_prepare_motion_babystep, Z_AXIS, PSTR(MSG_BABYSTEPPING_Z)); }
static void lcd_babystep_x() { _lcd_babystep(X_AXIS, PSTR(MSG_BABYSTEPPING_X)); }
static void lcd_babystep_y() { _lcd_babystep(Y_AXIS, PSTR(MSG_BABYSTEPPING_Y)); }
static void lcd_babystep_z() { _lcd_babystep(Z_AXIS, PSTR(MSG_BABYSTEPPING_Z)); }
static void lcd_prepare_motion_babystep() {
START_MENU(lcd_main_menu);
MENU_ITEM(back, MSG_MOTION, lcd_prepare_motion_menu);
#if ENABLED(BABYSTEP_XY)
MENU_ITEM(submenu, MSG_BABYSTEP_X, lcd_prepare_babystep_x);
MENU_ITEM(submenu, MSG_BABYSTEP_Y, lcd_prepare_babystep_y);
#endif //BABYSTEP_XY
MENU_ITEM(submenu, MSG_BABYSTEP_Z, lcd_prepare_babystep_z);
END_MENU();
}
#endif // BABYSTEPPING
static void lcd_tune_fixstep() {
#if ENABLED(DELTA)
enqueuecommands_P(PSTR("G28 B"));
#else
enqueuecommands_P(PSTR("G28 X Y B"));
#endif
}
#endif //BABYSTEPPING
/**
*
......@@ -572,14 +548,11 @@ static void lcd_tune_menu() {
#if ENABLED(BABYSTEPPING)
#if ENABLED(BABYSTEP_XY)
MENU_ITEM(submenu, MSG_BABYSTEP_X, lcd_tune_babystep_x);
MENU_ITEM(submenu, MSG_BABYSTEP_Y, lcd_tune_babystep_y);
MENU_ITEM(submenu, MSG_BABYSTEP_X, lcd_babystep_x);
MENU_ITEM(submenu, MSG_BABYSTEP_Y, lcd_babystep_y);
#endif //BABYSTEP_XY
MENU_ITEM(submenu, MSG_BABYSTEP_Z, lcd_tune_babystep_z);
MENU_ITEM(submenu, MSG_BABYSTEP_Z, lcd_babystep_z);
#endif
MENU_ITEM(function, MSG_FIX_LOSE_STEPS, lcd_tune_fixstep);
#if ENABLED(FILAMENTCHANGEENABLE)
MENU_ITEM(gcode, MSG_FILAMENTCHANGE, PSTR("M600"));
#endif
......@@ -664,8 +637,8 @@ void lcd_preheat_gum0() { _lcd_preheat(0, gumPreheatHotendTemp, gumPreheatHPBTem
void lcd_preheat_gum_bedonly() { _lcd_preheat(0, 0, gumPreheatHPBTemp, gumPreheatFanSpeed); }
#endif
static void lcd_preheat_pla_menu() {
START_MENU(lcd_prepare_temperature_menu);
MENU_ITEM(back, MSG_TEMPERATURE, lcd_prepare_temperature_menu);
START_MENU(lcd_prepare_menu);
MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
MENU_ITEM(function, MSG_PREHEAT_PLA " 0", lcd_preheat_pla0);
#if HOTENDS > 1
MENU_ITEM(function, MSG_PREHEAT_PLA " 1", lcd_preheat_pla1);
......@@ -684,8 +657,8 @@ static void lcd_preheat_pla_menu() {
}
static void lcd_preheat_abs_menu() {
START_MENU(lcd_prepare_temperature_menu);
MENU_ITEM(back, MSG_TEMPERATURE, lcd_prepare_temperature_menu);
START_MENU(lcd_prepare_menu);
MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
MENU_ITEM(function, MSG_PREHEAT_ABS " 0", lcd_preheat_abs0);
#if HOTENDS > 1
MENU_ITEM(function, MSG_PREHEAT_ABS " 1", lcd_preheat_abs1);
......@@ -704,8 +677,8 @@ static void lcd_preheat_abs_menu() {
}
static void lcd_preheat_gum_menu() {
START_MENU(lcd_prepare_temperature_menu);
MENU_ITEM(back, MSG_TEMPERATURE, lcd_prepare_temperature_menu);
START_MENU(lcd_prepare_menu);
MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
MENU_ITEM(function, MSG_PREHEAT_GUM " 0", lcd_preheat_gum0);
#if HOTENDS > 1
MENU_ITEM(function, MSG_PREHEAT_GUM " 1", lcd_preheat_gum1);
......@@ -743,24 +716,6 @@ static void lcd_prepare_menu() {
//
MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
MENU_ITEM(submenu, MSG_MOTION, lcd_prepare_motion_menu);
MENU_ITEM(submenu, MSG_TEMPERATURE, lcd_prepare_temperature_menu);
END_MENU();
}
/**
*
* "Prepare > Motion" submenu
*
*/
static void lcd_prepare_motion_menu() {
START_MENU(lcd_prepare_menu);
//
// ^ Prepare
//
MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
//
// Auto Home
//
......@@ -780,11 +735,12 @@ static void lcd_prepare_motion_menu() {
// Set Home Offsets
//
MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets);
//MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0"));
//Add Preset menu for LASER setting '14. 7. 22
#if ENABLED(LASERBEAM)
MENU_ITEM_EDIT(int3, MSG_LASER, &laser_ttl_modulation, 0, 255);
if(laser_ttl_modulation == 0) {
if(laser_ttl_modulation == 0) {
WRITE(LASER_PWR_PIN, LOW);
}
else {
......@@ -797,72 +753,10 @@ static void lcd_prepare_motion_menu() {
//
MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu);
//
// Easy Load
//
#if ENABLED(EASY_LOAD)
MENU_ITEM(function, MSG_E_BOWDEN_LENGTH, lcd_easy_load);
MENU_ITEM(function, MSG_R_BOWDEN_LENGTH, lcd_easy_unload);
MENU_ITEM(function, MSG_PURGE_XMM, lcd_purge);
MENU_ITEM(function, MSG_RETRACT_XMM, lcd_retract);
#endif // EASY_LOAD
//
// Babystepping
//
#if ENABLED(BABYSTEPPING)
MENU_ITEM(submenu, MSG_BABYSTEP, lcd_prepare_motion_babystep);
#endif
MENU_ITEM(function, MSG_FIX_LOSE_STEPS, lcd_tune_fixstep);
//
// Disable Steppers
//
MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84"));
END_MENU();
}
/**
*
* "Prepare > Temperature" submenu
*
*/
static void lcd_prepare_temperature_menu() {
START_MENU(lcd_prepare_menu);
//
// ^ Prepare
//
MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
//
// Nozzle, Nozzle 2, Nozzle 3, Nozzle 4
//
#if TEMP_SENSOR_0 != 0
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 0", &target_temperature[0], 0, HEATER_0_MAXTEMP + LCD_MAX_TEMP_OFFSET);
#endif
#if HOTENDS > 1 && TEMP_SENSOR_1 != 0
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 1", &target_temperature[1], 0, HEATER_1_MAXTEMP + LCD_MAX_TEMP_OFFSET);
#if HOTENDS > 2 && TEMP_SENSOR_2 != 0
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 2", &target_temperature[2], 0, HEATER_2_MAXTEMP + LCD_MAX_TEMP_OFFSET);
#if HOTENDS > 3 && TEMP_SENSOR_3 != 0
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 3", &target_temperature[3], 0, HEATER_3_MAXTEMP + LCD_MAX_TEMP_OFFSET);
#endif // HOTENDS > 3
#endif // HOTENDS > 2
#endif // HOTENDS > 1
//
// Bed
//
#if TEMP_SENSOR_BED != 0
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP + LCD_MAX_TEMP_OFFSET);
#endif
//
// Fan Speed
//
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
//
// Preheat PLA
......@@ -886,6 +780,33 @@ static void lcd_prepare_temperature_menu() {
//
MENU_ITEM(function, MSG_COOLDOWN, lcd_cooldown);
//
// Easy Load
//
#if ENABLED(EASY_LOAD)
MENU_ITEM(function, MSG_E_BOWDEN_LENGTH, lcd_easy_load);
MENU_ITEM(function, MSG_R_BOWDEN_LENGTH, lcd_easy_unload);
MENU_ITEM(function, MSG_PURGE_XMM, lcd_purge);
MENU_ITEM(function, MSG_RETRACT_XMM, lcd_retract);
#endif // EASY_LOAD
//
// Switch power on/off
//
#if HAS_POWER_SWITCH
if (powersupply)
MENU_ITEM(gcode, MSG_SWITCH_PS_OFF, PSTR("M81"));
else
MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80"));
#endif
//
// Autostart
//
#if ENABLED(SDSUPPORT) && ENABLED(MENU_ADDAUTOSTART)
MENU_ITEM(function, MSG_AUTOSTART, lcd_autostart_sd);
#endif
END_MENU();
}
......@@ -904,12 +825,12 @@ static void lcd_prepare_temperature_menu() {
#endif // DELTA
inline void line_to_current(float feedrate) {
inline void line_to_current(AxisEnum axis) {
#if ENABLED(DELTA)
calculate_delta(current_position);
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], feedrate/60, active_extruder, active_driver);
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], manual_feedrate[axis]/60, active_extruder, active_driver);
#else
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate/60, active_extruder, active_driver);
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[axis]/60, active_extruder, active_driver);
#endif
}
......@@ -929,7 +850,7 @@ static void _lcd_move(const char *name, AxisEnum axis, int min, int max) {
if (min_software_endstops && current_position[axis] < min) current_position[axis] = min;
if (max_software_endstops && current_position[axis] > max) current_position[axis] = max;
encoderPosition = 0;
line_to_current(manual_feedrate[axis]);
line_to_current(axis);
lcdDrawUpdate = 1;
}
if (lcdDrawUpdate) lcd_implementation_drawedit(name, ftostr31(current_position[axis]));
......@@ -945,7 +866,7 @@ static void lcd_move_e() {
#endif
current_position[E_AXIS] += float((int)encoderPosition) * move_menu_scale;
encoderPosition = 0;
line_to_current(manual_feedrate[E_AXIS]);
line_to_current(E_AXIS);
lcdDrawUpdate = 1;
}
if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_MOVE_E), ftostr31(current_position[E_AXIS]));
......@@ -963,8 +884,8 @@ static void lcd_move_menu_axis() {
MENU_ITEM(back, MSG_MOVE_AXIS, lcd_move_menu);
MENU_ITEM(submenu, MSG_MOVE_X, lcd_move_x);
MENU_ITEM(submenu, MSG_MOVE_Y, lcd_move_y);
MENU_ITEM(submenu, MSG_MOVE_Z, lcd_move_z);
if (move_menu_scale < 10.0) {
MENU_ITEM(submenu, MSG_MOVE_Z, lcd_move_z);
MENU_ITEM(submenu, MSG_MOVE_E, lcd_move_e);
}
END_MENU();
......@@ -990,8 +911,8 @@ static void lcd_move_menu_01mm() {
*/
static void lcd_move_menu() {
START_MENU(lcd_prepare_motion_menu);
MENU_ITEM(back, MSG_MOTION, lcd_prepare_motion_menu);
START_MENU(lcd_prepare_menu);
MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
MENU_ITEM(submenu, MSG_MOVE_10MM, lcd_move_menu_10mm);
MENU_ITEM(submenu, MSG_MOVE_1MM, lcd_move_menu_1mm);
MENU_ITEM(submenu, MSG_MOVE_01MM, lcd_move_menu_01mm);
......@@ -1010,7 +931,7 @@ static void lcd_control_menu() {
MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
MENU_ITEM(submenu, MSG_TEMPERATURE, lcd_control_temperature_menu);
MENU_ITEM(submenu, MSG_MOTION, lcd_control_motion_menu);
MENU_ITEM(submenu, MSG_FILAMENT, lcd_control_volumetric_menu);
MENU_ITEM(submenu, MSG_VOLUMETRIC, lcd_control_volumetric_menu);
#if ENABLED(HAS_LCD_CONTRAST)
//MENU_ITEM_EDIT(int3, MSG_CONTRAST, &lcd_contrast, 0, 63);
......@@ -1019,24 +940,6 @@ static void lcd_control_menu() {
#if ENABLED(FWRETRACT)
MENU_ITEM(submenu, MSG_RETRACT, lcd_control_retract_menu);
#endif
//
// Switch power on/off
//
#if HAS_POWER_SWITCH
if (powersupply)
MENU_ITEM(gcode, MSG_SWITCH_PS_OFF, PSTR("M81"));
else
MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80"));
#endif
//
// Autostart
//
#if ENABLED(SDSUPPORT) && ENABLED(MENU_ADDAUTOSTART)
MENU_ITEM(function, MSG_AUTOSTART, lcd_autostart_sd);
#endif
#if ENABLED(EEPROM_SETTINGS)
MENU_ITEM(function, MSG_STORE_EPROM, Config_StoreSettings);
MENU_ITEM(function, MSG_LOAD_EPROM, Config_RetrieveSettings);
......@@ -1093,6 +996,37 @@ static void lcd_control_temperature_menu() {
//
MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
//
// Nozzle, Nozzle 2, Nozzle 3, Nozzle 4
//
#if TEMP_SENSOR_0 != 0
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 0", &target_temperature[0], 0, HEATER_0_MAXTEMP + LCD_MAX_TEMP_OFFSET);
#endif
#if HOTENDS > 1 && TEMP_SENSOR_1 != 0
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 1", &target_temperature[1], 0, HEATER_1_MAXTEMP + LCD_MAX_TEMP_OFFSET);
#if HOTENDS > 2 && TEMP_SENSOR_2 != 0
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 2", &target_temperature[2], 0, HEATER_2_MAXTEMP + LCD_MAX_TEMP_OFFSET);
#if HOTENDS > 3 && TEMP_SENSOR_3 != 0
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE " 3", &target_temperature[3], 0, HEATER_3_MAXTEMP + LCD_MAX_TEMP_OFFSET);
#endif // HOTENDS > 3
#endif // HOTENDS > 2
#endif // HOTENDS > 1
//
// Bed
//
#if TEMP_SENSOR_BED != 0
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP + LCD_MAX_TEMP_OFFSET);
#endif
//
// Fan Speed
//
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
#if ENABLED(IDLE_OOZING_PREVENT)
MENU_ITEM_EDIT(bool, MSG_IDLEOOZING, &IDLE_OOZING_enabled);
#endif
//
// Autotemp, Min, Max, Fact
//
......@@ -1143,13 +1077,6 @@ static void lcd_control_temperature_menu() {
#endif // HOTENDS > 1
#endif // PIDTEMP
//
// Idle oozing
//
#if ENABLED(IDLE_OOZING_PREVENT)
MENU_ITEM_EDIT(bool, MSG_IDLEOOZING, &IDLE_OOZING_enabled);
#endif
//
// Preheat PLA conf
//
......@@ -2308,7 +2235,7 @@ char *ftostr52(const float &x) {
LCD_Printpos(0, 1); lcd_printPGM(PSTR(" "));
delay(5000);
enqueuecommands_P(PSTR("G28"));
lcd_goto_menu(lcd_prepare_motion_menu);
lcd_return_to_status();
}
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment