From 6296ab2173b50200b48a4f9c5d8d6319eb5af695 Mon Sep 17 00:00:00 2001 From: cdedwards Date: Tue, 24 Oct 2017 13:14:03 -0600 Subject: [PATCH] Add GFX overlay to UBL mesh edit (#8038) * Add GFX overlay to UBL mesh edit Fixed misplaced HAS_TEMP_BED in dogm_bitmaps.h rename _lcd_babystep_zoffset_overlay to _lcd_zoffset_overlay_gfx and move it out of BABYSTEP_ZPROBE_OFFSET to we can use it for over things. Add this function into UBL mesh edit screen. update all Configuration.h to add ENABLE_MESH_EDIT_GFX_OVERLAY * Add Sanity to UBL insanity Need to check for DOGLCD otherwise error out. --- Marlin/Configuration.h | 3 +- Marlin/src/config/default/Configuration.h | 1 + .../AlephObjects/TAZ4/Configuration.h | 1 + .../AliExpress/CL-260/Configuration.h | 1 + .../config/examples/Anet/A6/Configuration.h | 1 + .../config/examples/Anet/A8/Configuration.h | 1 + .../examples/BQ/Hephestos/Configuration.h | 1 + .../examples/BQ/Hephestos_2/Configuration.h | 1 + .../config/examples/BQ/WITBOX/Configuration.h | 1 + .../config/examples/Cartesio/Configuration.h | 1 + .../examples/Creality/CR-10/Configuration.h | 1 + .../src/config/examples/Felix/Configuration.h | 1 + .../examples/Felix/DUAL/Configuration.h | 1 + .../Folger Tech/i3-2020/Configuration.h | 1 + .../examples/Geeetech/GT2560/Configuration.h | 1 + .../Geeetech/I3_Pro_X-GT2560/Configuration.h | 1 + .../examples/Infitary/i3-M508/Configuration.h | 1 + .../examples/Malyan/M150/Configuration.h | 1 + .../Micromake/C1/basic/Configuration.h | 1 + .../Micromake/C1/enhanced/Configuration.h | 1 + .../config/examples/Mks/Sbase/Configuration.h | 1 + .../RepRapWorld/Megatronics/Configuration.h | 1 + .../config/examples/RigidBot/Configuration.h | 1 + .../src/config/examples/SCARA/Configuration.h | 1 + .../examples/Sanguinololu/Configuration.h | 1 + .../config/examples/TinyBoy2/Configuration.h | 1 + .../examples/Velleman/K8200/Configuration.h | 1 + .../examples/Velleman/K8400/Configuration.h | 1 + .../Velleman/K8400/Dual-head/Configuration.h | 1 + .../examples/adafruit/ST7565/Configuration.h | 1 + .../FLSUN/auto_calibrate/Configuration.h | 1 + .../delta/FLSUN/kossel_mini/Configuration.h | 1 + .../examples/delta/generic/Configuration.h | 1 + .../delta/kossel_mini/Configuration.h | 1 + .../examples/delta/kossel_pro/Configuration.h | 1 + .../examples/delta/kossel_xl/Configuration.h | 1 + .../examples/gCreate/gMax1.5+/Configuration.h | 1 + .../config/examples/makibox/Configuration.h | 1 + .../examples/stm32f103ret6/Configuration.h | 1 + .../examples/tvrrug/Round2/Configuration.h | 1 + .../src/config/examples/wt150/Configuration.h | 1 + Marlin/src/inc/SanityCheck.h | 4 +- Marlin/src/lcd/dogm/dogm_bitmaps.h | 184 +++++++++--------- Marlin/src/lcd/ultralcd.cpp | 81 ++++---- 44 files changed, 178 insertions(+), 134 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 7781008aca..8739e626a7 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -854,7 +854,7 @@ * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling) * A comprehensive bed leveling system combining the features and benefits * of other systems. UBL also includes integrated Mesh Generation, Mesh - * Validation and Mesh Editing systems. + * Validation and Mesh Editing systems. * * - MESH_BED_LEVELING * Probe a grid manually @@ -875,6 +875,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h index 7781008aca..20556e064d 100644 --- a/Marlin/src/config/default/Configuration.h +++ b/Marlin/src/config/default/Configuration.h @@ -875,6 +875,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h index d9d725b959..69a3c1e8ac 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h @@ -895,6 +895,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h index c85b0b01dc..4f6ac38ea3 100644 --- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h +++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h @@ -875,6 +875,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h index 2affc1ad91..c745c0f31f 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration.h @@ -994,6 +994,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h index d3fa860dd9..36d9164863 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration.h @@ -881,6 +881,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h index 709b8e0481..84e7d5a052 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h @@ -866,6 +866,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h index d79e965322..f5621c3572 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h @@ -876,6 +876,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h index 2c99bbe909..fba10b149c 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h @@ -866,6 +866,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Cartesio/Configuration.h b/Marlin/src/config/examples/Cartesio/Configuration.h index 6ebf0afdff..7b94aa253f 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration.h +++ b/Marlin/src/config/examples/Cartesio/Configuration.h @@ -874,6 +874,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h index 3b2029017d..49cb146f45 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h @@ -885,6 +885,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h index e9a09a7cb7..b86d47b58c 100644 --- a/Marlin/src/config/examples/Felix/Configuration.h +++ b/Marlin/src/config/examples/Felix/Configuration.h @@ -857,6 +857,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h index 47b7bd5bcd..397f59e8f2 100644 --- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h +++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h @@ -857,6 +857,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h index 3306873190..0d5d0ebc21 100644 --- a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h +++ b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h @@ -872,6 +872,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h index 72b4bf5d2d..11792c6356 100644 --- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h @@ -890,6 +890,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h index 7494ebb541..b571715ec4 100644 --- a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -875,6 +875,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h index fb4442d431..59d4b07f4b 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h @@ -879,6 +879,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration.h b/Marlin/src/config/examples/Malyan/M150/Configuration.h index 6f15182045..0e44acf4a7 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration.h @@ -903,6 +903,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h index a1661e5cf5..f9d6dadbd6 100644 --- a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h @@ -879,6 +879,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h index 6de13c6a1d..4e6ff500c0 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h @@ -879,6 +879,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h index 3775a46bc4..603fc568a5 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h @@ -877,6 +877,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h index 876b0ba565..57930875e7 100644 --- a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h @@ -875,6 +875,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h index 54b0baad8a..86bb17a534 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration.h +++ b/Marlin/src/config/examples/RigidBot/Configuration.h @@ -873,6 +873,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h index 9f270e06c8..f5f16c6232 100644 --- a/Marlin/src/config/examples/SCARA/Configuration.h +++ b/Marlin/src/config/examples/SCARA/Configuration.h @@ -887,6 +887,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h index 0cfe682f49..f040c6874a 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h @@ -906,6 +906,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration.h b/Marlin/src/config/examples/TinyBoy2/Configuration.h index 1ea7d07a41..edef583f37 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h @@ -931,6 +931,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h index d3e991860c..3f1d7a1ec1 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h @@ -905,6 +905,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h index 2a2bd761df..92bc153d51 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h @@ -875,6 +875,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h index f04b1b69d6..c0bdfe32e4 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -875,6 +875,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h index 90df7ea01e..41102242ff 100644 --- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h +++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h @@ -875,6 +875,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h index ebfbd4c12c..752adfa849 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -999,6 +999,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h index 2c30878dc6..72fb786a0f 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -999,6 +999,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h index 8b4d542288..d4d181d495 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration.h +++ b/Marlin/src/config/examples/delta/generic/Configuration.h @@ -986,6 +986,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h index a997293726..34d2a6c0af 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -989,6 +989,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h index 9753ea1e6d..993d8635c6 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h @@ -989,6 +989,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h index 9720fac4cf..b2088193be 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h @@ -998,6 +998,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h index a487f47549..a9c3beea57 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h @@ -889,6 +889,7 @@ * NOTE: Requires a lot of PROGMEM! */ #define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h index e1a51c5531..6522bb60f8 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -878,6 +878,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/stm32f103ret6/Configuration.h b/Marlin/src/config/examples/stm32f103ret6/Configuration.h index 474403cef3..5a2fb16966 100644 --- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h +++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h @@ -862,6 +862,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h index 12498fa705..19d25e8f42 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h @@ -870,6 +870,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/config/examples/wt150/Configuration.h b/Marlin/src/config/examples/wt150/Configuration.h index 95d99a6286..1a13d485ca 100644 --- a/Marlin/src/config/examples/wt150/Configuration.h +++ b/Marlin/src/config/examples/wt150/Configuration.h @@ -880,6 +880,7 @@ * NOTE: Requires a lot of PROGMEM! */ //#define DEBUG_LEVELING_FEATURE +//#define ENABLE_MESH_EDIT_GFX_OVERLAY // enable a graphics overly while editing the mesh from auto-level #if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 36fc2efa21..f75be67e96 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -736,7 +736,9 @@ static_assert(1 >= 0 static_assert(WITHIN(UBL_PROBE_PT_2_Y, MIN_PROBE_Y, MAX_PROBE_Y), "UBL_PROBE_PT_2_Y can't be reached by the Z probe."); static_assert(WITHIN(UBL_PROBE_PT_3_Y, MIN_PROBE_Y, MAX_PROBE_Y), "UBL_PROBE_PT_3_Y can't be reached by the Z probe."); #endif - + #if ENABLED(ENABLE_MESH_EDIT_GFX_OVERLAY) && !ENABLED(DOGLCD) + #error "ENABLE_MESH_EDIT_GFX_OVERLAY requires a DOGLCD." + #endif #elif HAS_ABL /** diff --git a/Marlin/src/lcd/dogm/dogm_bitmaps.h b/Marlin/src/lcd/dogm/dogm_bitmaps.h index 3068e6ee86..1f61f026bd 100644 --- a/Marlin/src/lcd/dogm/dogm_bitmaps.h +++ b/Marlin/src/lcd/dogm/dogm_bitmaps.h @@ -419,97 +419,95 @@ 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 +#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(ENABLE_MESH_EDIT_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 || ENABLE_MESH_EDIT_GFX_OVERLAY diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index 42feaced47..37c6a61eca 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -1057,47 +1057,47 @@ void kill_screen(const char* lcd_msg) { void lcd_babystep_y() { lcd_goto_screen(_lcd_babystep_y); babysteps_done = 0; defer_return_to_status = true; } #endif - #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(ENABLE_MESH_EDIT_GFX_OVERLAY) - #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); - } + void _lcd_zoffset_overlay_gfx(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 : (in_zoffset == 0) ? 0 : -1; + old_zprobe_zoffset = in_zoffset; } - #endif // BABYSTEP_ZPROBE_GFX_OVERLAY + #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 || ENABLE_MESH_EDIT_GFX_OVERLAY + + #if ENABLED(BABYSTEP_ZPROBE_OFFSET) void lcd_babystep_zoffset() { if (lcd_clicked) { return lcd_goto_previous_menu_no_defer(); } @@ -1121,7 +1121,7 @@ void kill_screen(const char* lcd_msg) { if (lcdDrawUpdate) { lcd_implementation_drawedit(PSTR(MSG_ZPROBE_ZOFFSET), ftostr43sign(zprobe_zoffset)); #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) - _lcd_babystep_zoffset_overlay(zprobe_zoffset); + _lcd_zoffset_overlay_gfx(zprobe_zoffset); #endif } } @@ -1158,6 +1158,9 @@ void kill_screen(const char* lcd_msg) { if (lcdDrawUpdate) lcd_implementation_drawedit(msg, ftostr43sign(mesh_edit_value)); + #if ENABLED(ENABLE_MESH_EDIT_GFX_OVERLAY) + _lcd_zoffset_overlay_gfx(mesh_edit_value); + #endif } void _lcd_mesh_edit_NOP() {