diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 939a99e30..326db465e 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -349,11 +349,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define Z_ENABLE_ON 0 #define E_ENABLE_ON 0 // For all extruders -// Disables axis when it's not being used. +// Disables axis stepper immediately when it's not being used. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING // @section extruder diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 43646c6a5..ae167f9c0 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -52,7 +52,7 @@ * The maximum buffered steps/sec of the extruder motor is called "se". * Start autotemp mode with M109 S B F * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by excuting M109 without F* + * mintemp and maxtemp. Turn this off by executing M109 without F* * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode */ @@ -232,7 +232,13 @@ #define INVERT_E_STEP_PIN false // Default stepper release if idle. Set to 0 to deactivate. -#define DEFAULT_STEPPER_DEACTIVE_TIME 60 +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. +#define DEFAULT_STEPPER_DEACTIVE_TIME 120 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINTRAVELFEEDRATE 0.0 diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 328b71880..c4b6255cb 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -259,6 +259,7 @@ extern float home_offset[3]; // axis[n].home_offset extern float min_pos[3]; // axis[n].min_pos extern float max_pos[3]; // axis[n].max_pos extern bool axis_known_position[3]; // axis[n].is_known +extern bool axis_homed[3]; // axis[n].is_homed #if ENABLED(DELTA) extern float delta[3]; diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index ab4409386..23fa31907 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -245,6 +245,7 @@ static float feedrate = 1500.0, saved_feedrate; float current_position[NUM_AXIS] = { 0.0 }; static float destination[NUM_AXIS] = { 0.0 }; bool axis_known_position[3] = { false }; +bool axis_homed[3] = { false }; static long gcode_N, gcode_LastN, Stopped_gcode_LastN = 0; @@ -1280,6 +1281,8 @@ static void setup_for_endstop_move() { static void run_z_probe() { + refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out and EXTRUDER_RUNOUT_PREVENT from extruding + #if ENABLED(DELTA) float start_z = current_position[Z_AXIS]; @@ -1983,6 +1986,7 @@ static void homeaxis(AxisEnum axis) { feedrate = 0.0; endstops_hit_on_purpose(); // clear endstop hit flags axis_known_position[axis] = true; + axis_homed[axis] = true; #if ENABLED(Z_PROBE_SLED) // bring Z probe back @@ -3980,6 +3984,7 @@ inline void gcode_M109() { } idle(); + refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out #ifdef TEMP_RESIDENCY_TIME // start/restart the TEMP_RESIDENCY_TIME timer whenever we reach target temp for the first time @@ -3994,7 +3999,6 @@ inline void gcode_M109() { } LCD_MESSAGEPGM(MSG_HEATING_COMPLETE); - refresh_cmd_timeout(); print_job_start_ms = previous_cmd_ms; } @@ -4029,9 +4033,9 @@ inline void gcode_M109() { #endif } idle(); + refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out } LCD_MESSAGEPGM(MSG_BED_DONE); - refresh_cmd_timeout(); } #endif // HAS_TEMP_BED @@ -6972,16 +6976,16 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { if (stepper_inactive_time && ms > previous_cmd_ms + stepper_inactive_time && !ignore_stepper_queue && !blocks_queued()) { - #if DISABLE_X == true + #if DISABLE_INACTIVE_X == true disable_x(); #endif - #if DISABLE_Y == true + #if DISABLE_INACTIVE_Y == true disable_y(); #endif - #if DISABLE_Z == true + #if DISABLE_INACTIVE_Z == true disable_z(); #endif - #if DISABLE_E == true + #if DISABLE_INACTIVE_E == true disable_e0(); disable_e1(); disable_e2(); diff --git a/Marlin/dogm_lcd_implementation.h b/Marlin/dogm_lcd_implementation.h index 4e2cbf9ef..d1e23614b 100644 --- a/Marlin/dogm_lcd_implementation.h +++ b/Marlin/dogm_lcd_implementation.h @@ -270,7 +270,7 @@ static void _draw_heater_status(int x, int heater) { lcd_print(itostr3(int(heater >= 0 ? degHotend(heater) : degBed()) + 0.5)); lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); - if (!isHeatingHotend(0)) { + if (heater >= 0 ? !isHeatingHotend(heater) : !isHeatingBed()) { u8g.drawBox(x+7,y,2,2); } else { @@ -338,6 +338,9 @@ static void lcd_implementation_status_screen() { } // X, Y, Z-Coordinates + // Before homing the axis letters are blinking 'X' <-> '?'. + // When axis is homed but axis_known_position is false the axis letters are blinking 'X' <-> ' '. + // When everything is ok you see a constant 'X'. #define XYZ_BASELINE 38 lcd_setFont(FONT_STATUSMENU); @@ -348,32 +351,61 @@ static void lcd_implementation_status_screen() { #endif u8g.setColorIndex(0); // white on black u8g.setPrintPos(2, XYZ_BASELINE); - lcd_print('X'); + if (blink & 1) + lcd_printPGM(PSTR("X")); + else { + if (!axis_homed[X_AXIS]) + lcd_printPGM(PSTR("?")); + else + #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING) + if (!axis_known_position[X_AXIS]) + lcd_printPGM(PSTR(" ")); + else + #endif + lcd_printPGM(PSTR("X")); + } u8g.drawPixel(8, XYZ_BASELINE - 5); u8g.drawPixel(8, XYZ_BASELINE - 3); u8g.setPrintPos(10, XYZ_BASELINE); - if (axis_known_position[X_AXIS]) - lcd_print(ftostr31ns(current_position[X_AXIS])); - else - lcd_printPGM(PSTR("---")); + lcd_print(ftostr31ns(current_position[X_AXIS])); + u8g.setPrintPos(43, XYZ_BASELINE); - lcd_print('Y'); + if (blink & 1) + lcd_printPGM(PSTR("Y")); + else { + if (!axis_homed[Y_AXIS]) + lcd_printPGM(PSTR("?")); + else + #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING) + if (!axis_known_position[Y_AXIS]) + lcd_printPGM(PSTR(" ")); + else + #endif + lcd_printPGM(PSTR("Y")); + } u8g.drawPixel(49, XYZ_BASELINE - 5); u8g.drawPixel(49, XYZ_BASELINE - 3); u8g.setPrintPos(51, XYZ_BASELINE); - if (axis_known_position[Y_AXIS]) - lcd_print(ftostr31ns(current_position[Y_AXIS])); - else - lcd_printPGM(PSTR("---")); + lcd_print(ftostr31ns(current_position[Y_AXIS])); + u8g.setPrintPos(83, XYZ_BASELINE); - lcd_print('Z'); + if (blink & 1) + lcd_printPGM(PSTR("Z")); + else { + if (!axis_homed[Z_AXIS]) + lcd_printPGM(PSTR("?")); + else + #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING) + if (!axis_known_position[Z_AXIS]) + lcd_printPGM(PSTR(" ")); + else + #endif + lcd_printPGM(PSTR("Z")); + } u8g.drawPixel(89, XYZ_BASELINE - 5); u8g.drawPixel(89, XYZ_BASELINE - 3); u8g.setPrintPos(91, XYZ_BASELINE); - if (axis_known_position[Z_AXIS]) - lcd_print(ftostr32sp(current_position[Z_AXIS])); - else - lcd_printPGM(PSTR("---.--")); + lcd_print(ftostr32sp(current_position[Z_AXIS])); u8g.setColorIndex(1); // black on white // Feedrate diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 6b6df86bc..b7c9248ef 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -331,11 +331,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define Z_ENABLE_ON 0 #define E_ENABLE_ON 0 // For all extruders -// Disables axis when it's not being used. +// Disables axis stepper immediately when it's not being used. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING // @section extruder diff --git a/Marlin/example_configurations/Felix/Configuration_DUAL.h b/Marlin/example_configurations/Felix/Configuration_DUAL.h index f2b7026b7..10b73d424 100644 --- a/Marlin/example_configurations/Felix/Configuration_DUAL.h +++ b/Marlin/example_configurations/Felix/Configuration_DUAL.h @@ -315,11 +315,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define Z_ENABLE_ON 0 #define E_ENABLE_ON 0 // For all extruders -// Disables axis when it's not being used. +// Disables axis stepper immediately when it's not being used. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING #define DISABLE_E false // For all extruders #define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 6c905f361..48ea632be 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -232,7 +232,13 @@ #define INVERT_E_STEP_PIN false // Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINTRAVELFEEDRATE 0.0 diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index cec6466a7..554a31283 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -341,11 +341,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define Z_ENABLE_ON 0 #define E_ENABLE_ON 0 // For all extruders -// Disables axis when it's not being used. +// Disables axis stepper immediately when it's not being used. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING // @section extruder diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index b43b84649..9e34fb5d3 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -232,7 +232,13 @@ #define INVERT_E_STEP_PIN false // Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINTRAVELFEEDRATE 0.0 diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 598805541..3a4682e0c 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -364,11 +364,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define Z_ENABLE_ON 0 #define E_ENABLE_ON 0 // For all extruders -// Disables axis when it's not being used. +// Disables axis stepper immediately when it's not being used. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z false // not for K8200 -> looses Steps +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING // @section extruder diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index 3b86a1c2f..af00ee03f 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -237,7 +237,13 @@ #define INVERT_E_STEP_PIN false // Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINTRAVELFEEDRATE 0.0 diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 49cf9ddcf..82980be52 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -349,11 +349,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define Z_ENABLE_ON 0 #define E_ENABLE_ON 0 // For all extruders -// Disables axis when it's not being used. +// Disables axis stepper immediately when it's not being used. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING // @section extruder diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index a9b239a64..796ff64ff 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -340,11 +340,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define Z_ENABLE_ON 0 #define E_ENABLE_ON 0 // For all extruders -// Disables axis when it's not being used. +// Disables axis stepper immediately when it's not being used. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING // @section extruder diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index f311459cb..420dab07d 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -232,7 +232,13 @@ #define INVERT_E_STEP_PIN false // Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINTRAVELFEEDRATE 0.0 diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 041338c33..0021ec333 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -357,11 +357,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define Z_ENABLE_ON 0 #define E_ENABLE_ON 0 // For all extruders -// Disables axis when it's not being used. +// Disables axis stepper immediately when it's not being used. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING // @section extruder diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 3a85b0bf1..129773039 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -232,7 +232,13 @@ #define INVERT_E_STEP_PIN false // Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. #define DEFAULT_STEPPER_DEACTIVE_TIME 240 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINTRAVELFEEDRATE 0.0 diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index 5d1b2bb65..ac853742d 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -369,11 +369,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define Z_ENABLE_ON 0 #define E_ENABLE_ON 0 // For all extruders -// Disables axis when it's not being used. +// Disables axis stepper immediately when it's not being used. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING // @section extruder diff --git a/Marlin/example_configurations/TAZ4/Configuration_adv.h b/Marlin/example_configurations/TAZ4/Configuration_adv.h index 0b9d68b89..755a939dd 100644 --- a/Marlin/example_configurations/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/TAZ4/Configuration_adv.h @@ -240,7 +240,13 @@ #define INVERT_E_STEP_PIN false // Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINTRAVELFEEDRATE 0.0 diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 5c50b6863..3d43bc187 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -341,11 +341,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define Z_ENABLE_ON 0 #define E_ENABLE_ON 0 // For all extruders -// Disables axis when it's not being used. +// Disables axis stepper immediately when it's not being used. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z true +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING // @section extruder diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index 7b08b9261..f0c819c08 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -232,7 +232,13 @@ #define INVERT_E_STEP_PIN false // Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINTRAVELFEEDRATE 0.0 diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 2ef81411f..f8fb33036 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -349,11 +349,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define Z_ENABLE_ON 0 #define E_ENABLE_ON 0 // For all extruders -// Disables axis when it's not being used. +// Disables axis stepper immediately when it's not being used. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING // @section extruder diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index e764852cd..063674db6 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -384,11 +384,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define Z_ENABLE_ON 0 #define E_ENABLE_ON 0 // For all extruders -// Disables axis when it's not being used. +// Disables axis stepper immediately when it's not being used. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING // @section extruder diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h index 64c222f51..9ab22d522 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h @@ -232,7 +232,13 @@ #define INVERT_E_STEP_PIN false // Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. #define DEFAULT_STEPPER_DEACTIVE_TIME 0 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINTRAVELFEEDRATE 0.0 diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 8065dc19b..dab9d2a38 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -384,11 +384,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define Z_ENABLE_ON 0 #define E_ENABLE_ON 0 // For all extruders -// Disables axis when it's not being used. +// Disables axis stepper immediately when it's not being used. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING // @section extruder diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 8af6ca9b9..44821df32 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -232,7 +232,13 @@ #define INVERT_E_STEP_PIN false // Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINTRAVELFEEDRATE 0.0 diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index daa3f7561..dd97ef649 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -384,11 +384,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define Z_ENABLE_ON 0 #define E_ENABLE_ON 0 // For all extruders -// Disables axis when it's not being used. +// Disables axis stepper immediately when it's not being used. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING // @section extruder diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index ee4a28cb6..9649b755d 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -232,7 +232,13 @@ #define INVERT_E_STEP_PIN false // Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINTRAVELFEEDRATE 0.0 diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index f6bdcebec..531162f32 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -371,11 +371,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define Z_ENABLE_ON 0 #define E_ENABLE_ON 0 // For all extruders -// Disables axis when it's not being used. +// Disables axis stepper immediately when it's not being used. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING // @section extruder diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index d8aa176c7..24162f184 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -236,7 +236,13 @@ #define INVERT_E_STEP_PIN false // Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINTRAVELFEEDRATE 0.0 diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 15b1606c3..5faab75a4 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -352,11 +352,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define Z_ENABLE_ON 0 #define E_ENABLE_ON 0 // For all extruders -// Disables axis when it's not being used. +// Disables axis stepper immediately when it's not being used. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING // @section extruder diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index f401df23a..cc4a1c32f 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -232,7 +232,13 @@ #define INVERT_E_STEP_PIN false // Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINTRAVELFEEDRATE 0.0 diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index f2bbfead7..54bcafbbd 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -339,11 +339,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define Z_ENABLE_ON 1 #define E_ENABLE_ON 1 // For all extruders -// Disables axis when it's not being used. +// Disables axis stepper immediately when it's not being used. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING // @section extruder diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index b91c21449..333602382 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -232,7 +232,13 @@ #define INVERT_E_STEP_PIN false // Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. #define DEFAULT_STEPPER_DEACTIVE_TIME 60 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINTRAVELFEEDRATE 0.0 diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 547b0a219..2ab13cd17 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -1736,21 +1736,23 @@ void lcd_update() { } #if ENABLED(DOGLCD) // Changes due to different driver architecture of the DOGM display if (lcdDrawUpdate) { - blink++; // Variable for fan animation and alive dot + blink++; // Variable for animation and alive dot u8g.firstPage(); do { lcd_setFont(FONT_MENU); u8g.setPrintPos(125, 0); - if (blink % 2) u8g.setColorIndex(1); else u8g.setColorIndex(0); // Set color for the alive dot + if (blink & 1) u8g.setColorIndex(1); else u8g.setColorIndex(0); // Set color for the alive dot u8g.drawPixel(127, 63); // draw alive dot u8g.setColorIndex(1); // black on white (*currentMenu)(); } while (u8g.nextPage()); } #else - if (lcdDrawUpdate) + if (lcdDrawUpdate) { + blink++; // Variable for animation (*currentMenu)(); - #endif + } + #endif #if ENABLED(LCD_HAS_STATUS_INDICATORS) lcd_implementation_update_indicators(); diff --git a/Marlin/ultralcd_implementation_hitachi_HD44780.h b/Marlin/ultralcd_implementation_hitachi_HD44780.h index b159e3d1a..24b43dc99 100644 --- a/Marlin/ultralcd_implementation_hitachi_HD44780.h +++ b/Marlin/ultralcd_implementation_hitachi_HD44780.h @@ -3,14 +3,10 @@ /** * Implementation of the LCD display routines for a Hitachi HD44780 display. These are common LCD character displays. -* When selecting the Russian language, a slightly different LCD implementation is used to handle UTF8 characters. **/ -//#if DISABLED(REPRAPWORLD_KEYPAD) -// extern volatile uint8_t buttons; //the last checked buttons in a bit array. -//#else - extern volatile uint8_t buttons; //an extended version of the last checked buttons in a bit array. -//#endif +static unsigned char blink = 0; // Variable for animation +extern volatile uint8_t buttons; //an extended version of the last checked buttons in a bit array. //////////////////////////////////// // Setup button and encode mappings for each panel (into 'buttons' variable @@ -627,29 +623,61 @@ static void lcd_implementation_status_screen() { LCD_TEMP(degBed(), degTargetBed(), LCD_STR_BEDTEMP[0]); #else + // Before homing the axis letters are blinking 'X' <-> '?'. + // When axis is homed but axis_known_position is false the axis letters are blinking 'X' <-> ' '. + // When everything is ok you see a constant 'X'. + + if (blink & 1) + lcd_printPGM(PSTR("X")); + else { + if (!axis_homed[X_AXIS]) + lcd_printPGM(PSTR("?")); + else + #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING) + if (!axis_known_position[X_AXIS]) + lcd_printPGM(PSTR(" ")); + else + #endif + lcd_printPGM(PSTR("X")); + } - lcd.print('X'); - if (axis_known_position[X_AXIS]) - lcd.print(ftostr4sign(current_position[X_AXIS])); - else - lcd_printPGM(PSTR(" ---")); - - lcd_printPGM(PSTR(" Y")); - if (axis_known_position[Y_AXIS]) - lcd.print(ftostr4sign(current_position[Y_AXIS])); - else - lcd_printPGM(PSTR(" ---")); + lcd.print(ftostr4sign(current_position[X_AXIS])); + + lcd_printPGM(PSTR(" ")); + if (blink & 1) + lcd_printPGM(PSTR("Y")); + else { + if (!axis_homed[Y_AXIS]) + lcd_printPGM(PSTR("?")); + else + #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING) + if (!axis_known_position[Y_AXIS]) + lcd_printPGM(PSTR(" ")); + else + #endif + lcd_printPGM(PSTR("Y")); + } + lcd.print(ftostr4sign(current_position[Y_AXIS])); #endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0 #endif // LCD_WIDTH >= 20 lcd.setCursor(LCD_WIDTH - 8, 1); - lcd_printPGM(PSTR("Z ")); - if (axis_known_position[Z_AXIS]) - lcd.print(ftostr32sp(current_position[Z_AXIS] + 0.00001)); - else - lcd_printPGM(PSTR("---.--")); + if (blink & 1) + lcd_printPGM(PSTR("Z")); + else { + if (!axis_homed[Z_AXIS]) + lcd_printPGM(PSTR("?")); + else + #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING) + if (!axis_known_position[Z_AXIS]) + lcd_printPGM(PSTR(" ")); + else + #endif + lcd_printPGM(PSTR("Z")); + } + lcd.print(ftostr32sp(current_position[Z_AXIS] + 0.00001)); #endif // LCD_HEIGHT > 2