Browse Source

Merge pull request #7071 from thinkyhead/bf_cleanups_fixes

Fix status message, apply #7058
Scott Lahteine 8 years ago
parent
commit
43a95ae5ad
32 changed files with 66 additions and 39 deletions
  1. 2
    1
      .travis.yml
  2. 1
    0
      Marlin/Configuration_adv.h
  3. 8
    8
      Marlin/Marlin_main.cpp
  4. 2
    0
      Marlin/SanityCheck.h
  5. 1
    0
      Marlin/example_configurations/Cartesio/Configuration_adv.h
  6. 1
    0
      Marlin/example_configurations/Felix/Configuration_adv.h
  7. 1
    0
      Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h
  8. 1
    0
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  9. 1
    0
      Marlin/example_configurations/Hephestos_2/Configuration_adv.h
  10. 1
    0
      Marlin/example_configurations/K8200/Configuration_adv.h
  11. 1
    0
      Marlin/example_configurations/K8400/Configuration_adv.h
  12. 1
    0
      Marlin/example_configurations/M150/Configuration_adv.h
  13. 1
    0
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  14. 1
    0
      Marlin/example_configurations/SCARA/Configuration_adv.h
  15. 1
    0
      Marlin/example_configurations/TAZ4/Configuration_adv.h
  16. 1
    0
      Marlin/example_configurations/TinyBoy2/Configuration_adv.h
  17. 1
    0
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  18. 1
    0
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h
  19. 1
    0
      Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h
  20. 1
    0
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  21. 1
    0
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  22. 1
    0
      Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h
  23. 1
    0
      Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h
  24. 1
    0
      Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h
  25. 1
    0
      Marlin/example_configurations/makibox/Configuration_adv.h
  26. 1
    0
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  27. 1
    0
      Marlin/example_configurations/wt150/Configuration_adv.h
  28. 3
    3
      Marlin/language_en.h
  29. 13
    12
      Marlin/ubl.cpp
  30. 1
    1
      Marlin/ubl_G29.cpp
  31. 10
    11
      Marlin/ultralcd.cpp
  32. 3
    3
      Marlin/ultralcd_impl_DOGM.h

+ 2
- 1
.travis.yml View File

245
   - opt_set_adv SDSORT_CACHE_NAMES true
245
   - opt_set_adv SDSORT_CACHE_NAMES true
246
   - build_marlin
246
   - build_marlin
247
   #
247
   #
248
-  # REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
248
+  # REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER with SDCARD_SORT_ALPHA and STATUS_MESSAGE_SCROLLING
249
   #
249
   #
250
   - restore_configs
250
   - restore_configs
251
   - opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT
251
   - opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT
252
+  - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING
252
   - build_marlin
253
   - build_marlin
253
   #
254
   #
254
   # REPRAPWORLD_KEYPAD
255
   # REPRAPWORLD_KEYPAD

+ 1
- 0
Marlin/Configuration_adv.h View File

807
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
807
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
808
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
808
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
809
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
809
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
810
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
810
 #endif
811
 #endif
811
 
812
 
812
 // @section tmc
813
 // @section tmc

+ 8
- 8
Marlin/Marlin_main.cpp View File

9265
    */
9265
    */
