From ce1638e32f06a040645daef371dd16113bf44f0d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 27 Sep 2017 00:58:46 -0500 Subject: [PATCH] Add Babystep Z graphic overlay See PR #7593 --- .travis.yml | 3 +- Marlin/Configuration_adv.h | 2 + Marlin/src/config/default/Configuration_adv.h | 2 + .../AlephObjects/TAZ4/Configuration_adv.h | 2 + .../examples/Anet/A6/Configuration_adv.h | 2 + .../examples/Anet/A8/Configuration_adv.h | 2 + .../examples/BQ/Hephestos/Configuration_adv.h | 2 + .../BQ/Hephestos_2/Configuration_adv.h | 2 + .../examples/BQ/WITBOX/Configuration_adv.h | 2 + .../examples/Cartesio/Configuration_adv.h | 2 + .../Creality/CR-10/Configuration_adv.h | 2 + .../config/examples/Felix/Configuration_adv.h | 2 + .../Folger Tech/i3-2020/Configuration_adv.h | 2 + .../Infitary/i3-M508/Configuration_adv.h | 2 + .../examples/Malyan/M150/Configuration_adv.h | 2 + .../examples/RigidBot/Configuration_adv.h | 2 + .../config/examples/SCARA/Configuration_adv.h | 2 + .../examples/Sanguinololu/Configuration_adv.h | 2 + .../examples/TinyBoy2/Configuration_adv.h | 2 + .../Velleman/K8200/Configuration_adv.h | 2 + .../Velleman/K8400/Configuration_adv.h | 2 + .../FLSUN/auto_calibrate/Configuration_adv.h | 2 + .../FLSUN/kossel_mini/Configuration_adv.h | 2 + .../delta/generic/Configuration_adv.h | 2 + .../delta/kossel_mini/Configuration_adv.h | 2 + .../delta/kossel_pro/Configuration_adv.h | 2 + .../delta/kossel_xl/Configuration_adv.h | 2 + .../gCreate/gMax1.5+/Configuration_adv.h | 2 + .../examples/makibox/Configuration_adv.h | 2 + .../tvrrug/Round2/Configuration_adv.h | 2 + .../config/examples/wt150/Configuration_adv.h | 2 + Marlin/src/inc/SanityCheck.h | 4 + Marlin/src/lcd/dogm/dogm_bitmaps.h | 93 +++++++++++++++++++ Marlin/src/lcd/ultralcd.cpp | 46 ++++++++- 34 files changed, 204 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6c6fa6070..b462f1b2a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -348,9 +348,10 @@ script: - opt_set TEMP_SENSOR_0 1 - opt_set TEMP_SENSOR_1 5 - opt_set TEMP_SENSOR_BED 1 - - opt_enable ULTIMAKERCONTROLLER SDSUPPORT + - opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT - opt_enable FILAMENT_WIDTH_SENSOR FILAMENT_LCD_DISPLAY - opt_enable FIX_MOUNTED_PROBE Z_SAFE_HOMING AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE + - opt_enable BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET BABYSTEP_ZPROBE_GFX_OVERLAY - opt_enable PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PIDTEMPBED EEPROM_SETTINGS INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT M100_FREE_MEMORY_WATCHER - opt_enable_adv ADVANCED_PAUSE_FEATURE LCD_INFO_MENU ARC_SUPPORT BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES SDCARD_SORT_ALPHA - opt_set_adv I2C_SLAVE_ADDRESS 63 diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 8f68c5ecb..4d34003f0 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index 8f68c5ecb..4d34003f0 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index b42fd7635..1d4d4574f 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index 5ec784ac7..6c29078b7 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 1b7357944..30c9f1cdf 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index 080988b7b..a6f11a4b3 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h index 5c7fec235..503492c5a 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index 080988b7b..a6f11a4b3 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index d5daa72ca..63a3323e1 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h index 3ded52305..c54556093 100644 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -608,6 +608,8 @@ #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index cceff3fdf..e1810d7b5 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h index 15f8a65c4..263754b24 100644 --- a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h @@ -615,6 +615,8 @@ #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h index 0d242e02d..56e28dda7 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index 5f8f8e366..869dc7abe 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index b92da7347..88670a6b0 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index e8948041b..ce6cc2ab8 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index f698bd98f..77b47a76e 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -604,6 +604,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index 1de98c4e2..def52b0da 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index bb84f7b58..be1669eee 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -628,6 +628,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index aa1415ac8..7ff9f5e61 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index 08e1f748a..1b0fb0d58 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -617,6 +617,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index 500626245..9b33e1061 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -617,6 +617,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index 500626245..9b33e1061 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -617,6 +617,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h index 500626245..9b33e1061 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -617,6 +617,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h index de77f0a60..b1b8019d0 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -622,6 +622,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h index 0c1332f2e..2665192bc 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -617,6 +617,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h index 95affd91d..7c9dd6958 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -615,6 +615,8 @@ #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index 39a17d03e..0184511a1 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index b29c25386..fd3d9cabd 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index 43290877a..3e6bed313 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -615,6 +615,8 @@ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + //#define BABYSTEP_ZPROBE_GFX_REVERSE // Reverses the direction of the CW/CCW indicators #endif // @section extruder diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 2239e5477..bc8811039 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -305,6 +305,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, #error "MESH_BED_LEVELING and BABYSTEP_ZPROBE_OFFSET is not a valid combination" #elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && !HAS_BED_PROBE #error "BABYSTEP_ZPROBE_OFFSET requires a probe." + #elif ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) && !ENABLED(DOGLCD) + #error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a DOGLCD." + #elif ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) && !ENABLED(BABYSTEP_ZPROBE_OFFSET) + #error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a BABYSTEP_ZPROBE_OFFSET." #endif #endif diff --git a/Marlin/src/lcd/dogm/dogm_bitmaps.h b/Marlin/src/lcd/dogm/dogm_bitmaps.h index e020d2436..3068e6ee8 100644 --- a/Marlin/src/lcd/dogm/dogm_bitmaps.h +++ b/Marlin/src/lcd/dogm/dogm_bitmaps.h @@ -419,4 +419,97 @@ 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; #endif // Extruders + + #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) + const unsigned char cw_bmp[] PROGMEM = { //AVR-GCC, WinAVR + 0x07,0xf8,0x00, // 000001111111100000000000 + 0x0c,0x0c,0x00, // 000011000000110000000000 + 0x10,0x02,0x00, // 000100000000001000000000 + 0x20,0x01,0x00, // 001000000000000100000000 + 0x60,0x01,0x80, // 011000000000000100000000 + 0x40,0x00,0x80, // 010000000000000010000000 + 0x40,0x03,0xe0, // 010000000000001111100000 + 0x40,0x01,0xc0, // 010000000000000111000000 + 0x40,0x00,0x80, // 010000000000000010000000 + 0x40,0x00,0x00, // 010000000000000000000000 + 0x40,0x00,0x00, // 010000000000000000000000 + 0x60,0x00,0x00, // 011000000000000000000000 + 0x20,0x00,0x00, // 001000000000000000000000 + 0x10,0x00,0x00, // 000100000000000000000000 + 0x0c,0x0c,0x00, // 000011000000110000000000 + 0x07,0xf8,0x00 // 000001111111100000000000 + }; + + const unsigned char ccw_bmp[] PROGMEM = { //AVR-GCC, WinAVR + 0x01,0xfe,0x00, // 000000011111111000000000 + 0x03,0x03,0x00, // 000000110000001100000000 + 0x04,0x00,0x80, // 000001000000000010000000 + 0x08,0x00,0x40, // 000010000000000001000000 + 0x18,0x00,0x60, // 000110000000000001100000 + 0x10,0x00,0x20, // 000100000000000000100000 + 0x7c,0x00,0x20, // 011111000000000000100000 + 0x38,0x00,0x20, // 001110000000000000100000 + 0x10,0x00,0x20, // 000100000000000000100000 + 0x00,0x00,0x20, // 000000000000000000100000 + 0x00,0x00,0x20, // 000000000000000000100000 + 0x00,0x00,0x60, // 000000000000000001100000 + 0x00,0x00,0x40, // 000000000000000001000000 + 0x00,0x00,0x80, // 000000000000000010000000 + 0x03,0x03,0x00, // 000000110000001100000000 + 0x01,0xfe,0x00 // 000000011111111000000000 + }; + + + const unsigned char up_arrow_bmp[] PROGMEM = { //AVR-GCC, WinAVR + 0x06,0x00, // 000001100000 + 0x0F,0x00, // 000011110000 + 0x1F,0x80, // 000111111000 + 0x3F,0xC0, // 001111111100 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00 // 000001100000 + }; + + const unsigned char down_arrow_bmp[] PROGMEM = { //AVR-GCC, WinAVR + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x06,0x00, // 000001100000 + 0x3F,0xC0, // 001111111100 + 0x1F,0x80, // 000111111000 + 0x0F,0x00, // 000011110000 + 0x06,0x00 // 000001100000 + }; + + const unsigned char offset_bedline_bmp[] PROGMEM = { //AVR-GCC, WinAVR + 0xFF,0xFF,0xFF // 111111111111111111111111 + }; + + const unsigned char nozzle_bmp[] PROGMEM = { //AVR-GCC, WinAVR + 0x7F,0x80, // 0111111110000000 + 0xFF,0xC0, // 1111111111000000 + 0xFF,0xC0, // 1111111111000000 + 0xFF,0xC0, // 1111111111000000 + 0x7F,0x80, // 0111111110000000 + 0x7F,0x80, // 0111111110000000 + 0xFF,0xC0, // 1111111111000000 + 0xFF,0xC0, // 1111111111000000 + 0xFF,0xC0, // 1111111111000000 + 0x3F,0x00, // 0011111100000000 + 0x1E,0x00, // 0001111000000000 + 0x0C,0x00 // 0000110000000000 + }; + #endif // BABYSTEP_ZPROBE_GFX_OVERLAY + #endif // HAS_TEMP_BED diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index 4eaee2aed..34384b6e0 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -1025,6 +1025,46 @@ void kill_screen(const char* lcd_msg) { #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) + + void _lcd_babystep_zoffset_overlay(const float in_zoffset) { + // Determine whether the user is raising or lowering the nozzle. + int8_t dir = 0; + static float old_zprobe_zoffset = 0; + if (in_zoffset != old_zprobe_zoffset) { + dir = (in_zoffset > old_zprobe_zoffset) ? 1 : -1; + old_zprobe_zoffset = in_zoffset; + } + + #if ENABLED(BABYSTEP_ZPROBE_GFX_REVERSE) + const unsigned char *rot_up = ccw_bmp; + const unsigned char *rot_down = cw_bmp; + #else + const unsigned char *rot_up = cw_bmp; + const unsigned char *rot_down = ccw_bmp; + #endif + + #if ENABLED(USE_BIG_EDIT_FONT) + const int left = 0, right = 45, nozzle = 95; + #else + const int left = 5, right = 90, nozzle = 60; + #endif + + // Draw a representation of the nozzle + if (PAGE_CONTAINS(3, 16)) u8g.drawBitmapP(nozzle + 6, 4 - dir, 2, 12, nozzle_bmp); + if (PAGE_CONTAINS(20, 20)) u8g.drawBitmapP(nozzle + 0, 20, 3, 1, offset_bedline_bmp); + + // Draw cw/ccw indicator and up/down arrows. + if (PAGE_CONTAINS(47,62)) { + u8g.drawBitmapP(left + 0, 47, 3, 16, rot_down); + u8g.drawBitmapP(right + 0, 47, 3, 16, rot_up); + u8g.drawBitmapP(right + 20, 48 - dir, 2, 13, up_arrow_bmp); + u8g.drawBitmapP(left + 20, 49 - dir, 2, 13, down_arrow_bmp); + } + } + + #endif // BABYSTEP_ZPROBE_GFX_OVERLAY + void lcd_babystep_zoffset() { if (lcd_clicked) { return lcd_goto_previous_menu_no_defer(); } defer_return_to_status = true; @@ -1044,8 +1084,12 @@ void kill_screen(const char* lcd_msg) { lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; } } - if (lcdDrawUpdate) + if (lcdDrawUpdate) { lcd_implementation_drawedit(PSTR(MSG_ZPROBE_ZOFFSET), ftostr43sign(zprobe_zoffset)); + #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) + _lcd_babystep_zoffset_overlay(zprobe_zoffset); + #endif + } } #else // !BABYSTEP_ZPROBE_OFFSET