From d69c5317dfd67ec2fb1a82da582d7e4e76351d29 Mon Sep 17 00:00:00 2001 From: Marcio Teixeira Date: Thu, 31 Aug 2017 14:21:39 -0600 Subject: [PATCH] Added option for graphical overlay for Z-offset --- Marlin/Configuration_adv.h | 2 + Marlin/SanityCheck.h | 4 + Marlin/dogm_bitmaps.h | 92 +++++++++++++++++++ .../AlephObjects/TAZ4/Configuration_adv.h | 2 + .../Anet/A6/Configuration_adv.h | 2 + .../Anet/A8/Configuration_adv.h | 2 + .../BQ/Hephestos/Configuration_adv.h | 2 + .../BQ/Hephestos_2/Configuration_adv.h | 2 + .../BQ/WITBOX/Configuration_adv.h | 2 + .../Cartesio/Configuration_adv.h | 2 + .../Felix/Configuration_adv.h | 2 + .../Folger Tech/i3-2020/Configuration_adv.h | 2 + .../Infitary/i3-M508/Configuration_adv.h | 2 + .../Malyan/M150/Configuration_adv.h | 2 + .../RigidBot/Configuration_adv.h | 2 + .../SCARA/Configuration_adv.h | 2 + .../Sanguinololu/Configuration_adv.h | 2 + .../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 + .../makibox/Configuration_adv.h | 2 + .../tvrrug/Round2/Configuration_adv.h | 2 + .../wt150/Configuration_adv.h | 2 + Marlin/ultralcd.cpp | 48 +++++++++- 31 files changed, 199 insertions(+), 1 deletion(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 03f1090b7..68de5ec23 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/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/SanityCheck.h b/Marlin/SanityCheck.h index 79ced8bf8..87d5a235b 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/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/dogm_bitmaps.h b/Marlin/dogm_bitmaps.h index e020d2436..9a77ff785 100644 --- a/Marlin/dogm_bitmaps.h +++ b/Marlin/dogm_bitmaps.h @@ -419,4 +419,96 @@ 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, // 010000000000000011100000 + 0x40,0x01,0xc0, // 010000000000000011000000 + 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/example_configurations/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h index f2824f171..b23d20b82 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/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/example_configurations/Anet/A6/Configuration_adv.h b/Marlin/example_configurations/Anet/A6/Configuration_adv.h index b59c04fdd..56cb9a003 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A6/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/example_configurations/Anet/A8/Configuration_adv.h b/Marlin/example_configurations/Anet/A8/Configuration_adv.h index 3a7dd4e91..aa91f62e9 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A8/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/example_configurations/BQ/Hephestos/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h index d8fbc7d1e..c4976d6ab 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos/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/example_configurations/BQ/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h index a133a57fd..882756de3 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/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/example_configurations/BQ/WITBOX/Configuration_adv.h b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h index d8fbc7d1e..c4976d6ab 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/WITBOX/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/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index 9d595ce69..2c298b0c4 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/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/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index e28dd33c1..5c1a7f93a 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/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/example_configurations/Folger Tech/i3-2020/Configuration_adv.h b/Marlin/example_configurations/Folger Tech/i3-2020/Configuration_adv.h index b65e4cc9a..29752019f 100644 --- a/Marlin/example_configurations/Folger Tech/i3-2020/Configuration_adv.h +++ b/Marlin/example_configurations/Folger Tech/i3-2020/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/example_configurations/Infitary/i3-M508/Configuration_adv.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h index 5c6d95de9..fb70c9939 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/example_configurations/Infitary/i3-M508/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/example_configurations/Malyan/M150/Configuration_adv.h b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h index 04a49b872..05ea230b7 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h +++ b/Marlin/example_configurations/Malyan/M150/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/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index d10c0efd9..4dbad638f 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/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/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index be09da0d9..4fa0a83d5 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/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/example_configurations/Sanguinololu/Configuration_adv.h b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h index 3ec235a22..a77a41429 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h @@ -597,6 +597,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/example_configurations/TinyBoy2/Configuration_adv.h b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h index 50d2ed30b..a08e44d3a 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h +++ b/Marlin/example_configurations/TinyBoy2/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/example_configurations/Velleman/K8200/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h index b6b062db7..a02d1bd55 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h @@ -621,6 +621,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/example_configurations/Velleman/K8400/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h index af7cd2347..cd51ab39f 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8400/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/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h index dcecbba7f..2f40f6329 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -610,6 +610,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/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h index 981994c02..4ff8d44ed 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -610,6 +610,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/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 981994c02..4ff8d44ed 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -610,6 +610,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/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 981994c02..4ff8d44ed 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -610,6 +610,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/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 819979de6..368725a2c 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/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/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index 631c15ec9..6b08ea67f 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -610,6 +610,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/example_configurations/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h index da3e8cafc..fb38dc48a 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/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/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 848af29ab..feebca86b 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/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/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index c1cd7f0c7..89b08e939 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/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/example_configurations/wt150/Configuration_adv.h b/Marlin/example_configurations/wt150/Configuration_adv.h index 3b915aade..94e2afe11 100644 --- a/Marlin/example_configurations/wt150/Configuration_adv.h +++ b/Marlin/example_configurations/wt150/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/ultralcd.cpp b/Marlin/ultralcd.cpp index 353db25c5..5ffcb97e3 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -998,6 +998,48 @@ void kill_screen(const char* lcd_msg) { #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) + void _lcd_babystep_zoffset_overlay(float zprobe_zoffset) { + // Determine whether the user is raising or lowering the nozzle. + static int dir = 0; + static float old_zprobe_zoffset = 0; + if(zprobe_zoffset != old_zprobe_zoffset) { + dir = (zprobe_zoffset > old_zprobe_zoffset) ? 1 : -1; + old_zprobe_zoffset = zprobe_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; + const int right = 45; + const int nozzle = 95; + #else + const int left = 5; + const int right = 90; + const int 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; @@ -1017,8 +1059,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