9266
   inline void gcode_M600() {
9266
   inline void gcode_M600() {
9267
 
9267
 
9268
-    // Don't allow filament change without homing first
9269
-    if (axis_unhomed_error()) {
9270
-        home_all_axes();
9271
-    }
9268
+    #if ENABLED(HOME_BEFORE_FILAMENT_CHANGE)
9269
+      // Don't allow filament change without homing first
9270
+      if (axis_unhomed_error()) home_all_axes();
9271
+    #endif
9272
 
9272
 
9273
     // Initial retract before move to filament change position
9273
     // Initial retract before move to filament change position
9274
     const float retract = parser.seen('E') ? parser.value_axis_units(E_AXIS) : 0
9274
     const float retract = parser.seen('E') ? parser.value_axis_units(E_AXIS) : 0
12702
 
12702
 
12703
   // Check startup - does nothing if bootloader sets MCUSR to 0
12703
   // Check startup - does nothing if bootloader sets MCUSR to 0
12704
   byte mcu = MCUSR;
12704
   byte mcu = MCUSR;
12705
-  if (mcu & 1) SERIAL_ECHOLNPGM(MSG_POWERUP);
12706
-  if (mcu & 2) SERIAL_ECHOLNPGM(MSG_EXTERNAL_RESET);
12707
-  if (mcu & 4) SERIAL_ECHOLNPGM(MSG_BROWNOUT_RESET);
12708
-  if (mcu & 8) SERIAL_ECHOLNPGM(MSG_WATCHDOG_RESET);
12705
+  if (mcu &  1) SERIAL_ECHOLNPGM(MSG_POWERUP);
12706
+  if (mcu &  2) SERIAL_ECHOLNPGM(MSG_EXTERNAL_RESET);
12707
+  if (mcu &  4) SERIAL_ECHOLNPGM(MSG_BROWNOUT_RESET);
12708
+  if (mcu &  8) SERIAL_ECHOLNPGM(MSG_WATCHDOG_RESET);
12709
   if (mcu & 32) SERIAL_ECHOLNPGM(MSG_SOFTWARE_RESET);
12709
   if (mcu & 32) SERIAL_ECHOLNPGM(MSG_SOFTWARE_RESET);
12710
   MCUSR = 0;
12710
   MCUSR = 0;
12711
 
12711
 

+ 2
- 0
Marlin/SanityCheck.h View File

321
     #error "EXTRUDER_RUNOUT_PREVENT is incompatible with ADVANCED_PAUSE_FEATURE."
321
     #error "EXTRUDER_RUNOUT_PREVENT is incompatible with ADVANCED_PAUSE_FEATURE."
322
   #elif ENABLED(PARK_HEAD_ON_PAUSE) && DISABLED(SDSUPPORT) && DISABLED(NEWPANEL) && DISABLED(EMERGENCY_PARSER)
322
   #elif ENABLED(PARK_HEAD_ON_PAUSE) && DISABLED(SDSUPPORT) && DISABLED(NEWPANEL) && DISABLED(EMERGENCY_PARSER)
323
     #error "PARK_HEAD_ON_PAUSE requires SDSUPPORT, EMERGENCY_PARSER, or an LCD controller."
323
     #error "PARK_HEAD_ON_PAUSE requires SDSUPPORT, EMERGENCY_PARSER, or an LCD controller."
324
+  #elif ENABLED(HOME_BEFORE_FILAMENT_CHANGE) && DISABLED(PAUSE_PARK_NO_STEPPER_TIMEOUT)
325
+    #error "HOME_BEFORE_FILAMENT_CHANGE requires PAUSE_PARK_NO_STEPPER_TIMEOUT"
324
   #endif
326
   #endif
325
 #endif
327
 #endif
326
 
328
 

+ 1
- 0
Marlin/example_configurations/Cartesio/Configuration_adv.h View File

800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
803
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
803
 #endif
804
 #endif
804
 
805
 
805
 // @section tmc
806
 // @section tmc

+ 1
- 0
Marlin/example_configurations/Felix/Configuration_adv.h View File

800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
803
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
803
 #endif
804
 #endif
804
 
805
 
805
 // @section tmc
806
 // @section tmc

+ 1
- 0
Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h View File

809
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
809
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
810
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
810
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
811
   #define PARK_HEAD_ON_PAUSE                  // Go to filament change position on pause, return to print position on resume
811
   #define PARK_HEAD_ON_PAUSE                  // Go to filament change position on pause, return to print position on resume
812
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
812
 #endif
813
 #endif
813
 
814
 
814
 // @section tmc
815
 // @section tmc

+ 1
- 0
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
803
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
803
 #endif
804
 #endif
804
 
805
 
805
 // @section tmc
806
 // @section tmc

+ 1
- 0
Marlin/example_configurations/Hephestos_2/Configuration_adv.h View File

783
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
783
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
784
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
784
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
785
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
785
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
786
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
786
 #endif
787
 #endif
787
 
788
 
788
 // @section tmc
789
 // @section tmc

+ 1
- 0
Marlin/example_configurations/K8200/Configuration_adv.h View File

813
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
813
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
814
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
814
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
815
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
815
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
816
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
816
 #endif
817
 #endif
817
 
818
 
818
 // @section tmc
819
 // @section tmc

+ 1
- 0
Marlin/example_configurations/K8400/Configuration_adv.h View File

800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
803
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
803
 #endif
804
 #endif
804
 
805
 
805
 // @section tmc
806
 // @section tmc

+ 1
- 0
Marlin/example_configurations/M150/Configuration_adv.h View File

807
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
807
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
808
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
808
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
809
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
809
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
810
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
810
 #endif
811
 #endif
811
 
812
 
812
 // @section tmc
813
 // @section tmc

+ 1
- 0
Marlin/example_configurations/RigidBot/Configuration_adv.h View File

800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
803
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
803
 #endif
804
 #endif
804
 
805
 
805
 // @section tmc
806
 // @section tmc

+ 1
- 0
Marlin/example_configurations/SCARA/Configuration_adv.h View File

800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
803
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
803
 #endif
804
 #endif
804
 
805
 
805
 // @section tmc
806
 // @section tmc

+ 1
- 0
Marlin/example_configurations/TAZ4/Configuration_adv.h View File

800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
803
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
803
 #endif
804
 #endif
804
 
805
 
805
 // @section tmc
806
 // @section tmc

+ 1
- 0
Marlin/example_configurations/TinyBoy2/Configuration_adv.h View File

803
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
803
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
804
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
804
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
805
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
805
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
806
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
806
 #endif
807
 #endif
807
 
808
 
808
 // @section tmc
809
 // @section tmc

+ 1
- 0
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
803
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
803
 #endif
804
 #endif
804
 
805
 
805
 // @section tmc
806
 // @section tmc

+ 1
- 0
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h View File

805
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
805
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
806
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
806
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
807
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
807
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
808
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
808
 #endif
809
 #endif
809
 
810
 
810
 // @section tmc
811
 // @section tmc

+ 1
- 0
Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h View File

804
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
804
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
805
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
805
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
806
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
806
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
807
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
807
 #endif
808
 #endif
808
 
809
 
809
 // @section tmc
810
 // @section tmc

+ 1
- 0
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

802
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
802
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
803
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
803
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
804
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
804
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
805
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
805
 #endif
806
 #endif
806
 
807
 
807
 // @section tmc
808
 // @section tmc

+ 1
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

802
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
802
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
803
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
803
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
804
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
804
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
805
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
805
 #endif
806
 #endif
806
 
807
 
807
 // @section tmc
808
 // @section tmc

+ 1
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h View File

807
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
807
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
808
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
808
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
809
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
809
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
810
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
810
 #endif
811
 #endif
811
 
812
 
812
 // @section tmc
813
 // @section tmc

+ 1
- 0
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h View File

802
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
802
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
803
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
803
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
804
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
804
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
805
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
805
 #endif
806
 #endif
806
 
807
 
807
 // @section tmc
808
 // @section tmc

+ 1
- 0
Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h View File

809
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
809
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
810
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
810
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
811
   #define PARK_HEAD_ON_PAUSE                  // Go to filament change position on pause, return to print position on resume
811
   #define PARK_HEAD_ON_PAUSE                  // Go to filament change position on pause, return to print position on resume
812
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
812
 #endif
813
 #endif
813
 
814
 
814
 // @section tmc
815
 // @section tmc

+ 1
- 0
Marlin/example_configurations/makibox/Configuration_adv.h View File

800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
803
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
803
 #endif
804
 #endif
804
 
805
 
805
 // @section tmc
806
 // @section tmc

+ 1
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
800
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
801
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
802
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
803
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
803
 #endif
804
 #endif
804
 
805
 
805
 // @section tmc
806
 // @section tmc

+ 1
- 0
Marlin/example_configurations/wt150/Configuration_adv.h View File

803
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
803
   #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable to have stepper motors hold position during filament change
804
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
804
                                               // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
805
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
805
   //#define PARK_HEAD_ON_PAUSE                // Go to filament change position on pause, return to print position on resume
806
+  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
806
 #endif
807
 #endif
807
 
808
 
808
 // @section tmc
809
 // @section tmc

+ 3
- 3
Marlin/language_en.h View File

280
 #ifndef MSG_UBL_OUTPUT_MAP_CSV
280
 #ifndef MSG_UBL_OUTPUT_MAP_CSV
281
   #define MSG_UBL_OUTPUT_MAP_CSV              _UxGT("Output for CSV")
281
   #define MSG_UBL_OUTPUT_MAP_CSV              _UxGT("Output for CSV")
282
 #endif
282
 #endif
283
-  #ifndef MSG_UBL_OUTPUT_MAP_BACKUP
284
-    #define MSG_UBL_OUTPUT_MAP_BACKUP         _UxGT("Off Printer Backup")
285
-  #endif
283
+#ifndef MSG_UBL_OUTPUT_MAP_BACKUP
284
+  #define MSG_UBL_OUTPUT_MAP_BACKUP           _UxGT("Off Printer Backup")
285
+#endif
286
 #ifndef MSG_UBL_INFO_UBL
286
 #ifndef MSG_UBL_INFO_UBL
287
   #define MSG_UBL_INFO_UBL                    _UxGT("Output UBL Info")
287
   #define MSG_UBL_INFO_UBL                    _UxGT("Output UBL Info")
288
 #endif
288
 #endif

+ 13
- 12
Marlin/ubl.cpp View File

115
   void unified_bed_leveling::display_map(const int map_type) {
115
   void unified_bed_leveling::display_map(const int map_type) {
116
     constexpr uint8_t spaces = 8 * (GRID_MAX_POINTS_X - 2);
116
     constexpr uint8_t spaces = 8 * (GRID_MAX_POINTS_X - 2);
117
 
117
 
118
+    SERIAL_PROTOCOLPGM("\nBed Topography Report");
118
     if (map_type == 0) {
119
     if (map_type == 0) {
119
-      SERIAL_PROTOCOLLNPGM("\nBed Topography Report:\n");
120
+      SERIAL_PROTOCOLPGM(":\n\n");
120
       serial_echo_xy(0, GRID_MAX_POINTS_Y - 1);
121
       serial_echo_xy(0, GRID_MAX_POINTS_Y - 1);
121
       SERIAL_ECHO_SP(spaces + 3);
122
       SERIAL_ECHO_SP(spaces + 3);
122
       serial_echo_xy(GRID_MAX_POINTS_X - 1, GRID_MAX_POINTS_Y - 1);
123
       serial_echo_xy(GRID_MAX_POINTS_X - 1, GRID_MAX_POINTS_Y - 1);
126
       serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MAX_Y);
127
       serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MAX_Y);
127
       SERIAL_EOL();
128
       SERIAL_EOL();
128
     }
129
     }
129
-
130
-    if (map_type == 1) { SERIAL_PROTOCOLLNPGM("\nBed Topography Report for CSV:"); SERIAL_EOL(); }
131
-    if (map_type == 2) { SERIAL_PROTOCOLLNPGM("\nBed Topography Report for LCD:"); SERIAL_EOL(); }
130
+    else {
131
+      SERIAL_PROTOCOLPGM(" for ");
132
+      serialprintPGM(map_type == 1 ? PSTR("CSV:\n\n") : PSTR("LCD:\n\n"));
133
+    }
132
 
134
 
133
     const float current_xi = get_cell_index_x(current_position[X_AXIS] + (MESH_X_DIST) / 2.0),
135
     const float current_xi = get_cell_index_x(current_position[X_AXIS] + (MESH_X_DIST) / 2.0),
134
                 current_yi = get_cell_index_y(current_position[Y_AXIS] + (MESH_Y_DIST) / 2.0);
136
                 current_yi = get_cell_index_y(current_position[Y_AXIS] + (MESH_Y_DIST) / 2.0);
142
 
144
 
143
         const float f = z_values[i][j];
145
         const float f = z_values[i][j];
144
         if (isnan(f)) {
146
         if (isnan(f)) {
145
-          serialprintPGM((map_type == 0) ? PSTR("    .   ") : PSTR("NAN"));
147
+          serialprintPGM(map_type == 0 ? PSTR("    .   ") : PSTR("NAN"));
146
         }
148
         }
147
-        else {
149
+        else if (map_type <= 1) {
148
           // if we don't do this, the columns won't line up nicely
150
           // if we don't do this, the columns won't line up nicely
149
-          if ((map_type == 0) && f >= 0.0) SERIAL_CHAR(' ');
150
-          if (map_type <= 1) SERIAL_PROTOCOL_F(f, 3);
151
-          idle();
151
+          if (map_type == 0 && f >= 0.0) SERIAL_CHAR(' ');
152
+          SERIAL_PROTOCOL_F(f, 3);
152
         }
153
         }
154
+        idle();
153
         if (map_type == 1 && i < GRID_MAX_POINTS_X - 1) SERIAL_CHAR(',');
155
         if (map_type == 1 && i < GRID_MAX_POINTS_X - 1) SERIAL_CHAR(',');
154
 
156
 
155
         #if TX_BUFFER_SIZE > 0
157
         #if TX_BUFFER_SIZE > 0
162
         }
164
         }
163
       }
165
       }
164
       SERIAL_EOL();
166
       SERIAL_EOL();
165
-      if (j && (map_type == 0)) { // we want the (0,0) up tight against the block of numbers
167
+      if (j && map_type == 0) { // we want the (0,0) up tight against the block of numbers
166
         SERIAL_CHAR(' ');
168
         SERIAL_CHAR(' ');
167
         SERIAL_EOL();
169
         SERIAL_EOL();
168
       }
170
       }
183
   bool unified_bed_leveling::sanity_check() {
185
   bool unified_bed_leveling::sanity_check() {
184
     uint8_t error_flag = 0;
186
     uint8_t error_flag = 0;
185
 
187
 
186
-    const int a = settings.calc_num_meshes();
187
-    if (a < 1) {
188
+    if (settings.calc_num_meshes() < 1) {
188
       SERIAL_PROTOCOLLNPGM("?Insufficient EEPROM storage for a mesh of this size.");
189
       SERIAL_PROTOCOLLNPGM("?Insufficient EEPROM storage for a mesh of this size.");
189
       error_flag++;
190
       error_flag++;
190
     }
191
     }

+ 1
- 1
Marlin/ubl_G29.cpp View File

1576
 
1576
 
1577
       if (ubl_lcd_map_control) {
1577
       if (ubl_lcd_map_control) {
1578
         #if ENABLED(DOGLCD)
1578
         #if ENABLED(DOGLCD)
1579
-        lcd_goto_screen(_lcd_ubl_output_map_lcd);
1579
+          lcd_goto_screen(_lcd_ubl_output_map_lcd);
1580
         #endif
1580
         #endif
1581
       }
1581
       }
1582
       else lcd_return_to_status();
1582
       else lcd_return_to_status();

+ 10
- 11
Marlin/ultralcd.cpp View File

2094
       /*********************************************************/
2094
       /*********************************************************/
2095
       /************ Scale the box pixels appropriately *********/
2095
       /************ Scale the box pixels appropriately *********/
2096
       /*********************************************************/
2096
       /*********************************************************/
2097
-      x_map_pixels = ((MAP_MAX_PIXELS_X - 4) / GRID_MAX_POINTS_X) * GRID_MAX_POINTS_X;
2098
-      y_map_pixels = ((MAP_MAX_PIXELS_Y - 4) / GRID_MAX_POINTS_Y) * GRID_MAX_POINTS_Y;
2097
+      x_map_pixels = ((MAP_MAX_PIXELS_X - 4) / (GRID_MAX_POINTS_X)) * (GRID_MAX_POINTS_X);
2098
+      y_map_pixels = ((MAP_MAX_PIXELS_Y - 4) / (GRID_MAX_POINTS_Y)) * (GRID_MAX_POINTS_Y);
2099
 
2099
 
2100
-      pixels_per_X_mesh_pnt = x_map_pixels / GRID_MAX_POINTS_X;
2101
-      pixels_per_Y_mesh_pnt = y_map_pixels / GRID_MAX_POINTS_Y;
2100
+      pixels_per_X_mesh_pnt = x_map_pixels / (GRID_MAX_POINTS_X);
2101
+      pixels_per_Y_mesh_pnt = y_map_pixels / (GRID_MAX_POINTS_Y);
2102
 
2102
 
2103
       x_offset = MAP_UPPER_LEFT_CORNER_X + 1 + (MAP_MAX_PIXELS_X - x_map_pixels - 2) / 2;
2103
       x_offset = MAP_UPPER_LEFT_CORNER_X + 1 + (MAP_MAX_PIXELS_X - x_map_pixels - 2) / 2;
2104
       y_offset = MAP_UPPER_LEFT_CORNER_Y + 1 + (MAP_MAX_PIXELS_Y - y_map_pixels - 2) / 2;
2104
       y_offset = MAP_UPPER_LEFT_CORNER_Y + 1 + (MAP_MAX_PIXELS_Y - y_map_pixels - 2) / 2;
2184
     void sync_plan_position();
2184
     void sync_plan_position();
2185
 
2185
 
2186
     void _lcd_ubl_output_map_lcd() {
2186
     void _lcd_ubl_output_map_lcd() {
2187
-      static int step_scaler=0;
2187
+      static int16_t step_scaler = 0;
2188
       int32_t signed_enc_pos;
2188
       int32_t signed_enc_pos;
2189
 
2189
 
2190
       defer_return_to_status = true;
2190
       defer_return_to_status = true;
2194
         if (lcd_clicked) { return _lcd_ubl_map_lcd_edit_cmd(); }
2194
         if (lcd_clicked) { return _lcd_ubl_map_lcd_edit_cmd(); }
2195
         ENCODER_DIRECTION_NORMAL();
2195
         ENCODER_DIRECTION_NORMAL();
2196
 
2196
 
2197
-        if (encoderPosition != 0) {
2197
+        if (encoderPosition) {
2198
           signed_enc_pos = (int32_t)encoderPosition;
2198
           signed_enc_pos = (int32_t)encoderPosition;
2199
           step_scaler += signed_enc_pos;
2199
           step_scaler += signed_enc_pos;
2200
-          x_plot = (x_plot + step_scaler / ENCODER_STEPS_PER_MENU_ITEM);
2201
-
2200
+          x_plot += step_scaler / (ENCODER_STEPS_PER_MENU_ITEM);
2202
           if (abs(step_scaler) >= ENCODER_STEPS_PER_MENU_ITEM)
2201
           if (abs(step_scaler) >= ENCODER_STEPS_PER_MENU_ITEM)
2203
             step_scaler = 0;
2202
             step_scaler = 0;
2204
           refresh_cmd_timeout();
2203
           refresh_cmd_timeout();
2240
 
2239
 
2241
           ubl_map_move_to_xy(); // Move to current location
2240
           ubl_map_move_to_xy(); // Move to current location
2242
 
2241
 
2243
-          if (planner.movesplanned()>1) { // if the nozzle is moving, cancel the move.  There is a new location
2242
+          if (planner.movesplanned() > 1) { // if the nozzle is moving, cancel the move.  There is a new location
2244
             #define ENABLE_STEPPER_DRIVER_INTERRUPT()  SBI(TIMSK1, OCIE1A)
2243
             #define ENABLE_STEPPER_DRIVER_INTERRUPT()  SBI(TIMSK1, OCIE1A)
2245
             #define DISABLE_STEPPER_DRIVER_INTERRUPT() CBI(TIMSK1, OCIE1A)
2244
             #define DISABLE_STEPPER_DRIVER_INTERRUPT() CBI(TIMSK1, OCIE1A)
2246
             DISABLE_STEPPER_DRIVER_INTERRUPT();
2245
             DISABLE_STEPPER_DRIVER_INTERRUPT();
4393
     // pad with spaces to fill up the line
4392
     // pad with spaces to fill up the line
4394
     while (j++ < LCD_WIDTH) lcd_status_message[i++] = ' ';
4393
     while (j++ < LCD_WIDTH) lcd_status_message[i++] = ' ';
4395
     // chop off at the edge
4394
     // chop off at the edge
4396
-    lcd_status_message[--i] = '\0';
4395
+    lcd_status_message[i] = '\0';
4397
   }
4396
   }
4398
 }
4397
 }
4399
 
4398
 
4400
-void lcd_finishstatus(bool persist=false) {
4399
+void lcd_finishstatus(const bool persist=false) {
4401
 
4400
 
4402
   pad_message_string();
4401
   pad_message_string();
4403
 
4402
 

+ 3
- 3
Marlin/ultralcd_impl_DOGM.h View File

408
   }
408
   }
409
 }
409
 }
410
 
410
 
411
-inline void lcd_implementation_status_message() {
411
+inline void lcd_implementation_status_message(const bool blink) {
412
   #if ENABLED(STATUS_MESSAGE_SCROLLING)
412
   #if ENABLED(STATUS_MESSAGE_SCROLLING)
413
     static bool last_blink = false;
413
     static bool last_blink = false;
414
     const uint8_t slen = lcd_strlen(lcd_status_message);
414
     const uint8_t slen = lcd_strlen(lcd_status_message);
693
 
693
 
694
     #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
694
     #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
695
       if (PENDING(millis(), previous_lcd_status_ms + 5000UL)) {  //Display both Status message line and Filament display on the last line
695
       if (PENDING(millis(), previous_lcd_status_ms + 5000UL)) {  //Display both Status message line and Filament display on the last line
696
-        lcd_implementation_status_message();
696
+        lcd_implementation_status_message(blink);
697
       }
697
       }
698
       else {
698
       else {
699
         lcd_printPGM(PSTR(LCD_STR_FILAM_DIA));
699
         lcd_printPGM(PSTR(LCD_STR_FILAM_DIA));
705
         u8g.print('%');
705
         u8g.print('%');
706
       }
706
       }
707
     #else
707
     #else
708
-      lcd_implementation_status_message();
708
+      lcd_implementation_status_message(blink);
709
     #endif
709
     #endif
710
   }
710
   }
711
 }
711
 }

Loading…
Cancel
Save