From 9a423e9a891381b41ca31f0dd04b39002f99c7e2 Mon Sep 17 00:00:00 2001 From: Bob-the-Kuhn Date: Tue, 13 Feb 2018 21:59:18 -0600 Subject: [PATCH 01/46] tested --- .../dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp | 67 ++++++++++--------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp index bdab2efa8..bc1e8bc16 100644 --- a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp +++ b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp @@ -24,6 +24,7 @@ // file u8g_dev_st7920_128x64_HAL.cpp for the HAL version. #include "../../inc/MarlinConfig.h" +#include #if ENABLED(U8GLIB_ST7920) @@ -40,8 +41,6 @@ #define LCD_PIXEL_WIDTH 128 #define LCD_PIXEL_HEIGHT 64 -#include - //set optimization so ARDUINO optimizes this file #pragma GCC optimize (3) @@ -84,29 +83,35 @@ #define ST7920_DELAY_3 CPU_ST7920_DELAY_3 #endif +#define ST7920_SND_BIT \ + WRITE(ST7920_CLK_PIN, LOW); ST7920_DELAY_1; \ + WRITE(ST7920_DAT_PIN, val & 0x80); ST7920_DELAY_2; \ + WRITE(ST7920_CLK_PIN, HIGH); ST7920_DELAY_3; \ + val <<= 1 + +static void ST7920_SWSPI_SND_8BIT(uint8_t val) { + ST7920_SND_BIT; // 1 + ST7920_SND_BIT; // 2 + ST7920_SND_BIT; // 3 + ST7920_SND_BIT; // 4 + ST7920_SND_BIT; // 5 + ST7920_SND_BIT; // 6 + ST7920_SND_BIT; // 7 + ST7920_SND_BIT; // 8 +} + #if defined(DOGM_SPI_DELAY_US) && DOGM_SPI_DELAY_US > 0 #define U8G_DELAY() delayMicroseconds(DOGM_SPI_DELAY_US) #else #define U8G_DELAY() u8g_10MicroDelay() #endif -static void ST7920_WRITE_BYTE(uint8_t val) { - for (uint8_t i = 0; i < 8; i++) { - WRITE(ST7920_DAT_PIN, val & 0x80); - WRITE(ST7920_CLK_PIN, HIGH); - WRITE(ST7920_CLK_PIN, LOW); - val <<= 1; - } -} - -#define ST7920_SET_CMD() { ST7920_WRITE_BYTE(0xF8); U8G_DELAY(); } -#define ST7920_SET_DAT() { ST7920_WRITE_BYTE(0xFA); U8G_DELAY(); } -#define ST7920_WRITE_NIBBLES(a) { ST7920_WRITE_BYTE((uint8_t)((a)&0xF0u)); ST7920_WRITE_BYTE((uint8_t)((a)<<4u)); U8G_DELAY(); } -#define ST7920_WRITE_NIBBLES_P(p,l) { for (uint8_t i = l + 1; --i;) { ST7920_WRITE_BYTE(*p&0xF0); ST7920_WRITE_BYTE(*p<<4); p++; } U8G_DELAY(); } - - #define ST7920_CS() { WRITE(ST7920_CS_PIN,1); U8G_DELAY(); } #define ST7920_NCS() { WRITE(ST7920_CS_PIN,0); } +#define ST7920_SET_CMD() { ST7920_SWSPI_SND_8BIT(0xF8); U8G_DELAY(); } +#define ST7920_SET_DAT() { ST7920_SWSPI_SND_8BIT(0xFA); U8G_DELAY(); } +#define ST7920_WRITE_BYTE(a) { ST7920_SWSPI_SND_8BIT((uint8_t)((a)&0xF0u)); ST7920_SWSPI_SND_8BIT((uint8_t)((a)<<4u)); U8G_DELAY(); } +#define ST7920_WRITE_BYTES(p,l) { for (uint8_t i = l + 1; --i;) { ST7920_SWSPI_SND_8BIT(*p&0xF0); ST7920_SWSPI_SND_8BIT(*p<<4); p++; } U8G_DELAY(); } uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) { uint8_t i, y; @@ -114,26 +119,24 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo case U8G_DEV_MSG_INIT: { OUT_WRITE(ST7920_CS_PIN, LOW); OUT_WRITE(ST7920_DAT_PIN, LOW); - OUT_WRITE(ST7920_CLK_PIN, LOW); + OUT_WRITE(ST7920_CLK_PIN, HIGH); ST7920_CS(); u8g_Delay(120); //initial delay for boot up ST7920_SET_CMD(); - ST7920_WRITE_NIBBLES(0x08); //display off, cursor+blink off - ST7920_WRITE_NIBBLES(0x01); //clear CGRAM ram + ST7920_WRITE_BYTE(0x08); //display off, cursor+blink off + ST7920_WRITE_BYTE(0x01); //clear CGRAM ram u8g_Delay(15); //delay for CGRAM clear - ST7920_WRITE_NIBBLES(0x3E); //extended mode + GDRAM active + ST7920_WRITE_BYTE(0x3E); //extended mode + GDRAM active for (y = 0; y < (LCD_PIXEL_HEIGHT) / 2; y++) { //clear GDRAM - ST7920_WRITE_NIBBLES(0x80 | y); //set y - ST7920_WRITE_NIBBLES(0x80); //set x = 0 + ST7920_WRITE_BYTE(0x80 | y); //set y + ST7920_WRITE_BYTE(0x80); //set x = 0 ST7920_SET_DAT(); for (i = 0; i < 2 * (LCD_PIXEL_WIDTH) / 8; i++) //2x width clears both segments - ST7920_WRITE_NIBBLES(0); + ST7920_WRITE_BYTE(0); ST7920_SET_CMD(); } - - ST7920_WRITE_NIBBLES(0x0C); //display on, cursor+blink off - + ST7920_WRITE_BYTE(0x0C); //display on, cursor+blink off ST7920_NCS(); } break; @@ -150,15 +153,15 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo for (i = 0; i < PAGE_HEIGHT; i ++) { ST7920_SET_CMD(); if (y < 32) { - ST7920_WRITE_NIBBLES(0x80 | y); //y - ST7920_WRITE_NIBBLES(0x80); //x=0 + ST7920_WRITE_BYTE(0x80 | y); //y + ST7920_WRITE_BYTE(0x80); //x=0 } else { - ST7920_WRITE_NIBBLES(0x80 | (y - 32)); //y - ST7920_WRITE_NIBBLES(0x80 | 8); //x=64 + ST7920_WRITE_BYTE(0x80 | (y - 32)); //y + ST7920_WRITE_BYTE(0x80 | 8); //x=64 } ST7920_SET_DAT(); - ST7920_WRITE_NIBBLES_P(ptr, (LCD_PIXEL_WIDTH) / 8); //ptr is incremented inside of macro + ST7920_WRITE_BYTES(ptr, (LCD_PIXEL_WIDTH) / 8); //ptr is incremented inside of macro y++; } ST7920_NCS(); From 2ec65051fd0cb7a64de20a0318c99cb08c24b54d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 13 Feb 2018 22:40:56 -0600 Subject: [PATCH 02/46] Fix serial comment sp. --- Marlin/Configuration.h | 2 +- Marlin/src/config/default/Configuration.h | 2 +- Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h | 2 +- Marlin/src/config/examples/AliExpress/CL-260/Configuration.h | 2 +- Marlin/src/config/examples/Anet/A6/Configuration.h | 2 +- Marlin/src/config/examples/Anet/A8/Configuration.h | 2 +- Marlin/src/config/examples/Azteeg/X5GT/Configuration.h | 2 +- Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h | 2 +- Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h | 2 +- Marlin/src/config/examples/BQ/Hephestos/Configuration.h | 2 +- Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h | 2 +- Marlin/src/config/examples/BQ/WITBOX/Configuration.h | 2 +- Marlin/src/config/examples/Cartesio/Configuration.h | 2 +- Marlin/src/config/examples/Creality/CR-10/Configuration.h | 2 +- Marlin/src/config/examples/Felix/Configuration.h | 2 +- Marlin/src/config/examples/Felix/DUAL/Configuration.h | 2 +- Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h | 2 +- Marlin/src/config/examples/Geeetech/GT2560/Configuration.h | 2 +- .../config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h | 2 +- .../examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h | 2 +- .../examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h | 2 +- Marlin/src/config/examples/Infitary/i3-M508/Configuration.h | 2 +- Marlin/src/config/examples/JGAurora/A5/Configuration.h | 2 +- Marlin/src/config/examples/MakerParts/Configuration.h | 2 +- Marlin/src/config/examples/Malyan/M150/Configuration.h | 2 +- Marlin/src/config/examples/Malyan/M200/Configuration.h | 2 +- Marlin/src/config/examples/Micromake/C1/basic/Configuration.h | 2 +- .../src/config/examples/Micromake/C1/enhanced/Configuration.h | 2 +- Marlin/src/config/examples/Mks/Sbase/Configuration.h | 2 +- .../src/config/examples/RepRapWorld/Megatronics/Configuration.h | 2 +- Marlin/src/config/examples/RigidBot/Configuration.h | 2 +- Marlin/src/config/examples/SCARA/Configuration.h | 2 +- Marlin/src/config/examples/STM32F10/Configuration.h | 2 +- Marlin/src/config/examples/Sanguinololu/Configuration.h | 2 +- Marlin/src/config/examples/TheBorg/Configuration.h | 2 +- Marlin/src/config/examples/TinyBoy2/Configuration.h | 2 +- Marlin/src/config/examples/Tronxy/X5S/Configuration.h | 2 +- Marlin/src/config/examples/Velleman/K8200/Configuration.h | 2 +- Marlin/src/config/examples/Velleman/K8400/Configuration.h | 2 +- .../config/examples/Velleman/K8400/Dual-head/Configuration.h | 2 +- Marlin/src/config/examples/adafruit/ST7565/Configuration.h | 2 +- .../config/examples/delta/FLSUN/auto_calibrate/Configuration.h | 2 +- .../src/config/examples/delta/FLSUN/kossel_mini/Configuration.h | 2 +- Marlin/src/config/examples/delta/generic/Configuration.h | 2 +- Marlin/src/config/examples/delta/kossel_mini/Configuration.h | 2 +- Marlin/src/config/examples/delta/kossel_pro/Configuration.h | 2 +- Marlin/src/config/examples/delta/kossel_xl/Configuration.h | 2 +- Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h | 2 +- Marlin/src/config/examples/makibox/Configuration.h | 2 +- Marlin/src/config/examples/stm32f103ret6/Configuration.h | 2 +- Marlin/src/config/examples/tvrrug/Round2/Configuration.h | 2 +- Marlin/src/config/examples/wt150/Configuration.h | 2 +- 52 files changed, 52 insertions(+), 52 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index b3b8dc1c9..08c414821 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h index b3b8dc1c9..08c414821 100644 --- a/Marlin/src/config/default/Configuration.h +++ b/Marlin/src/config/default/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h index 73ebca84c..443ea8645 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h index 56745f364..bd4b02bc5 100644 --- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h +++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h index b23194476..f2a3df5d7 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h index fbd79e19f..dbcf8ba0b 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h index bde7f65b1..635479283 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h index 90e3349ca..4a323e80e 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h index 3681bd44f..73a0ed8d7 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h index 9ed041ab3..ec5a55a40 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h index dab11f0f9..ac5c7f348 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h @@ -108,7 +108,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h index 8b49d048a..b6ec78769 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Cartesio/Configuration.h b/Marlin/src/config/examples/Cartesio/Configuration.h index 01835a4f0..db6f60266 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration.h +++ b/Marlin/src/config/examples/Cartesio/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h index 181111e98..584dd627c 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h index 9888a2356..5278b2188 100644 --- a/Marlin/src/config/examples/Felix/Configuration.h +++ b/Marlin/src/config/examples/Felix/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h index 0f667523d..a3663b823 100644 --- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h +++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h index bc5744678..2fc6ee55f 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h index d66b519e5..ed7466da0 100644 --- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ 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 7f658a846..35bf81dfc 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 @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h index 5c4672cb2..ecd3f4a1e 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h index 6a0ea1e8b..02120488a 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h index 01d7b036d..bdbdd76b2 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration.h b/Marlin/src/config/examples/JGAurora/A5/Configuration.h index ee582782a..dd077bc0c 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration.h @@ -114,7 +114,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/MakerParts/Configuration.h b/Marlin/src/config/examples/MakerParts/Configuration.h index 54c56a752..75cd38829 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration.h +++ b/Marlin/src/config/examples/MakerParts/Configuration.h @@ -129,7 +129,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration.h b/Marlin/src/config/examples/Malyan/M150/Configuration.h index d5b011d0f..e22748558 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration.h @@ -114,7 +114,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration.h b/Marlin/src/config/examples/Malyan/M200/Configuration.h index f33f6a064..c1d508ac9 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h index cb0024891..554a06590 100644 --- a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h index 0130dc48e..470209cbf 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h index 1201952f1..8a04371d9 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h index 975281b1b..320201395 100644 --- a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h index be5ef3e98..59da245b6 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration.h +++ b/Marlin/src/config/examples/RigidBot/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h index e00ae3bba..7d4091b1e 100644 --- a/Marlin/src/config/examples/SCARA/Configuration.h +++ b/Marlin/src/config/examples/SCARA/Configuration.h @@ -139,7 +139,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/STM32F10/Configuration.h b/Marlin/src/config/examples/STM32F10/Configuration.h index 2d4a43f46..e2ca0ccc4 100644 --- a/Marlin/src/config/examples/STM32F10/Configuration.h +++ b/Marlin/src/config/examples/STM32F10/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h index 73fae70b0..b26b6adc4 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/TheBorg/Configuration.h b/Marlin/src/config/examples/TheBorg/Configuration.h index ef3cdedb3..b4b25d54d 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration.h +++ b/Marlin/src/config/examples/TheBorg/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration.h b/Marlin/src/config/examples/TinyBoy2/Configuration.h index fa2f292a9..0378ed8f4 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h @@ -125,7 +125,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h index c97b346ef..86dd52dff 100644 --- a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h index 463c8dba3..ce3dbe7b0 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h @@ -125,7 +125,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h index 3f0ca5150..3841350fa 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ 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 7dbe74aa4..5bc9aa88d 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h index 80b8fb936..b822d6c36 100644 --- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h +++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ 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 e0812e38e..0fa3f617b 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ 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 f9589fd54..68ae49633 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h index 0cdb0d854..274b716e0 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration.h +++ b/Marlin/src/config/examples/delta/generic/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h index 324739d6f..e882dcffe 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h index 31584bcb3..305df1978 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h @@ -113,7 +113,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h index ae71210b6..bdf931720 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h index 6f8e1ec4f..e6e46ed4c 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h index 232bc3f55..cb9675b1a 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/stm32f103ret6/Configuration.h b/Marlin/src/config/examples/stm32f103ret6/Configuration.h index 40e9a85a1..cb99eb4e8 100644 --- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h +++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h index 1b18cb319..c1c3b2577 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ diff --git a/Marlin/src/config/examples/wt150/Configuration.h b/Marlin/src/config/examples/wt150/Configuration.h index d5e5ecff6..7594dd70f 100644 --- a/Marlin/src/config/examples/wt150/Configuration.h +++ b/Marlin/src/config/examples/wt150/Configuration.h @@ -109,7 +109,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. - * Serial port -1 is the USB emulated serial port, if avaialble. + * Serial port -1 is the USB emulated serial port, if available. * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] */ From 5b70d3da1c58cc0ba142d7c023bb635af1a8c724 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 13 Feb 2018 22:52:27 -0600 Subject: [PATCH 03/46] Update DIGIPOT_I2C_MOTOR_CURRENTS comments --- Marlin/Configuration_adv.h | 3 ++- Marlin/src/config/default/Configuration_adv.h | 3 ++- .../config/examples/AlephObjects/TAZ4/Configuration_adv.h | 3 ++- Marlin/src/config/examples/Anet/A6/Configuration_adv.h | 3 ++- Marlin/src/config/examples/Anet/A8/Configuration_adv.h | 3 ++- Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h | 3 ++- Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h | 3 ++- Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h | 3 ++- .../src/config/examples/BQ/Hephestos_2/Configuration_adv.h | 3 ++- Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h | 3 ++- Marlin/src/config/examples/Cartesio/Configuration_adv.h | 3 ++- .../src/config/examples/Creality/CR-10/Configuration_adv.h | 3 ++- .../src/config/examples/Creality/CR-10S/Configuration_adv.h | 3 ++- .../src/config/examples/Creality/Ender/Configuration_adv.h | 3 ++- Marlin/src/config/examples/Felix/Configuration_adv.h | 3 ++- .../config/examples/FolgerTech/i3-2020/Configuration_adv.h | 3 ++- .../src/config/examples/Infitary/i3-M508/Configuration_adv.h | 3 ++- Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h | 3 ++- Marlin/src/config/examples/MakerParts/Configuration_adv.h | 3 ++- Marlin/src/config/examples/Malyan/M150/Configuration_adv.h | 3 ++- Marlin/src/config/examples/Malyan/M200/Configuration_adv.h | 3 ++- .../examples/Micromake/C1/enhanced/Configuration_adv.h | 3 ++- Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h | 3 ++- Marlin/src/config/examples/RigidBot/Configuration_adv.h | 3 ++- Marlin/src/config/examples/SCARA/Configuration_adv.h | 3 ++- Marlin/src/config/examples/Sanguinololu/Configuration_adv.h | 3 ++- Marlin/src/config/examples/TheBorg/Configuration_adv.h | 3 ++- Marlin/src/config/examples/TinyBoy2/Configuration_adv.h | 3 ++- .../config/examples/UltiMachine/Archim2/Configuration_adv.h | 3 ++- .../src/config/examples/Velleman/K8200/Configuration_adv.h | 3 ++- .../src/config/examples/Velleman/K8400/Configuration_adv.h | 3 ++- .../config/examples/Wanhao/Duplicator 6/Configuration_adv.h | 3 ++- .../examples/delta/FLSUN/auto_calibrate/Configuration_adv.h | 3 ++- .../config/examples/delta/FLSUN/kossel/Configuration_adv.h | 3 ++- .../examples/delta/FLSUN/kossel_mini/Configuration_adv.h | 3 ++- Marlin/src/config/examples/delta/generic/Configuration_adv.h | 3 ++- .../config/examples/delta/kossel_mini/Configuration_adv.h | 3 ++- .../src/config/examples/delta/kossel_pro/Configuration_adv.h | 3 ++- .../src/config/examples/delta/kossel_xl/Configuration_adv.h | 3 ++- .../src/config/examples/gCreate/gMax1.5+/Configuration_adv.h | 3 ++- Marlin/src/config/examples/makibox/Configuration_adv.h | 3 ++- Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h | 3 ++- Marlin/src/config/examples/wt150/Configuration_adv.h | 5 +++-- 43 files changed, 87 insertions(+), 44 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 03690b51b..904a24867 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index 03690b51b..904a24867 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index c68f25311..bac805e2a 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index 7d77a5109..7856d5bbb 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index fe3111f1f..8f7f4500f 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h index f79a4246c..fa5479967 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h @@ -459,7 +459,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h index 11ce94b1f..1290e6f31 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index 043ac8bd3..05fa86527 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== 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 4d9c7f702..717b68bd4 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index 043ac8bd3..05fa86527 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index 4e82c7993..f790b7ba3 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== 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 7048b4a3e..a86afcb61 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h index dd3e4afd4..bceb67b6e 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h index d8b6f231a..2606e1876 100644 --- a/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index d71a9f77f..bac8540c0 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h index 9bd3dae95..f3ac9bd90 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== 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 f3592dc74..2f23568cf 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h index ad0ede72f..63054c0b7 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h index 96d1cee99..202a2c7bb 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h +++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index ea8603520..c31833e7c 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h index f5fdc8371..ab6d32841 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h index 0535470c9..8cfc1a3c9 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index 5083e8b81..63f0f853c 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -459,7 +459,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 5 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.2, 1.2, 1.2, 1.2, 1.2 } // MKS SBASE: 5 //=========================================================================== diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index 24855847d..b2c1074d5 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index 39b1dda88..00dab604d 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index 64cde0b4b..f0d5a79f3 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h index 7b195b47a..191805b8e 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h +++ b/Marlin/src/config/examples/TheBorg/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index f96f1d9bc..39231c8a3 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h index 879ab4a32..1b9ce6938 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index 5a9de6070..fa8a289cd 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -471,7 +471,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index ac79e75a1..b71b38352 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index e2991376c..de44a5193 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -460,7 +460,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== 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 f1d706244..cbdc089f6 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 @@ -460,7 +460,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h index 8f111531b..3bef770e6 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -460,7 +460,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== 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 941036748..6939cde35 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 @@ -460,7 +460,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index 941036748..6939cde35 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -460,7 +460,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== 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 941036748..6939cde35 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -460,7 +460,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== 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 f7b4e535d..0b41d1965 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -465,7 +465,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== 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 bff637b55..b91d40c60 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -460,7 +460,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== 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 f5de9dca1..73a71d2bf 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index 345b81232..acff5d82c 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 4 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.7, 1.7, 1.7, 1.7 } // 5DPRINT //=========================================================================== diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index 37144c334..f2cd424e2 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -458,7 +458,8 @@ //#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //=========================================================================== diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index 547145549..ddd7a078c 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -459,8 +459,9 @@ #define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster #define DIGIPOT_I2C_NUM_CHANNELS 5 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 -// Actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {0.22, 0.22, 0.39, 0.42, 0.42} +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. +#define DIGIPOT_I2C_MOTOR_CURRENTS { 0.22, 0.22, 0.39, 0.42, 0.42 } // MIGHTYBOARD_REVE //=========================================================================== //=============================Additional Features=========================== From 272f132b821ad8ab15d02dad22ad0b364a3ec93e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 14 Feb 2018 01:05:40 -0600 Subject: [PATCH 04/46] Remove stray ` from STM32F1 HAL As noted in #8585 --- Marlin/src/HAL/HAL_STM32F1/persistent_store_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/HAL/HAL_STM32F1/persistent_store_impl.cpp b/Marlin/src/HAL/HAL_STM32F1/persistent_store_impl.cpp index f5c6ec58b..bff461008 100644 --- a/Marlin/src/HAL/HAL_STM32F1/persistent_store_impl.cpp +++ b/Marlin/src/HAL/HAL_STM32F1/persistent_store_impl.cpp @@ -83,7 +83,7 @@ bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) { bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const bool writing/*=true*/) { for (int i = 0; i < size; i++) { uint8_t c = HAL_STM32F1_eeprom_content[pos + i]; - if (writing) value[i] = c`; + if (writing) value[i] = c; crc16(crc, &c, 1); } pos += size; From 8d71ad37cb4934c29d38304133c7315d6339df2d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 14 Feb 2018 02:55:57 -0600 Subject: [PATCH 05/46] flush comment to match 1.1.x --- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 13 +++---------- Marlin/src/gcode/bedlevel/G26.cpp | 16 ++++------------ 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index d0a899912..30ed82c1c 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -767,10 +767,7 @@ const float measured_z = probe_pt(rawx, rawy, stow_probe, g29_verbose_level); // TODO: Needs error handling z_values[location.x_index][location.y_index] = measured_z; } - MYSERIAL0.flush(); // G29 P2's take a long time to complete. PronterFace can - // over run the serial character buffer with M105's without - // this fix - + MYSERIAL0.flush(); // Prevent host M105 buffer overrun. } while (location.x_index >= 0 && --max_iterations); STOW_PROBE(); @@ -908,9 +905,7 @@ SERIAL_PROTOCOL_F(z_values[location.x_index][location.y_index], 6); SERIAL_EOL(); } - MYSERIAL0.flush(); // G29 P2's take a long time to complete. PronterFace can - // over run the serial character buffer with M105's without - // this fix + MYSERIAL0.flush(); // Prevent host M105 buffer overrun. } while (location.x_index >= 0 && location.y_index >= 0); if (do_ubl_mesh_map) display_map(g29_map_type); // show user where we're probing @@ -1422,9 +1417,7 @@ do_blocking_move_to_z(h_offset + new_z); // Move the nozzle as the point is edited #endif idle(); - MYSERIAL0.flush(); // G29 P2's take a long time to complete. PronterFace can - // over run the serial character buffer with M105's without - // this fix + MYSERIAL0.flush(); // Prevent host M105 buffer overrun. } while (!is_lcd_clicked()); if (!lcd_map_control) lcd_return_to_status(); diff --git a/Marlin/src/gcode/bedlevel/G26.cpp b/Marlin/src/gcode/bedlevel/G26.cpp index d99a01be1..1eebbd75d 100644 --- a/Marlin/src/gcode/bedlevel/G26.cpp +++ b/Marlin/src/gcode/bedlevel/G26.cpp @@ -437,8 +437,7 @@ inline bool turn_on_heaters() { SERIAL_EOL(); } idle(); - MYSERIAL0.flush(); // G26 takes a long time to complete. PronterFace may - // overwhelm the serial buffer with M105's without this fix. + MYSERIAL0.flush(); // Prevent host M105 buffer overrun. } #if ENABLED(ULTRA_LCD) } @@ -461,10 +460,7 @@ inline bool turn_on_heaters() { SERIAL_EOL(); } idle(); - - MYSERIAL0.flush(); // G26 takes a long time to complete. PronterFace can - // over run the serial character buffer with M105's without - // this fix + MYSERIAL0.flush(); // Prevent host M105 buffer overrun. } #if ENABLED(ULTRA_LCD) @@ -824,16 +820,12 @@ void GcodeSuite::G26() { //} print_line_from_here_to_there(rx, ry, g26_layer_height, xe, ye, g26_layer_height); - MYSERIAL0.flush(); // G26 takes a long time to complete. PronterFace can - // over run the serial character buffer with M105's without - // this fix + MYSERIAL0.flush(); // Prevent host M105 buffer overrun. } if (look_for_lines_to_connect()) goto LEAVE; } - MYSERIAL0.flush(); // G26 takes a long time to complete. PronterFace can - // over run the serial character buffer with M105's without - // this fix + MYSERIAL0.flush(); // Prevent host M105 buffer overrun. } while (--g26_repeats && location.x_index >= 0 && location.y_index >= 0); LEAVE: From e7b50c89b06d59051734fd3a05f1cbf32036aa7e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 14 Feb 2018 03:29:47 -0600 Subject: [PATCH 06/46] Fix #9201 FILAMENT_LCD_DISPLAY can work with SDSUPPORT --- Marlin/src/lcd/ultralcd_impl_DOGM.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/ultralcd_impl_DOGM.h b/Marlin/src/lcd/ultralcd_impl_DOGM.h index 6bf80c619..4e7b1e758 100644 --- a/Marlin/src/lcd/ultralcd_impl_DOGM.h +++ b/Marlin/src/lcd/ultralcd_impl_DOGM.h @@ -690,7 +690,7 @@ static void lcd_implementation_status_screen() { // When everything is ok you see a constant 'X'. static char xstring[5], ystring[5], zstring[7]; - #if ENABLED(FILAMENT_LCD_DISPLAY) && DISABLED(SDSUPPORT) + #if ENABLED(FILAMENT_LCD_DISPLAY) static char wstring[5], mstring[4]; #endif From 67a4cc610b219c0fe9307b04cb5383001024e396 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 14 Feb 2018 04:15:47 -0600 Subject: [PATCH 07/46] French update Based on #9610 --- Marlin/src/lcd/language/language_fr.h | 10 +++++----- Marlin/src/lcd/language/language_fr_utf8.h | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Marlin/src/lcd/language/language_fr.h b/Marlin/src/lcd/language/language_fr.h index a41919f91..447a67a76 100644 --- a/Marlin/src/lcd/language/language_fr.h +++ b/Marlin/src/lcd/language/language_fr.h @@ -168,7 +168,7 @@ #define MSG_MOVE_X _UxGT("Depl. X") #define MSG_MOVE_Y _UxGT("Depl. Y") #define MSG_MOVE_Z _UxGT("Depl. Z") -#define MSG_MOVE_E _UxGT("Extruder") +#define MSG_MOVE_E _UxGT("Extrudeur") #define MSG_MOVE_01MM _UxGT("Depl. 0.1mm") #define MSG_MOVE_1MM _UxGT("Depl. 1mm") #define MSG_MOVE_10MM _UxGT("Depl. 10mm") @@ -177,7 +177,7 @@ #define MSG_NOZZLE _UxGT("Buse") #define MSG_BED _UxGT("Lit") #define MSG_FAN_SPEED _UxGT("Vitesse ventil.") -#define MSG_EXTRA_FAN_SPEED _UxGT("+Vitesse ventil.") +#define MSG_EXTRA_FAN_SPEED _UxGT("Extra V ventil.") #define MSG_FLOW _UxGT("Flux") #define MSG_CONTROL _UxGT("Controler") @@ -205,8 +205,8 @@ #endif #define MSG_VE_JERK _UxGT("Ve jerk") #define MSG_VELOCITY _UxGT("Velocite") -#define MSG_VMAX _UxGT("Vmax") -#define MSG_VMIN _UxGT("Vmin") +#define MSG_VMAX _UxGT("Vmax ") +#define MSG_VMIN _UxGT("Vmin ") #define MSG_VTRAV_MIN _UxGT("V depl. min") #define MSG_ACCELERATION _UxGT("Acceleration") #define MSG_AMAX _UxGT("Amax ") @@ -288,7 +288,7 @@ #define MSG_BABYSTEP_Z _UxGT("Babystep Z") #define MSG_ENDSTOP_ABORT _UxGT("Butee abandon") #define MSG_HEATING_FAILED_LCD _UxGT("Erreur de chauffe") -#define MSG_ERR_REDUNDANT_TEMP _UxGT("Err: TEMP. REDONDANT") +#define MSG_ERR_REDUNDANT_TEMP _UxGT("Err: TEMP. REDONDANTE") #define MSG_THERMAL_RUNAWAY _UxGT("EMBALLEMENT THERM.") #define MSG_ERR_MAXTEMP _UxGT("Err: TEMP. MAX") #define MSG_ERR_MINTEMP _UxGT("Err: TEMP. MIN") diff --git a/Marlin/src/lcd/language/language_fr_utf8.h b/Marlin/src/lcd/language/language_fr_utf8.h index 9bb3fadff..faeafd837 100644 --- a/Marlin/src/lcd/language/language_fr_utf8.h +++ b/Marlin/src/lcd/language/language_fr_utf8.h @@ -169,7 +169,7 @@ #define MSG_MOVE_X _UxGT("Dépl. X") #define MSG_MOVE_Y _UxGT("Dépl. Y") #define MSG_MOVE_Z _UxGT("Dépl. Z") -#define MSG_MOVE_E _UxGT("Extruder") +#define MSG_MOVE_E _UxGT("Extrudeur") #define MSG_MOVE_01MM _UxGT("Dépl. 0.1mm") #define MSG_MOVE_1MM _UxGT("Dépl. 1mm") #define MSG_MOVE_10MM _UxGT("Dépl. 10mm") @@ -178,7 +178,7 @@ #define MSG_NOZZLE _UxGT("Buse") #define MSG_BED _UxGT("Lit") #define MSG_FAN_SPEED _UxGT("Vitesse ventil.") -#define MSG_EXTRA_FAN_SPEED _UxGT("+Vitesse ventil.") +#define MSG_EXTRA_FAN_SPEED _UxGT("Extra V ventil.") #define MSG_FLOW _UxGT("Flux") #define MSG_CONTROL _UxGT("Contrôler") @@ -206,13 +206,13 @@ #endif #define MSG_VE_JERK _UxGT("Ve jerk") #define MSG_VELOCITY _UxGT("Vélocité") -#define MSG_VMAX _UxGT("Vmax") -#define MSG_VMIN _UxGT("Vmin") +#define MSG_VMAX _UxGT("Vmax ") +#define MSG_VMIN _UxGT("Vmin ") #define MSG_VTRAV_MIN _UxGT("V dépl. min") #define MSG_ACCELERATION _UxGT("Accélération") #define MSG_AMAX _UxGT("Amax ") #define MSG_A_RETRACT _UxGT("A retrait") -#define MSG_A_TRAVEL _UxGT("A Dépl.") +#define MSG_A_TRAVEL _UxGT("A dépl.") #define MSG_STEPS_PER_MM _UxGT("Pas/mm") #if IS_KINEMATIC #define MSG_ASTEPS _UxGT("A pas/mm") @@ -266,7 +266,7 @@ #define MSG_CONTROL_RETRACT_RECOVER _UxGT("Rappel mm") #define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("Ech. Rappel mm") #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("Rappel V") -#define MSG_CONTROL_RETRACT_RECOVER_SWAPF _UxGT("Ech. Retour V") +#define MSG_CONTROL_RETRACT_RECOVER_SWAPF _UxGT("Ech. Rappel V") #define MSG_AUTORETRACT _UxGT("Retrait. Auto.") #define MSG_FILAMENTCHANGE _UxGT("Changer filament") #define MSG_FILAMENTLOAD _UxGT("Charger fil.") @@ -382,7 +382,7 @@ #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Buse en chauffe") #define MSG_FILAMENT_CHANGE_HEATING_2 _UxGT("Patientez SVP...") #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Attente de") - #define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("chargement filament") + #define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("Chargement filament") #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Attente") #define MSG_FILAMENT_CHANGE_PURGE_2 _UxGT("Purger filament") #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Attente impression") From f0debfd2fceaf59ae35e5f0e1d85927a50b03290 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 14 Feb 2018 04:26:10 -0600 Subject: [PATCH 08/46] See if this passes Travis CI --- platformio.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/platformio.ini b/platformio.ini index d2252fae0..b493907b4 100644 --- a/platformio.ini +++ b/platformio.ini @@ -115,6 +115,7 @@ src_filter = ${common.default_src_filter} # [env:LPC1768] platform = nxplpc +board = lpc1768 board_f_cpu = 100000000L build_flags = !python Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py ${common.build_flags} From 93c0198b2dec4497c42d20cd01a6dac909416da7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 14 Feb 2018 05:09:44 -0600 Subject: [PATCH 09/46] Init LCD welcome message programmatically --- Marlin/src/Marlin.cpp | 1 + Marlin/src/lcd/ultralcd.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index 18e3a2c70..b53c2e35c 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -834,6 +834,7 @@ void setup() { #endif lcd_init(); + LCD_MESSAGEPGM(WELCOME_MSG); #if ENABLED(SHOW_BOOTSCREEN) lcd_bootscreen(); diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index fb85089a3..220955c81 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -98,7 +98,7 @@ uint8_t lcd_status_update_delay = 1, // First update one loop delayed #define MAX_MESSAGE_LENGTH CHARSIZE * (LCD_WIDTH) #endif -char lcd_status_message[MAX_MESSAGE_LENGTH + 1] = WELCOME_MSG; +char lcd_status_message[MAX_MESSAGE_LENGTH + 1]; #if ENABLED(SCROLL_LONG_FILENAMES) uint8_t filename_scroll_pos, filename_scroll_max, filename_scroll_hash; From 133b38b93b0a83e2601c93a47a51f97783921f71 Mon Sep 17 00:00:00 2001 From: AnHardt Date: Wed, 14 Feb 2018 12:17:58 +0100 Subject: [PATCH 10/46] Complete M48 description (#9631) --- Marlin/src/gcode/calibrate/M48.cpp | 2 +- Marlin/src/gcode/gcode.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/calibrate/M48.cpp b/Marlin/src/gcode/calibrate/M48.cpp index 766d3fb91..763b04184 100644 --- a/Marlin/src/gcode/calibrate/M48.cpp +++ b/Marlin/src/gcode/calibrate/M48.cpp @@ -40,7 +40,7 @@ * M48: Z probe repeatability measurement function. * * Usage: - * M48 + * M48 * P = Number of sampled points (4-50, default 10) * X = Sample X position * Y = Sample Y position diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index e97646f9c..bce0cf371 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -97,7 +97,7 @@ * M34 - Set SD Card sorting options. (Requires SDCARD_SORT_ALPHA) * M42 - Change pin status via gcode: M42 P S. LED pin assumed if P is omitted. * M43 - Display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins - * M48 - Measure Z Probe repeatability: M48 P X Y V E L. (Requires Z_MIN_PROBE_REPEATABILITY_TEST) + * M48 - Measure Z Probe repeatability: M48 P X Y V E L chizoid. (Requires Z_MIN_PROBE_REPEATABILITY_TEST) * M75 - Start the print job timer. * M76 - Pause the print job timer. * M77 - Stop the print job timer. From 5dc04c520139cd91ab5feb731c74358dd865757e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 14 Feb 2018 07:48:20 -0600 Subject: [PATCH 11/46] Fix #9361 --- Marlin/src/inc/Conditionals_post.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 67430387b..f8a8ec7be 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -1120,9 +1120,9 @@ #endif /** - * VIKI2, miniVIKI, and AZSMZ_12864 require DOGLCD_SCK and DOGLCD_MOSI to be defined. + * VIKI2, miniVIKI, AZSMZ_12864, and MKS_12864OLED_SSD1306 require DOGLCD_SCK and DOGLCD_MOSI to be defined. */ -#if ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(AZSMZ_12864) +#if ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(AZSMZ_12864) || ENABLED(MKS_12864OLED_SSD1306) #ifndef DOGLCD_SCK #define DOGLCD_SCK SCK_PIN #endif From 3d74ff3c87abc38eb26f11d6b37a6a00bb656559 Mon Sep 17 00:00:00 2001 From: Roxy-3D Date: Wed, 14 Feb 2018 14:16:12 -0600 Subject: [PATCH 12/46] Cartesian UBL systems should not use SEGMENT_LEVELED_MOVES There is significant downside to breaking up the long line segments on UBL Cartesian machines. It adds a lot of extra computation but worse... It cuts out all of UBL's off mesh Z-Height correction checks. There have been a large number of people complaining about the nozzle going to infinity or crashing into the bed lately. They are being caused by ``` void unified_bed_leveling::line_to_destination_cartesian() ``` not watching over the segments being queued up for movement. --- Marlin/src/inc/Conditionals_post.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index f8a8ec7be..7d088dbd5 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -996,7 +996,7 @@ /** * Set granular options based on the specific type of leveling */ -#define UBL_SEGMENTED (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA) || ENABLED(SEGMENT_LEVELED_MOVES))) +#define UBL_SEGMENTED (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA))) #define ABL_PLANAR (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT)) #define ABL_GRID (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)) #define OLDSCHOOL_ABL (ABL_PLANAR || ABL_GRID) From c78e1c0f235bcad97fc3adda0d7cfa96b145d2eb Mon Sep 17 00:00:00 2001 From: Roxy-3D Date: Thu, 15 Feb 2018 11:15:15 -0600 Subject: [PATCH 13/46] Fix G26 Circles... (#9641) * Fix G26 Circles... --- .../FolgerTech/i3-2020/Configuration.h | 26 ++++---- .../FolgerTech/i3-2020/Configuration_adv.h | 12 ++-- Marlin/src/gcode/bedlevel/G26.cpp | 59 +++++++------------ 3 files changed, 41 insertions(+), 56 deletions(-) diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h index 2fc6ee55f..113a3b653 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h @@ -132,13 +132,13 @@ // The following define selects which electronics board you have. // Please choose the name from boards.h that matches your setup #ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB // For people switching over to the Panucatt Re-ARM board -//#define MOTHERBOARD BOARD_RAMPS_14_EFB // For unmodified printers using Atmega-2560 and RAMPS boards. +//#define MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB // For people switching over to the Panucatt Re-ARM board + #define MOTHERBOARD BOARD_RAMPS_14_EFB // For unmodified printers using Atmega-2560 and RAMPS boards. #endif // Optional custom name for your RepStrap or other custom machine // Displayed in the LCD "Ready" message -#define CUSTOM_MACHINE_NAME "FT-2020 v5" +#define CUSTOM_MACHINE_NAME "FT-2020 v9" // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) @@ -565,7 +565,7 @@ * Override with M203 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_MAX_FEEDRATE { 250, 250, 6, 17 } +#define DEFAULT_MAX_FEEDRATE { 250, 250, 2, 17 } /** * Default Max Acceleration (change/s) change = mm/s @@ -573,7 +573,7 @@ * Override with M201 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_MAX_ACCELERATION { 1000, 1000, 10, 750 } +#define DEFAULT_MAX_ACCELERATION { 1000, 1000, 4, 750 } /** * Default Acceleration (change/s) change = mm/s @@ -714,7 +714,7 @@ */ #define X_PROBE_OFFSET_FROM_EXTRUDER 38 // X offset: -left +right [of the nozzle] #define Y_PROBE_OFFSET_FROM_EXTRUDER -7 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER -10.4 // Z offset: -below +above [the nozzle] +#define Z_PROBE_OFFSET_FROM_EXTRUDER -10.35 // Z offset: -below +above [the nozzle] // X and Y axis travel speed (mm/m) between probes #define XY_PROBE_SPEED 7500 @@ -744,8 +744,8 @@ * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle. * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle. */ -#define Z_CLEARANCE_DEPLOY_PROBE 5 // Z Clearance for Deploy/Stow -#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points +#define Z_CLEARANCE_DEPLOY_PROBE 3 // Z Clearance for Deploy/Stow +#define Z_CLEARANCE_BETWEEN_PROBES 3 // Z Clearance between probe points // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 @@ -816,8 +816,8 @@ #define X_MIN_POS 6 #define Y_MIN_POS 3 #define Z_MIN_POS 0 -#define X_MAX_POS 212 -#define Y_MAX_POS 190 +#define X_MAX_POS 207 +#define Y_MAX_POS 182 #define Z_MAX_POS 175 /** @@ -920,7 +920,7 @@ // For Cartesian machines, instead of dividing moves on mesh boundaries, // split up moves into short segments like a Delta. This follows the // contours of the bed more closely than edge-to-edge straight moves. - #define SEGMENT_LEVELED_MOVES +//#define SEGMENT_LEVELED_MOVES #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) /** @@ -1159,7 +1159,7 @@ // // M100 Free Memory Watcher // -//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage +#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage // // G20/G21 Inch mode support @@ -1199,7 +1199,7 @@ // Specify a park position as { X, Y, Z } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define NOZZLE_PARK_Z_FEEDRATE 8 // Z axis feedrate in mm/s (not used for delta printers) + #define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) #endif /** diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h index f3ac9bd90..0ed00612d 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -1581,17 +1581,17 @@ */ #define MAX7219_DEBUG #if ENABLED(MAX7219_DEBUG) -//#define MAX7219_CLK_PIN 64 // on RAMPS // Configuration of the 3 pins to control the display -//#define MAX7219_DIN_PIN 57 // on RAMPS -//#define MAX7219_LOAD_PIN 44 // on RAMPS +#define MAX7219_CLK_PIN 64 // on RAMPS // Configuration of the 3 pins to control the display +#define MAX7219_DIN_PIN 57 // on RAMPS +#define MAX7219_LOAD_PIN 44 // on RAMPS //#define MAX7219_CLK_PIN 77 // on Re-ARM // Configuration of the 3 pins to control the display //#define MAX7219_DIN_PIN 78 // on Re-ARM //#define MAX7219_LOAD_PIN 79 // on Re-ARM - #define MAX7219_CLK_PIN 30 // for RAMPS E1 // Configuration of the 3 pins to control the display - #define MAX7219_DIN_PIN 34 // for RAMPS E1 - #define MAX7219_LOAD_PIN 36 // for RAMPS E1 +//#define MAX7219_CLK_PIN 30 // for RAMPS E1 // Configuration of the 3 pins to control the display +//#define MAX7219_DIN_PIN 34 // for RAMPS E1 +//#define MAX7219_LOAD_PIN 36 // for RAMPS E1 /** * Sample debug features diff --git a/Marlin/src/gcode/bedlevel/G26.cpp b/Marlin/src/gcode/bedlevel/G26.cpp index 1eebbd75d..d52deccd2 100644 --- a/Marlin/src/gcode/bedlevel/G26.cpp +++ b/Marlin/src/gcode/bedlevel/G26.cpp @@ -586,8 +586,8 @@ void GcodeSuite::G26() { if (parser.seenval('B')) { g26_bed_temp = parser.value_celsius(); - if (!WITHIN(g26_bed_temp, 15, 140)) { - SERIAL_PROTOCOLLNPGM("?Specified bed temperature not plausible."); + if (g26_bed_temp && !WITHIN(g26_bed_temp, 40, 140)) { + SERIAL_PROTOCOLLNPGM("?Specified bed temperature not plausible (40-140C)."); return; } } @@ -737,14 +737,15 @@ void GcodeSuite::G26() { /** * Pre-generate radius offset values at 30 degree intervals to reduce CPU load. - * All angles are offset by 15 degrees to allow for a smaller table. */ - #define A_CNT ((360 / 30) / 2) - #define _COS(A) (trig_table[((A + A_CNT * 8) % A_CNT)] * (A >= A_CNT ? -1 : 1)) + + #define A_CNT ((360 / 30) / 2) // must be a multiple of 2 for _COS() and _SIN() macro to work correctly! + #define NEGATION_of_COS_TABLE(A) (((A + A_CNT * 16) % (A_CNT * 2)) >= A_CNT ? -1 : 1) + #define _COS(A) (trig_table[(A + A_CNT * 16) % A_CNT] * NEGATION_of_COS_TABLE(A)) #define _SIN(A) (-_COS((A + A_CNT / 2) % (A_CNT * 2))) float trig_table[A_CNT]; for (uint8_t i = 0; i < A_CNT; i++) - trig_table[i] = INTERSECTION_CIRCLE_RADIUS * cos(RADIANS(i * 30 + 15)); + trig_table[i] = INTERSECTION_CIRCLE_RADIUS * cos(RADIANS(i * 30)); mesh_index_pair location; do { @@ -762,32 +763,26 @@ void GcodeSuite::G26() { // Determine where to start and end the circle, // which is always drawn counter-clockwise. const uint8_t xi = location.x_index, yi = location.y_index; - const bool f = yi == 0, r = xi == GRID_MAX_POINTS_X - 1, b = yi == GRID_MAX_POINTS_Y - 1; - int8_t start_ind = -2, end_ind = 10; // Assume a full circle (from 4:30 to 4:30) - if (xi == 0) { // Left edge? Just right half. - start_ind = f ? 0 : -3; // 05:30 (02:30 for front-left) - end_ind = b ? -1 : 2; // 12:30 (03:30 for back-left) - } - else if (r) { // Right edge? Just left half. - start_ind = f ? 5 : 3; // 11:30 (09:30 for front-right) - end_ind = b ? 6 : 8; // 06:30 (08:30 for back-right) + const bool f = yi == 0, r = xi >= GRID_MAX_POINTS_X - 1, b = yi >= GRID_MAX_POINTS_Y - 1; + int8_t start_ind = -2, end_ind = 9; // Assume a full circle (from 5:00 to 5:00) + if (xi == 0) { // Left edge? Just right half. + start_ind = f ? 0 : -3; // 03:00 to 12:00 for front-left + end_ind = b ? 0 : 2; // 06:00 to 03:00 for back-left } - else if (f) { // Front edge? Just back half. - start_ind = 0; // 02:30 - end_ind = 5; // 09:30 + else if (r) { // Right edge? Just left half. + start_ind = b ? 6 : 3; // 12:00 to 09:00 for front-right + end_ind = f ? 5 : 8; // 09:00 to 06:00 for back-right } - else if (b) { // Back edge? Just front half. - start_ind = 6; // 08:30 - end_ind = 11; // 03:30 + else if (f) { // Front edge? Just back half. + start_ind = 0; // 03:00 + end_ind = 5; // 09:00 } - if (g26_debug_flag) { - SERIAL_ECHOPAIR(" Doing circle at: (xi=", xi); - SERIAL_ECHOPAIR(", yi=", yi); - SERIAL_CHAR(')'); - SERIAL_EOL(); + else if (b) { // Back edge? Just front half. + start_ind = 6; // 09:00 + end_ind = 11; // 03:00 } - for (int8_t ind = start_ind; ind < end_ind; ind++) { + for (int8_t ind = start_ind; ind <= end_ind; ind++) { #if ENABLED(NEWPANEL) if (user_canceled()) goto LEAVE; // Check if the user wants to stop the Mesh Validation @@ -808,16 +803,6 @@ void GcodeSuite::G26() { ye = constrain(ye, Y_MIN_POS + 1, Y_MAX_POS - 1); #endif - //if (g26_debug_flag) { - // char ccc, *cptr, seg_msg[50], seg_num[10]; - // strcpy(seg_msg, " segment: "); - // strcpy(seg_num, " \n"); - // cptr = (char*) "01234567890ABCDEF????????"; - // ccc = cptr[tmp_div_30]; - // seg_num[1] = ccc; - // strcat(seg_msg, seg_num); - // debug_current_and_destination(seg_msg); - //} print_line_from_here_to_there(rx, ry, g26_layer_height, xe, ye, g26_layer_height); MYSERIAL0.flush(); // Prevent host M105 buffer overrun. From 5d9e16ea49f3be7026eeb0a42f59a4107b1026d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Zahradn=C3=ADk?= Date: Thu, 15 Feb 2018 20:22:22 +0100 Subject: [PATCH 14/46] Update Czech advanced pause --- Marlin/src/lcd/language/language_cz.h | 15 +++++++++++++++ Marlin/src/lcd/language/language_cz_utf8.h | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/Marlin/src/lcd/language/language_cz.h b/Marlin/src/lcd/language/language_cz.h index 1e11af711..cb0f2a91d 100644 --- a/Marlin/src/lcd/language/language_cz.h +++ b/Marlin/src/lcd/language/language_cz.h @@ -235,6 +235,8 @@ #define MSG_FILAMENT _UxGT("Filament") #define MSG_VOLUMETRIC_ENABLED _UxGT("E na mm3") #define MSG_FILAMENT_DIAM _UxGT("Fil. Prum.") +#define MSG_FILAMENT_UNLOAD _UxGT("Vysunout mm") +#define MSG_FILAMENT_LOAD _UxGT("Zavest mm") #define MSG_ADVANCE_K _UxGT("K pro posun") #define MSG_CONTRAST _UxGT("Kontrast LCD") #define MSG_STORE_EEPROM _UxGT("Ulozit nastaveni") @@ -268,6 +270,10 @@ #define MSG_CONTROL_RETRACT_RECOVER_SWAPF _UxGT("S UnRet V") #define MSG_AUTORETRACT _UxGT("AutoRetr.") #define MSG_FILAMENTCHANGE _UxGT("Vymenit filament") +#define MSG_FILAMENTLOAD _UxGT("Zavest filament") +#define MSG_FILAMENTUNLOAD _UxGT("Vysunout filament") +#define MSG_FILAMENTUNLOAD_ALL _UxGT("Vysunout vse") + #define MSG_INIT_SDCARD _UxGT("Nacist SD kartu") #define MSG_CNG_SDCARD _UxGT("Vymenit SD kartu") #define MSG_ZPROBE_OUT _UxGT("Sonda Z mimo podl") @@ -348,10 +354,16 @@ #define MSG_DRIVE_STRENGTH _UxGT("Buzeni motoru") #define MSG_DAC_PERCENT _UxGT("Motor %") #define MSG_DAC_EEPROM_WRITE _UxGT("Ulozit do EEPROM") +#define MSG_FILAMENT_CHANGE_HEADER_PAUSE _UxGT("TISK POZASTAVEN") +#define MSG_FILAMENT_CHANGE_HEADER_LOAD _UxGT("ZAVEDENI FILAMENTU") +#define MSG_FILAMENT_CHANGE_HEADER_UNLOAD _UxGT("VYSUNUTI FILAMENTU") +#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("MOŽNOSTI OBNOVENI:") +#define MSG_FILAMENT_CHANGE_OPTION_PURGE _UxGT("Vytlacit vic") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Obnovit tisk") #define MSG_FILAMENT_CHANGE_NOZZLE _UxGT(" Tryska: ") #define MSG_ERR_HOMING_FAILED _UxGT("Parkovani selhalo") #define MSG_ERR_PROBING_FAILED _UxGT("Kalibrace selhala") +#define MSG_M600_TOO_COLD _UxGT("M600: Moc studený") #if LCD_HEIGHT >= 4 // Up to 3 lines allowed @@ -371,6 +383,8 @@ #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Cekejte prosim") #define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("na zavedeni") #define MSG_FILAMENT_CHANGE_LOAD_3 _UxGT("filamentu") + #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Vyckejte na") + #define MSG_FILAMENT_CHANGE_PURGE_2 _UxGT("vytlaceni") #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Cekejte prosim") #define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("na pokracovani") #define MSG_FILAMENT_CHANGE_RESUME_3 _UxGT("tisku") @@ -381,6 +395,7 @@ #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Vlozte, kliknete") #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Nahrivani...") #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Zavadeni...") + #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Vytlacovani...") #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Pokracovani...") #endif // LCD_HEIGHT < 4 diff --git a/Marlin/src/lcd/language/language_cz_utf8.h b/Marlin/src/lcd/language/language_cz_utf8.h index f3bf1ebb6..0d223f3bf 100644 --- a/Marlin/src/lcd/language/language_cz_utf8.h +++ b/Marlin/src/lcd/language/language_cz_utf8.h @@ -238,6 +238,8 @@ #define MSG_FILAMENT _UxGT("Filament") #define MSG_VOLUMETRIC_ENABLED _UxGT("E na mm3") #define MSG_FILAMENT_DIAM _UxGT("Fil. Prum.") +#define MSG_FILAMENT_UNLOAD _UxGT("Vysunout mm") +#define MSG_FILAMENT_LOAD _UxGT("Zavést mm") #define MSG_ADVANCE_K _UxGT("K pro posun") #define MSG_CONTRAST _UxGT("Kontrast LCD") #define MSG_STORE_EEPROM _UxGT("Uložit nastavení") @@ -271,6 +273,10 @@ #define MSG_CONTROL_RETRACT_RECOVER_SWAPF _UxGT("S UnRet V") #define MSG_AUTORETRACT _UxGT("AutoRetr.") #define MSG_FILAMENTCHANGE _UxGT("Vyměnit filament") +#define MSG_FILAMENTLOAD _UxGT("Zavést filament") +#define MSG_FILAMENTUNLOAD _UxGT("Vysunout filament") +#define MSG_FILAMENTUNLOAD_ALL _UxGT("Vysunout vše") + #define MSG_INIT_SDCARD _UxGT("Načíst SD kartu") #define MSG_CNG_SDCARD _UxGT("Vyměnit SD kartu") #define MSG_ZPROBE_OUT _UxGT("Sonda Z mimo podl") @@ -351,10 +357,16 @@ #define MSG_DRIVE_STRENGTH _UxGT("Buzení motorů") #define MSG_DAC_PERCENT _UxGT("Motor %") #define MSG_DAC_EEPROM_WRITE _UxGT("Uložit do EEPROM") +#define MSG_FILAMENT_CHANGE_HEADER_PAUSE _UxGT("TISK POZASTAVEN") +#define MSG_FILAMENT_CHANGE_HEADER_LOAD _UxGT("ZAVEDENÍ FILAMENTU") +#define MSG_FILAMENT_CHANGE_HEADER_UNLOAD _UxGT("VYSUNUTÍ FILAMENTU") +#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("MOŽNOSTI OBNOVENÍ:") +#define MSG_FILAMENT_CHANGE_OPTION_PURGE _UxGT("Vytlačit víc") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Obnovit tisk") #define MSG_FILAMENT_CHANGE_NOZZLE _UxGT(" Tryska: ") #define MSG_ERR_HOMING_FAILED _UxGT("Parkování selhalo") #define MSG_ERR_PROBING_FAILED _UxGT("Kalibrace selhala") +#define MSG_M600_TOO_COLD _UxGT("M600: Moc studený") #if LCD_HEIGHT >= 4 // Up to 3 lines allowed @@ -374,6 +386,8 @@ #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Čekejte prosím") #define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("na zavedení") #define MSG_FILAMENT_CHANGE_LOAD_3 _UxGT("filamentu") + #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Vyčkejte na") + #define MSG_FILAMENT_CHANGE_PURGE_2 _UxGT("vytlačení") #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Čekejte prosím") #define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("na pokračování") #define MSG_FILAMENT_CHANGE_RESUME_3 _UxGT("tisku") @@ -384,6 +398,7 @@ #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Vložte, klikněte") #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Nahřívání...") #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Zavádění...") + #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Vytlačování...") #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Pokračování...") #endif // LCD_HEIGHT < 4 From d81e9ce7cbef4889d6fe8ec9a50612fa00de8b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Zahradn=C3=ADk?= Date: Thu, 15 Feb 2018 20:23:02 +0100 Subject: [PATCH 15/46] Add CHARSIZE to ignorelist --- buildroot/share/scripts/findMissingTranslations.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot/share/scripts/findMissingTranslations.sh b/buildroot/share/scripts/findMissingTranslations.sh index 2ef9c146f..d460e647b 100755 --- a/buildroot/share/scripts/findMissingTranslations.sh +++ b/buildroot/share/scripts/findMissingTranslations.sh @@ -28,7 +28,7 @@ fi echo -n "Building list of missing strings..." for i in $(awk '/#ifndef/{print $2}' language_en.h); do - [[ $i == "LANGUAGE_EN_H" ]] && continue + [[ $i == "LANGUAGE_EN_H" || $i == "CHARSIZE" ]] && continue LANG_LIST="" for j in $TEST_LANGS; do [[ $(grep -c " ${i} " language_${j}.h) -eq 0 ]] && LANG_LIST="$LANG_LIST $j" From 21e60fd3edd9ea009f1a86db5c06909d59ff1cd0 Mon Sep 17 00:00:00 2001 From: Roxy-3D Date: Thu, 15 Feb 2018 15:07:42 -0600 Subject: [PATCH 16/46] Allow user to control Z-Height correction for off mesh movements (#9661) --- Marlin/Configuration.h | 2 ++ Marlin/src/config/default/Configuration.h | 3 ++ .../AlephObjects/TAZ4/Configuration.h | 3 ++ .../AliExpress/CL-260/Configuration.h | 3 ++ .../config/examples/Anet/A6/Configuration.h | 3 ++ .../config/examples/Anet/A8/Configuration.h | 3 ++ .../examples/Azteeg/X5GT/Configuration.h | 3 ++ .../BIBO/TouchX/cyclops/Configuration.h | 3 ++ .../BIBO/TouchX/default/Configuration.h | 3 ++ .../examples/BQ/Hephestos/Configuration.h | 3 ++ .../examples/BQ/Hephestos_2/Configuration.h | 3 ++ .../config/examples/BQ/WITBOX/Configuration.h | 3 ++ .../config/examples/Cartesio/Configuration.h | 3 ++ .../examples/Creality/CR-10/Configuration.h | 3 ++ .../examples/Creality/CR-10S/Configuration.h | 3 ++ .../src/config/examples/Felix/Configuration.h | 3 ++ .../examples/Felix/DUAL/Configuration.h | 3 ++ .../FolgerTech/i3-2020/Configuration.h | 3 ++ .../examples/Geeetech/GT2560/Configuration.h | 3 ++ .../Geeetech/I3_Pro_X-GT2560/Configuration.h | 3 ++ .../examples/Infitary/i3-M508/Configuration.h | 3 ++ .../examples/JGAurora/A5/Configuration.h | 3 ++ .../examples/MakerParts/Configuration.h | 3 ++ .../examples/Malyan/M150/Configuration.h | 3 ++ .../examples/Malyan/M200/Configuration.h | 3 ++ .../Micromake/C1/basic/Configuration.h | 3 ++ .../Micromake/C1/enhanced/Configuration.h | 3 ++ .../config/examples/Mks/Sbase/Configuration.h | 3 ++ .../RepRapWorld/Megatronics/Configuration.h | 3 ++ .../config/examples/RigidBot/Configuration.h | 3 ++ .../src/config/examples/SCARA/Configuration.h | 3 ++ .../config/examples/STM32F10/Configuration.h | 3 ++ .../examples/Sanguinololu/Configuration.h | 3 ++ .../config/examples/TheBorg/Configuration.h | 3 ++ .../config/examples/TinyBoy2/Configuration.h | 3 ++ .../config/examples/Tronxy/X1/Configuration.h | 3 ++ .../examples/Tronxy/X5S/Configuration.h | 3 ++ .../UltiMachine/Archim2/Configuration.h | 3 ++ .../examples/Velleman/K8200/Configuration.h | 3 ++ .../examples/Velleman/K8400/Configuration.h | 3 ++ .../Velleman/K8400/Dual-head/Configuration.h | 3 ++ .../examples/adafruit/ST7565/Configuration.h | 3 ++ .../FLSUN/auto_calibrate/Configuration.h | 3 ++ .../delta/FLSUN/kossel/Configuration.h | 3 ++ .../delta/FLSUN/kossel_mini/Configuration.h | 3 ++ .../examples/delta/generic/Configuration.h | 3 ++ .../delta/kossel_mini/Configuration.h | 3 ++ .../examples/delta/kossel_pro/Configuration.h | 3 ++ .../examples/delta/kossel_xl/Configuration.h | 3 ++ .../examples/gCreate/gMax1.5+/Configuration.h | 3 ++ .../config/examples/makibox/Configuration.h | 3 ++ .../examples/stm32f103ret6/Configuration.h | 3 ++ .../examples/tvrrug/Round2/Configuration.h | 3 ++ .../src/config/examples/wt150/Configuration.h | 3 ++ Marlin/src/feature/bedlevel/ubl/ubl.h | 31 +++++++++++++++++-- .../src/feature/bedlevel/ubl/ubl_motion.cpp | 11 +++++-- 56 files changed, 198 insertions(+), 5 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 08c414821..6eabaec85 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -999,6 +999,8 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h index 08c414821..906765503 100644 --- a/Marlin/src/config/default/Configuration.h +++ b/Marlin/src/config/default/Configuration.h @@ -999,6 +999,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h index 443ea8645..bbf0174cb 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h @@ -1019,6 +1019,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h index bd4b02bc5..629a2373a 100644 --- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h +++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h @@ -999,6 +999,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h index f2a3df5d7..2a4365b24 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration.h @@ -1133,6 +1133,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h index dbcf8ba0b..21f94a4ae 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration.h @@ -1006,6 +1006,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h index 635479283..52e66bdc2 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h @@ -999,6 +999,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h index 4a323e80e..b8712d93e 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h @@ -999,6 +999,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h index 73a0ed8d7..0c3da3940 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h @@ -999,6 +999,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h index ec5a55a40..4cd46632b 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h @@ -987,6 +987,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h index ac5c7f348..548fb91f5 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h @@ -1000,6 +1000,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h index b6ec78769..b1c2d0d8b 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h @@ -987,6 +987,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Cartesio/Configuration.h b/Marlin/src/config/examples/Cartesio/Configuration.h index db6f60266..0f2e7a3ad 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration.h +++ b/Marlin/src/config/examples/Cartesio/Configuration.h @@ -998,6 +998,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h index 584dd627c..a7694d926 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h @@ -1002,6 +1002,9 @@ #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh #define UBL_PROBE_PT_1_Y 180 #define UBL_PROBE_PT_2_X 39 + + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. #define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_Y 20 diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h index b8a72bef8..aa846fa80 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h @@ -991,6 +991,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h index 5278b2188..ebdd8aa22 100644 --- a/Marlin/src/config/examples/Felix/Configuration.h +++ b/Marlin/src/config/examples/Felix/Configuration.h @@ -981,6 +981,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h index a3663b823..05179bb0c 100644 --- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h +++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h @@ -981,6 +981,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h index 113a3b653..35f1f8585 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h @@ -1005,6 +1005,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + #define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h index ed7466da0..afac31e5f 100644 --- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h @@ -1014,6 +1014,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== 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 35bf81dfc..5202fa01c 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 @@ -999,6 +999,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h index bdbdd76b2..555e22fe1 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h @@ -1003,6 +1003,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration.h b/Marlin/src/config/examples/JGAurora/A5/Configuration.h index dd077bc0c..077733ca9 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration.h @@ -1011,6 +1011,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/MakerParts/Configuration.h b/Marlin/src/config/examples/MakerParts/Configuration.h index 75cd38829..f37476dbe 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration.h +++ b/Marlin/src/config/examples/MakerParts/Configuration.h @@ -1019,6 +1019,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration.h b/Marlin/src/config/examples/Malyan/M150/Configuration.h index e22748558..e6a2e35d9 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration.h @@ -1027,6 +1027,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration.h b/Marlin/src/config/examples/Malyan/M200/Configuration.h index c1d508ac9..6a2e6a0a8 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration.h @@ -998,6 +998,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h index 554a06590..d85e0aa30 100644 --- a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h @@ -1003,6 +1003,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h index 470209cbf..afbfc8832 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h @@ -1003,6 +1003,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h index 8a04371d9..fcad29805 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h @@ -999,6 +999,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h index 320201395..e065e0f2d 100644 --- a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h @@ -999,6 +999,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h index 59da245b6..376c94977 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration.h +++ b/Marlin/src/config/examples/RigidBot/Configuration.h @@ -997,6 +997,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h index 7d4091b1e..617ecb5b9 100644 --- a/Marlin/src/config/examples/SCARA/Configuration.h +++ b/Marlin/src/config/examples/SCARA/Configuration.h @@ -1011,6 +1011,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/STM32F10/Configuration.h b/Marlin/src/config/examples/STM32F10/Configuration.h index e2ca0ccc4..affc79667 100644 --- a/Marlin/src/config/examples/STM32F10/Configuration.h +++ b/Marlin/src/config/examples/STM32F10/Configuration.h @@ -1002,6 +1002,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h index b26b6adc4..239cf8d65 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h @@ -1030,6 +1030,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/TheBorg/Configuration.h b/Marlin/src/config/examples/TheBorg/Configuration.h index b4b25d54d..8ade00345 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration.h +++ b/Marlin/src/config/examples/TheBorg/Configuration.h @@ -999,6 +999,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration.h b/Marlin/src/config/examples/TinyBoy2/Configuration.h index 0378ed8f4..a858ab9c2 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h @@ -1055,6 +1055,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Tronxy/X1/Configuration.h b/Marlin/src/config/examples/Tronxy/X1/Configuration.h index 982bd2ff9..e74543b69 100644 --- a/Marlin/src/config/examples/Tronxy/X1/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X1/Configuration.h @@ -990,6 +990,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h index 86dd52dff..38a6a31d1 100644 --- a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h @@ -999,6 +999,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h index 177ec121b..af734b063 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h @@ -990,6 +990,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h index ce3dbe7b0..ecc36d717 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h @@ -1029,6 +1029,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h index 3841350fa..5e6092b26 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h @@ -999,6 +999,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== 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 5bc9aa88d..2e0c436c2 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -999,6 +999,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h index b822d6c36..fb48c5ba5 100644 --- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h +++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h @@ -999,6 +999,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== 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 0fa3f617b..7ab6cb2e9 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -1133,6 +1133,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h index b81aa9b8e..99e455f7b 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h @@ -1124,6 +1124,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== 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 68ae49633..787212c40 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -1132,6 +1132,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h index 274b716e0..c67f53f39 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration.h +++ b/Marlin/src/config/examples/delta/generic/Configuration.h @@ -1121,6 +1121,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h index e882dcffe..6ebfebf86 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -1124,6 +1124,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h index 305df1978..f9e738e40 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h @@ -1124,6 +1124,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h index bdf931720..4ed978125 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h @@ -1133,6 +1133,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h index e6e46ed4c..9053afb07 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h @@ -1013,6 +1013,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h index cb9675b1a..d063628ea 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -1002,6 +1002,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/stm32f103ret6/Configuration.h b/Marlin/src/config/examples/stm32f103ret6/Configuration.h index cb99eb4e8..cde085afb 100644 --- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h +++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h @@ -1000,6 +1000,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h index c1c3b2577..07d0dcd91 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h @@ -994,6 +994,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/wt150/Configuration.h b/Marlin/src/config/examples/wt150/Configuration.h index 7594dd70f..3520789b1 100644 --- a/Marlin/src/config/examples/wt150/Configuration.h +++ b/Marlin/src/config/examples/wt150/Configuration.h @@ -1004,6 +1004,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.h b/Marlin/src/feature/bedlevel/ubl/ubl.h index 090641a05..bc4df7f44 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl.h +++ b/Marlin/src/feature/bedlevel/ubl/ubl.h @@ -223,7 +223,16 @@ class unified_bed_leveling { SERIAL_EOL(); } #endif - return NAN; + + /** + * The requested location is off the mesh. Check if UBL_Z_RAISE_WHEN_OFF_MESH + * is specified. If so, that value is returned. + */ + #if ENABLED(UBL_Z_RAISE_WHEN_OFF_MESH) + return UBL_Z_RAISE_WHEN_OFF_MESH; + #else + return NAN; + #endif } const float xratio = (rx0 - mesh_index_to_xpos(x1_i)) * (1.0 / (MESH_X_DIST)), @@ -249,7 +258,16 @@ class unified_bed_leveling { SERIAL_EOL(); } #endif - return NAN; + + /** + * The requested location is off the mesh. Check if UBL_Z_RAISE_WHEN_OFF_MESH + * is specified. If so, that value is returned. + */ + #if ENABLED(UBL_Z_RAISE_WHEN_OFF_MESH) + return UBL_Z_RAISE_WHEN_OFF_MESH; + #else + return NAN; + #endif } const float yratio = (ry0 - mesh_index_to_ypos(y1_i)) * (1.0 / (MESH_Y_DIST)), @@ -270,6 +288,15 @@ class unified_bed_leveling { const int8_t cx = get_cell_index_x(rx0), cy = get_cell_index_y(ry0); // return values are clamped + /** + * Check if the requested location is off the mesh. If so, and + * UBL_Z_RAISE_WHEN_OFF_MESH is specified, that value is returned. + */ + #if ENABLED(UBL_Z_RAISE_WHEN_OFF_MESH) + if (!WITHIN(rx0, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(ry0, 0, GRID_MAX_POINTS_Y - 1)) + return UBL_Z_RAISE_WHEN_OFF_MESHH; + #endif + const float z1 = calc_z0(rx0, mesh_index_to_xpos(cx), z_values[cx][cy], mesh_index_to_xpos(cx + 1), z_values[min(cx, GRID_MAX_POINTS_X - 2) + 1][cy]); diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp index 07d541233..c265e4ade 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp @@ -86,9 +86,14 @@ if (!WITHIN(cell_dest_xi, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(cell_dest_yi, 0, GRID_MAX_POINTS_Y - 1)) { // Note: There is no Z Correction in this case. We are off the grid and don't know what - // a reasonable correction would be. - - planner.buffer_segment(end[X_AXIS], end[Y_AXIS], end[Z_AXIS], end[E_AXIS], feed_rate, extruder); + // a reasonable correction would be. If the user has specified a UBL_Z_RAISE_WHEN_OFF_MESH + // value, that will be used instead of a calculated (Bi-Linear interpolation) correction. + + float z_raise = 0.0; + #if ENABLED(UBL_Z_RAISE_WHEN_OFF_MESH) + z_raise = UBL_Z_RAISE_WHEN_OFF_MESH; + #endif + planner.buffer_segment(end[X_AXIS], end[Y_AXIS], end[Z_AXIS] + z_raise, end[E_AXIS], feed_rate, extruder); set_current_from_destination(); if (g26_debug_flag) From 349dafa728424ed2e65c8975bff134711fce9a1b Mon Sep 17 00:00:00 2001 From: Bob-the-Kuhn Date: Thu, 15 Feb 2018 17:45:20 -0600 Subject: [PATCH 17/46] config update (set to -1) --- Marlin/Configuration_adv.h | 2 +- Marlin/src/config/default/Configuration_adv.h | 2 +- Marlin/src/config/examples/Anet/A6/Configuration_adv.h | 2 +- Marlin/src/config/examples/Anet/A8/Configuration_adv.h | 2 +- Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h | 2 +- Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h | 2 +- Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h | 2 +- Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h | 2 +- Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h | 2 +- Marlin/src/config/examples/Cartesio/Configuration_adv.h | 2 +- Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h | 2 +- Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h | 2 +- Marlin/src/config/examples/Creality/Ender/Configuration_adv.h | 2 +- Marlin/src/config/examples/Felix/Configuration_adv.h | 2 +- .../src/config/examples/FolgerTech/i3-2020/Configuration_adv.h | 2 +- Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h | 2 +- Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h | 2 +- Marlin/src/config/examples/MakerParts/Configuration_adv.h | 2 +- Marlin/src/config/examples/Malyan/M150/Configuration_adv.h | 2 +- Marlin/src/config/examples/Malyan/M200/Configuration_adv.h | 2 +- .../config/examples/Micromake/C1/enhanced/Configuration_adv.h | 2 +- Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h | 2 +- Marlin/src/config/examples/SCARA/Configuration_adv.h | 2 +- Marlin/src/config/examples/Sanguinololu/Configuration_adv.h | 2 +- Marlin/src/config/examples/TheBorg/Configuration_adv.h | 2 +- Marlin/src/config/examples/TinyBoy2/Configuration_adv.h | 2 +- .../src/config/examples/UltiMachine/Archim2/Configuration_adv.h | 2 +- Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h | 2 +- .../src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h | 2 +- .../examples/delta/FLSUN/auto_calibrate/Configuration_adv.h | 2 +- .../src/config/examples/delta/FLSUN/kossel/Configuration_adv.h | 2 +- .../config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h | 2 +- Marlin/src/config/examples/delta/generic/Configuration_adv.h | 2 +- .../src/config/examples/delta/kossel_mini/Configuration_adv.h | 2 +- Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h | 2 +- Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h | 2 +- Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h | 2 +- Marlin/src/config/examples/makibox/Configuration_adv.h | 2 +- Marlin/src/config/examples/wt150/Configuration_adv.h | 2 +- 39 files changed, 39 insertions(+), 39 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 904a24867..d74efa330 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index 904a24867..d74efa330 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index 7856d5bbb..3312831c5 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 8f7f4500f..33481688b 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h index fa5479967..721c99633 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h index 1290e6f31..6d8a9309e 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index 05fa86527..b6f6cb958 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif 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 717b68bd4..47b4e8d31 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index 05fa86527..b6f6cb958 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index f790b7ba3..bc018543a 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif 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 a86afcb61..b039009a1 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h index bceb67b6e..510f326c6 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h index 2606e1876..0952a2c8b 100644 --- a/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index bac8540c0..04a60dca1 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h index 0ed00612d..3fe6086b7 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif 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 2f23568cf..8c9bad66b 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h index 63054c0b7..10e158ea9 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h index 202a2c7bb..251cc13ae 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h +++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index c31833e7c..e8564fa5c 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h index ab6d32841..d19f36752 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h index 8cfc1a3c9..ab4923160 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index 63f0f853c..9c427fc78 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index 00dab604d..5f535c7f2 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index f0d5a79f3..dea3d7119 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h index 191805b8e..b803b1331 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h +++ b/Marlin/src/config/examples/TheBorg/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index 39231c8a3..83e268851 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h index 1b9ce6938..0322af662 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index fa8a289cd..ce7739563 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -198,7 +198,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index de44a5193..a3c278774 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif 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 cbdc089f6..fd147fd35 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 @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h index 3bef770e6..4c1ba8376 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif 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 6939cde35..6f781bc95 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 @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index 6939cde35..6f781bc95 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif 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 6939cde35..6f781bc95 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif 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 0b41d1965..9b836c723 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -190,7 +190,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif 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 b91d40c60..2a5e39e8b 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif 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 73a71d2bf..231a00420 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index acff5d82c..e98699f92 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index ddd7a078c..6bbb8be3a 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -185,7 +185,7 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN FAN1_PIN // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled #define CONTROLLERFAN_SPEED 255 // 255 == full speed #endif From 6a70a4fbb36911fcc53116261b915a3c12286f67 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 15 Feb 2018 22:11:26 -0600 Subject: [PATCH 18/46] Fix G26 circles (#9627) Easier to configure. Catch an odd divisor. --- Marlin/src/gcode/bedlevel/G26.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/G26.cpp b/Marlin/src/gcode/bedlevel/G26.cpp index d52deccd2..dd84e4e39 100644 --- a/Marlin/src/gcode/bedlevel/G26.cpp +++ b/Marlin/src/gcode/bedlevel/G26.cpp @@ -738,14 +738,18 @@ void GcodeSuite::G26() { /** * Pre-generate radius offset values at 30 degree intervals to reduce CPU load. */ - - #define A_CNT ((360 / 30) / 2) // must be a multiple of 2 for _COS() and _SIN() macro to work correctly! - #define NEGATION_of_COS_TABLE(A) (((A + A_CNT * 16) % (A_CNT * 2)) >= A_CNT ? -1 : 1) - #define _COS(A) (trig_table[(A + A_CNT * 16) % A_CNT] * NEGATION_of_COS_TABLE(A)) - #define _SIN(A) (-_COS((A + A_CNT / 2) % (A_CNT * 2))) + #define A_INT 30 + #define _ANGS (360 / A_INT) + #define A_CNT (_ANGS / 2) + #define _IND(A) ((A + _ANGS * 8) % _ANGS) + #define _COS(A) (trig_table[_IND(A) % A_CNT] * (_IND(A) >= A_CNT ? -1 : 1)) + #define _SIN(A) (-_COS((A + A_CNT / 2) % _ANGS)) + #if A_CNT & 1 + #error "A_CNT must be a positive value. Please change A_INT." + #endif float trig_table[A_CNT]; for (uint8_t i = 0; i < A_CNT; i++) - trig_table[i] = INTERSECTION_CIRCLE_RADIUS * cos(RADIANS(i * 30)); + trig_table[i] = INTERSECTION_CIRCLE_RADIUS * cos(RADIANS(i * A_INT)); mesh_index_pair location; do { From 304e0f8945f8a25b9c08b5047dc8530a10f66975 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 15 Feb 2018 22:22:06 -0600 Subject: [PATCH 19/46] Followup to 21e60fd `ENABLED` only works for flag-type options. Floats must use `#ifdef`. --- Marlin/src/feature/bedlevel/ubl/ubl.h | 38 +++++++++---------- .../src/feature/bedlevel/ubl/ubl_motion.cpp | 12 +++--- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.h b/Marlin/src/feature/bedlevel/ubl/ubl.h index bc4df7f44..e6832bb2f 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl.h +++ b/Marlin/src/feature/bedlevel/ubl/ubl.h @@ -224,15 +224,14 @@ class unified_bed_leveling { } #endif - /** - * The requested location is off the mesh. Check if UBL_Z_RAISE_WHEN_OFF_MESH - * is specified. If so, that value is returned. - */ - #if ENABLED(UBL_Z_RAISE_WHEN_OFF_MESH) - return UBL_Z_RAISE_WHEN_OFF_MESH; - #else - return NAN; - #endif + // The requested location is off the mesh. Return UBL_Z_RAISE_WHEN_OFF_MESH or NAN. + return ( + #ifdef UBL_Z_RAISE_WHEN_OFF_MESH + UBL_Z_RAISE_WHEN_OFF_MESH + #else + NAN + #endif + ); } const float xratio = (rx0 - mesh_index_to_xpos(x1_i)) * (1.0 / (MESH_X_DIST)), @@ -259,15 +258,14 @@ class unified_bed_leveling { } #endif - /** - * The requested location is off the mesh. Check if UBL_Z_RAISE_WHEN_OFF_MESH - * is specified. If so, that value is returned. - */ - #if ENABLED(UBL_Z_RAISE_WHEN_OFF_MESH) - return UBL_Z_RAISE_WHEN_OFF_MESH; - #else - return NAN; - #endif + // The requested location is off the mesh. Return UBL_Z_RAISE_WHEN_OFF_MESH or NAN. + return ( + #ifdef UBL_Z_RAISE_WHEN_OFF_MESH + UBL_Z_RAISE_WHEN_OFF_MESH + #else + NAN + #endif + ); } const float yratio = (ry0 - mesh_index_to_ypos(y1_i)) * (1.0 / (MESH_Y_DIST)), @@ -292,9 +290,9 @@ class unified_bed_leveling { * Check if the requested location is off the mesh. If so, and * UBL_Z_RAISE_WHEN_OFF_MESH is specified, that value is returned. */ - #if ENABLED(UBL_Z_RAISE_WHEN_OFF_MESH) + #ifdef UBL_Z_RAISE_WHEN_OFF_MESH if (!WITHIN(rx0, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(ry0, 0, GRID_MAX_POINTS_Y - 1)) - return UBL_Z_RAISE_WHEN_OFF_MESHH; + return UBL_Z_RAISE_WHEN_OFF_MESH; #endif const float z1 = calc_z0(rx0, diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp index c265e4ade..5b83f49ce 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp @@ -86,13 +86,13 @@ if (!WITHIN(cell_dest_xi, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(cell_dest_yi, 0, GRID_MAX_POINTS_Y - 1)) { // Note: There is no Z Correction in this case. We are off the grid and don't know what - // a reasonable correction would be. If the user has specified a UBL_Z_RAISE_WHEN_OFF_MESH + // a reasonable correction would be. If the user has specified a UBL_Z_RAISE_WHEN_OFF_MESH // value, that will be used instead of a calculated (Bi-Linear interpolation) correction. - - float z_raise = 0.0; - #if ENABLED(UBL_Z_RAISE_WHEN_OFF_MESH) - z_raise = UBL_Z_RAISE_WHEN_OFF_MESH; - #endif + const float z_raise = 0.0 + #ifdef UBL_Z_RAISE_WHEN_OFF_MESH + + UBL_Z_RAISE_WHEN_OFF_MESH + #endif + ; planner.buffer_segment(end[X_AXIS], end[Y_AXIS], end[Z_AXIS] + z_raise, end[E_AXIS], feed_rate, extruder); set_current_from_destination(); From c49844df66213dfab5dbcc12d772f0a4279f2141 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 16 Feb 2018 01:43:35 -0600 Subject: [PATCH 20/46] !ENABLED => DISABLED --- Marlin/src/feature/leds/neopixel.cpp | 2 +- Marlin/src/pins/pins_RAMPS.h | 2 +- Marlin/src/pins/pins_RURAMPS4D.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/feature/leds/neopixel.cpp b/Marlin/src/feature/leds/neopixel.cpp index d3e292d70..c56b862ed 100644 --- a/Marlin/src/feature/leds/neopixel.cpp +++ b/Marlin/src/feature/leds/neopixel.cpp @@ -65,7 +65,7 @@ void setup_neopixel() { bool neopixel_set_led_color(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t w, const uint8_t p) { const uint32_t color = pixels.Color(r, g, b, w); pixels.setBrightness(p); - #if !ENABLED(NEOPIXEL_IS_SEQUENTIAL) + #if DISABLED(NEOPIXEL_IS_SEQUENTIAL) set_neopixel_color(color); return false; #else diff --git a/Marlin/src/pins/pins_RAMPS.h b/Marlin/src/pins/pins_RAMPS.h index d5b603ea5..2fe422b59 100644 --- a/Marlin/src/pins/pins_RAMPS.h +++ b/Marlin/src/pins/pins_RAMPS.h @@ -48,7 +48,7 @@ #error "Oops! Use 'BOARD_RAMPS_RE_ARM' to build for Re-ARM." #endif -#if !ENABLED(IS_RAMPS_SMART) && !ENABLED(IS_RAMPS_DUO) && !ENABLED(IS_RAMPS4DUE) && !ENABLED(TARGET_LPC1768) +#if DISABLED(IS_RAMPS_SMART) && DISABLED(IS_RAMPS_DUO) && DISABLED(IS_RAMPS4DUE) && DISABLED(TARGET_LPC1768) #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." #endif diff --git a/Marlin/src/pins/pins_RURAMPS4D.h b/Marlin/src/pins/pins_RURAMPS4D.h index 5d9bd2b38..2ad365e00 100644 --- a/Marlin/src/pins/pins_RURAMPS4D.h +++ b/Marlin/src/pins/pins_RURAMPS4D.h @@ -104,7 +104,7 @@ //#define Z2_MS2_PIN ? // shared with E3_MS2_PIN //#define Z2_MS3_PIN ? // shared with E3_MS3_PIN -#if !ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) +#if DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) #define Z_PROBE_PIN 49 #endif // else Z_PROBE_PIN = Z_MIN_PIN From 08d685c97aee540e8e572ee461a29fb5d0b2a842 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 16 Feb 2018 02:09:17 -0600 Subject: [PATCH 21/46] Followup to 21e60fd --- Marlin/Configuration.h | 1 + Marlin/src/config/examples/Creality/CR-10/Configuration.h | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 6eabaec85..906765503 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1001,6 +1001,7 @@ //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h index a7694d926..6b6f25d94 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h @@ -1003,8 +1003,6 @@ #define UBL_PROBE_PT_1_Y 180 #define UBL_PROBE_PT_2_X 39 - //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used - // as the Z-Height correction value. #define UBL_PROBE_PT_2_Y 20 #define UBL_PROBE_PT_3_X 180 #define UBL_PROBE_PT_3_Y 20 @@ -1012,6 +1010,9 @@ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== From 2d749d490baba907499cdf83a8222a26354b78ce Mon Sep 17 00:00:00 2001 From: Bob-the-Kuhn Date: Fri, 16 Feb 2018 02:18:50 -0600 Subject: [PATCH 22/46] Fix / complete USE_CONTROLLER_FAN (#9666) --- Marlin/src/Marlin.h | 4 ++++ Marlin/src/feature/controllerfan.cpp | 3 +++ Marlin/src/feature/power.cpp | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Marlin/src/Marlin.h b/Marlin/src/Marlin.h index b8e4ea150..bf56c79d8 100644 --- a/Marlin/src/Marlin.h +++ b/Marlin/src/Marlin.h @@ -208,6 +208,10 @@ extern millis_t max_inactive_time, stepper_inactive_time; #endif #endif +#if ENABLED(USE_CONTROLLER_FAN) + extern uint8_t controllerFanSpeed; +#endif + #if ENABLED(PID_EXTRUSION_SCALING) extern int lpq_len; #endif diff --git a/Marlin/src/feature/controllerfan.cpp b/Marlin/src/feature/controllerfan.cpp index 916c9b746..6a770b660 100644 --- a/Marlin/src/feature/controllerfan.cpp +++ b/Marlin/src/feature/controllerfan.cpp @@ -27,6 +27,8 @@ #include "../module/stepper_indirection.h" #include "../module/temperature.h" +uint8_t controllerFanSpeed; + void controllerfan_update() { static millis_t lastMotorOn = 0, // Last time a motor was turned on nextMotorCheck = 0; // Last time the state was checked @@ -56,6 +58,7 @@ void controllerfan_update() { // Fan off if no steppers have been enabled for CONTROLLERFAN_SECS seconds uint8_t speed = (!lastMotorOn || ELAPSED(ms, lastMotorOn + (CONTROLLERFAN_SECS) * 1000UL)) ? 0 : CONTROLLERFAN_SPEED; + controllerFanSpeed = speed; // allows digital or PWM fan output to be used (see M42 handling) WRITE(CONTROLLER_FAN_PIN, speed); diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index c72d7100e..d4bda257f 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -46,7 +46,7 @@ bool Power::is_power_needed() { HOTEND_LOOP() if (thermalManager.autofan_speed[e] > 0) return true; #endif - #if ENABLED(AUTO_POWER_CONTROLLERFAN) && HAS_CONTROLLER_FAN + #if ENABLED(AUTO_POWER_CONTROLLERFAN) && HAS_CONTROLLER_FAN && ENABLED(USE_CONTROLLER_FAN) if (controllerFanSpeed > 0) return true; #endif From 749bc42aa944fe59f012c30571429dab13468c8f Mon Sep 17 00:00:00 2001 From: teemuatlut Date: Fri, 16 Feb 2018 10:19:33 +0200 Subject: [PATCH 23/46] TMC SGT is int8 (#9651) --- Marlin/src/feature/tmc_util.cpp | 2 +- Marlin/src/feature/tmc_util.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/feature/tmc_util.cpp b/Marlin/src/feature/tmc_util.cpp index 11bec933a..21115c45f 100644 --- a/Marlin/src/feature/tmc_util.cpp +++ b/Marlin/src/feature/tmc_util.cpp @@ -236,7 +236,7 @@ void _tmc_say_pwmthrs(const char name[], const uint32_t thrs) { SERIAL_ECHO(name); SERIAL_ECHOLNPAIR(" stealthChop max speed set to ", thrs); } -void _tmc_say_sgt(const char name[], const uint32_t sgt) { +void _tmc_say_sgt(const char name[], const int8_t sgt) { SERIAL_ECHO(name); SERIAL_ECHOPGM(" driver homing sensitivity set to "); SERIAL_PRINTLN(sgt, DEC); diff --git a/Marlin/src/feature/tmc_util.h b/Marlin/src/feature/tmc_util.h index 46d5b4f28..2265fb9d9 100644 --- a/Marlin/src/feature/tmc_util.h +++ b/Marlin/src/feature/tmc_util.h @@ -43,7 +43,7 @@ void _tmc_say_current(const char name[], const uint16_t curr); void _tmc_say_otpw(const char name[], const bool otpw); void _tmc_say_otpw_cleared(const char name[]); void _tmc_say_pwmthrs(const char name[], const uint32_t thrs); -void _tmc_say_sgt(const char name[], const uint32_t sgt); +void _tmc_say_sgt(const char name[], const int8_t sgt); template void tmc_get_current(TMC &st, const char name[]) { From cff62042ee3dfa6e18a4b89c07c7995d9ad3692c Mon Sep 17 00:00:00 2001 From: Thomas Moore Date: Fri, 16 Feb 2018 02:34:36 -0600 Subject: [PATCH 24/46] Fix LCD manual movement on kinematic machines (#9655) --- Marlin/src/lcd/ultralcd.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index 220955c81..c4b6756d0 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -2818,7 +2818,10 @@ void kill_screen(const char* lcd_msg) { manual_move_offset = 0.0; manual_move_axis = (int8_t)NO_AXIS; - // Set a blocking flag so no new moves can be added until all segments are done + // DELTA and SCARA machines use segmented moves, which could fill the planner during the call to + // move_to_destination. This will cause idle() to be called, which can then call this function while the + // previous invocation is being blocked. Modifications to manual_move_offset shouldn't be made while + // processing_manual_move is true or the planner will get out of sync. processing_manual_move = true; prepare_move_to_destination(); // will call set_current_from_destination() processing_manual_move = false; @@ -2930,11 +2933,11 @@ void kill_screen(const char* lcd_msg) { } encoderPosition = 0; if (lcdDrawUpdate) { - const float pos = current_position[axis] + const float pos = (processing_manual_move ? destination[axis] : current_position[axis] #if IS_KINEMATIC + manual_move_offset #endif - ; + ); lcd_implementation_drawedit(name, move_menu_scale >= 0.1 ? ftostr41sign(pos) : ftostr43sign(pos)); } } From 241e55ef3b555ff46408cae329a037def27964eb Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 16 Feb 2018 17:32:12 -0600 Subject: [PATCH 25/46] Apply SERIAL_FLUSH macro --- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 6 +++--- Marlin/src/gcode/bedlevel/G26.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 30ed82c1c..c9524b07a 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -767,7 +767,7 @@ const float measured_z = probe_pt(rawx, rawy, stow_probe, g29_verbose_level); // TODO: Needs error handling z_values[location.x_index][location.y_index] = measured_z; } - MYSERIAL0.flush(); // Prevent host M105 buffer overrun. + SERIAL_FLUSH(); // Prevent host M105 buffer overrun. } while (location.x_index >= 0 && --max_iterations); STOW_PROBE(); @@ -905,7 +905,7 @@ SERIAL_PROTOCOL_F(z_values[location.x_index][location.y_index], 6); SERIAL_EOL(); } - MYSERIAL0.flush(); // Prevent host M105 buffer overrun. + SERIAL_FLUSH(); // Prevent host M105 buffer overrun. } while (location.x_index >= 0 && location.y_index >= 0); if (do_ubl_mesh_map) display_map(g29_map_type); // show user where we're probing @@ -1417,7 +1417,7 @@ do_blocking_move_to_z(h_offset + new_z); // Move the nozzle as the point is edited #endif idle(); - MYSERIAL0.flush(); // Prevent host M105 buffer overrun. + SERIAL_FLUSH(); // Prevent host M105 buffer overrun. } while (!is_lcd_clicked()); if (!lcd_map_control) lcd_return_to_status(); diff --git a/Marlin/src/gcode/bedlevel/G26.cpp b/Marlin/src/gcode/bedlevel/G26.cpp index dd84e4e39..6f2748d39 100644 --- a/Marlin/src/gcode/bedlevel/G26.cpp +++ b/Marlin/src/gcode/bedlevel/G26.cpp @@ -437,7 +437,7 @@ inline bool turn_on_heaters() { SERIAL_EOL(); } idle(); - MYSERIAL0.flush(); // Prevent host M105 buffer overrun. + SERIAL_FLUSH(); // Prevent host M105 buffer overrun. } #if ENABLED(ULTRA_LCD) } @@ -460,7 +460,7 @@ inline bool turn_on_heaters() { SERIAL_EOL(); } idle(); - MYSERIAL0.flush(); // Prevent host M105 buffer overrun. + SERIAL_FLUSH(); // Prevent host M105 buffer overrun. } #if ENABLED(ULTRA_LCD) @@ -809,12 +809,12 @@ void GcodeSuite::G26() { print_line_from_here_to_there(rx, ry, g26_layer_height, xe, ye, g26_layer_height); - MYSERIAL0.flush(); // Prevent host M105 buffer overrun. + SERIAL_FLUSH(); // Prevent host M105 buffer overrun. } if (look_for_lines_to_connect()) goto LEAVE; } - MYSERIAL0.flush(); // Prevent host M105 buffer overrun. + SERIAL_FLUSH(); // Prevent host M105 buffer overrun. } while (--g26_repeats && location.x_index >= 0 && location.y_index >= 0); LEAVE: From 1bf2b1e475c6b578486019eb3eba96185d0d70fb Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 16 Feb 2018 17:57:24 -0600 Subject: [PATCH 26/46] Use serial macro in sd_mmc_spi_mem.cpp for Due --- Marlin/src/HAL/HAL_DUE/usb/sd_mmc_spi_mem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/HAL/HAL_DUE/usb/sd_mmc_spi_mem.cpp b/Marlin/src/HAL/HAL_DUE/usb/sd_mmc_spi_mem.cpp index dfc169571..4de46104e 100644 --- a/Marlin/src/HAL/HAL_DUE/usb/sd_mmc_spi_mem.cpp +++ b/Marlin/src/HAL/HAL_DUE/usb/sd_mmc_spi_mem.cpp @@ -65,7 +65,7 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) { #ifdef DEBUG_MMC char buffer[80]; sprintf(buffer, "SDRD: %d @ 0x%08x\n", nb_sector, addr); - MYSERIAL0.print(buffer); + SERIAL_PROTOCOL_P(0, buffer); #endif // Start reading @@ -99,7 +99,7 @@ Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) { #ifdef DEBUG_MMC char buffer[80]; sprintf(buffer, "SDWR: %d @ 0x%08x\n", nb_sector, addr); - MYSERIAL0.print(buffer); + SERIAL_PROTOCOL_P(0, buffer); #endif if (!card.getSd2Card().writeStart(addr, nb_sector)) From d7f82c8ddffb42e34502bedfe9427ab5944221a9 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 16 Feb 2018 18:36:13 -0600 Subject: [PATCH 27/46] Drop extra avr/pgmspace include in _Bootscreen.h Addressing #9441 --- Marlin/src/config/examples/BQ/Hephestos_2/_Bootscreen.h | 1 - Marlin/src/config/examples/Cartesio/_Bootscreen.h | 1 - Marlin/src/config/examples/MakerParts/_Bootscreen.h | 1 - Marlin/src/config/examples/Malyan/M150/_Bootscreen.h | 1 - Marlin/src/config/examples/gCreate/gMax1.5+/_Bootscreen.h | 1 - frameworks/CMSIS/LPC1768/lib/WString.h | 1 - 6 files changed, 6 deletions(-) diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/_Bootscreen.h b/Marlin/src/config/examples/BQ/Hephestos_2/_Bootscreen.h index 23ebd8413..3ba0129ea 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/_Bootscreen.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/_Bootscreen.h @@ -29,7 +29,6 @@ * Use the Marlin Bitmap Converter to make your own: * http://marlinfw.org/tools/u8glib/converter.html */ -#include #define CUSTOM_BOOTSCREEN_BMPWIDTH 62 diff --git a/Marlin/src/config/examples/Cartesio/_Bootscreen.h b/Marlin/src/config/examples/Cartesio/_Bootscreen.h index 116980c82..e0efd8376 100644 --- a/Marlin/src/config/examples/Cartesio/_Bootscreen.h +++ b/Marlin/src/config/examples/Cartesio/_Bootscreen.h @@ -29,7 +29,6 @@ * Use the Marlin Bitmap Converter to make your own: * http://marlinfw.org/tools/u8glib/converter.html */ -#include #define CUSTOM_BOOTSCREEN_BMPWIDTH 64 diff --git a/Marlin/src/config/examples/MakerParts/_Bootscreen.h b/Marlin/src/config/examples/MakerParts/_Bootscreen.h index 26829dfa7..5ddf5c7ff 100644 --- a/Marlin/src/config/examples/MakerParts/_Bootscreen.h +++ b/Marlin/src/config/examples/MakerParts/_Bootscreen.h @@ -29,7 +29,6 @@ * Use the Marlin Bitmap Converter to make your own: * http://marlinfw.org/tools/u8glib/converter.html */ -#include #define CUSTOM_BOOTSCREEN_BMPWIDTH 128 diff --git a/Marlin/src/config/examples/Malyan/M150/_Bootscreen.h b/Marlin/src/config/examples/Malyan/M150/_Bootscreen.h index 01b6693f1..678a7a106 100644 --- a/Marlin/src/config/examples/Malyan/M150/_Bootscreen.h +++ b/Marlin/src/config/examples/Malyan/M150/_Bootscreen.h @@ -29,7 +29,6 @@ * Use the Marlin Bitmap Converter to make your own: * http://marlinfw.org/tools/u8glib/converter.html */ -#include #define CUSTOM_BOOTSCREEN_TIMEOUT 1000 #define CUSTOM_BOOTSCREEN_BMPWIDTH 128 diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/_Bootscreen.h b/Marlin/src/config/examples/gCreate/gMax1.5+/_Bootscreen.h index f08d25979..9fa6b953a 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/_Bootscreen.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/_Bootscreen.h @@ -29,7 +29,6 @@ * Use the Marlin Bitmap Converter to make your own: * http://marlinfw.org/tools/u8glib/converter.html */ -#include #define CUSTOM_BOOTSCREEN_BMPWIDTH 112 diff --git a/frameworks/CMSIS/LPC1768/lib/WString.h b/frameworks/CMSIS/LPC1768/lib/WString.h index 8a1876424..72089adf1 100644 --- a/frameworks/CMSIS/LPC1768/lib/WString.h +++ b/frameworks/CMSIS/LPC1768/lib/WString.h @@ -26,7 +26,6 @@ #include #include #include -//#include // When compiling programs with this class, the following gcc parameters // dramatically increase performance and memory (RAM) efficiency, typically From ff90cb409efa0c07ff68ac1aeb3a96d0434e58c6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 16 Feb 2018 21:37:07 -0600 Subject: [PATCH 28/46] No space for E2 with ReARM+RAMPS Addressing #9474 --- Marlin/src/pins/pins_RAMPS_RE_ARM.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Marlin/src/pins/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/pins_RAMPS_RE_ARM.h index 93e340968..9ef36b430 100644 --- a/Marlin/src/pins/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/pins_RAMPS_RE_ARM.h @@ -100,12 +100,12 @@ #define E1_CS_PIN -1 #endif -#define E2_STEP_PIN P2_08 // (36) -#define E2_DIR_PIN P2_13 // (34) -#define E2_ENABLE_PIN P4_29 // (30) -#ifndef E2_CS_PIN - #define E2_CS_PIN -1 -#endif +//#define E2_STEP_PIN P2_08 // (36) +//#define E2_DIR_PIN P2_13 // (34) +//#define E2_ENABLE_PIN P4_29 // (30) +//#ifndef E2_CS_PIN +// #define E2_CS_PIN -1 +//#endif // // Software SPI pins for TMC2130 stepper drivers From bd54ce830a8f9b717f144a95616d29bfbd31f567 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 16 Feb 2018 22:19:34 -0600 Subject: [PATCH 29/46] Include utility.h in neopixel.cpp --- Marlin/src/feature/leds/neopixel.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Marlin/src/feature/leds/neopixel.cpp b/Marlin/src/feature/leds/neopixel.cpp index c56b862ed..729b4b190 100644 --- a/Marlin/src/feature/leds/neopixel.cpp +++ b/Marlin/src/feature/leds/neopixel.cpp @@ -30,6 +30,10 @@ #include "neopixel.h" +#if ENABLED(NEOPIXEL_STARTUP_TEST) + #include "../../core/utility.h" +#endif + Adafruit_NeoPixel pixels(NEOPIXEL_PIXELS, NEOPIXEL_PIN, NEOPIXEL_TYPE + NEO_KHZ800); void set_neopixel_color(const uint32_t color) { From 3021058e6db35973b7b589359d299f4277590e9f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 16 Feb 2018 22:23:29 -0600 Subject: [PATCH 30/46] Fix non-UTF8 Czech language --- Marlin/src/lcd/language/language_cz.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/lcd/language/language_cz.h b/Marlin/src/lcd/language/language_cz.h index cb0f2a91d..72b68b9a4 100644 --- a/Marlin/src/lcd/language/language_cz.h +++ b/Marlin/src/lcd/language/language_cz.h @@ -357,13 +357,13 @@ #define MSG_FILAMENT_CHANGE_HEADER_PAUSE _UxGT("TISK POZASTAVEN") #define MSG_FILAMENT_CHANGE_HEADER_LOAD _UxGT("ZAVEDENI FILAMENTU") #define MSG_FILAMENT_CHANGE_HEADER_UNLOAD _UxGT("VYSUNUTI FILAMENTU") -#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("MOŽNOSTI OBNOVENI:") +#define MSG_FILAMENT_CHANGE_OPTION_HEADER _UxGT("MOZNOSTI OBNOVENI:") #define MSG_FILAMENT_CHANGE_OPTION_PURGE _UxGT("Vytlacit vic") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Obnovit tisk") #define MSG_FILAMENT_CHANGE_NOZZLE _UxGT(" Tryska: ") #define MSG_ERR_HOMING_FAILED _UxGT("Parkovani selhalo") #define MSG_ERR_PROBING_FAILED _UxGT("Kalibrace selhala") -#define MSG_M600_TOO_COLD _UxGT("M600: Moc studený") +#define MSG_M600_TOO_COLD _UxGT("M600: Moc studeny") #if LCD_HEIGHT >= 4 // Up to 3 lines allowed From bf5df306e16a415a0af002d1990317cca5331e8b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 17 Feb 2018 00:52:08 -0600 Subject: [PATCH 31/46] Fix compile error with SHOW_BOOTSCREEN disabled Fix #9530 Fix #9524 --- Marlin/src/lcd/dogm/dogm_bitmaps.h | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/Marlin/src/lcd/dogm/dogm_bitmaps.h b/Marlin/src/lcd/dogm/dogm_bitmaps.h index 85165dd73..f9bc106d6 100644 --- a/Marlin/src/lcd/dogm/dogm_bitmaps.h +++ b/Marlin/src/lcd/dogm/dogm_bitmaps.h @@ -118,14 +118,16 @@ #endif -#endif + #ifndef START_BMP_BYTEWIDTH + #define START_BMP_BYTEWIDTH ((START_BMPWIDTH + 7) / 8) + #endif + #ifndef START_BMPHEIGHT + #define START_BMPHEIGHT (sizeof(start_bmp) / (START_BMP_BYTEWIDTH)) + #endif + static_assert(sizeof(start_bmp) == (START_BMP_BYTEWIDTH) * (START_BMPHEIGHT), "Bootscreen (start_bmp) dimensions don't match data."); -// Here comes a compile-time operation to match the extruder symbols -// on the info screen to the set number of extruders in configuration.h -// -// When only one extruder is selected, the "1" on the symbol will not -// be displayed. +#endif #if ENABLED(CUSTOM_STATUS_SCREEN_IMAGE) @@ -601,13 +603,6 @@ #endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY -#ifndef START_BMP_BYTEWIDTH - #define START_BMP_BYTEWIDTH ((START_BMPWIDTH + 7) / 8) -#endif -#ifndef START_BMPHEIGHT - #define START_BMPHEIGHT (sizeof(start_bmp) / (START_BMP_BYTEWIDTH)) -#endif - #ifndef CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH #define CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH ((CUSTOM_BOOTSCREEN_BMPWIDTH + 7) / 8) #endif @@ -645,11 +640,6 @@ #error "Only 4 fan animation frames currently supported." #endif -// -// Make sure data size matches -// -static_assert(sizeof(start_bmp) == (START_BMP_BYTEWIDTH) * (START_BMPHEIGHT), "Bootscreen (start_bmp) dimensions don't match data."); - #define BMP_SIZE (STATUS_BMP_BYTEWIDTH) * (STATUS_SCREENHEIGHT) static_assert(sizeof(status_screen0_bmp) == BMP_SIZE, "Status header (status_screen0_bmp) dimensions don't match data."); #if FAN_ANIM_FRAMES > 1 From 168af8bacb0d2dae170f405e6da500cebac20753 Mon Sep 17 00:00:00 2001 From: blye Date: Thu, 25 Jan 2018 08:10:47 +0000 Subject: [PATCH 32/46] Allow LCD_SET_PROGRESS_MANUALLY without SDSUPPORT --- Marlin/src/lcd/ultralcd_impl_DOGM.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Marlin/src/lcd/ultralcd_impl_DOGM.h b/Marlin/src/lcd/ultralcd_impl_DOGM.h index 4e7b1e758..92dec8418 100644 --- a/Marlin/src/lcd/ultralcd_impl_DOGM.h +++ b/Marlin/src/lcd/ultralcd_impl_DOGM.h @@ -580,11 +580,9 @@ static void lcd_implementation_status_screen() { } #if ENABLED(SDSUPPORT) - // // SD Card Symbol // - if (card.isFileOpen() && PAGE_CONTAINS(42 - (TALL_FONT_CORRECTION), 51 - (TALL_FONT_CORRECTION))) { // Upper box u8g.drawBox(42, 42 - (TALL_FONT_CORRECTION), 8, 7); // 42-48 (or 41-47) @@ -595,11 +593,12 @@ static void lcd_implementation_status_screen() { // Corner pixel u8g.drawPixel(50, 43 - (TALL_FONT_CORRECTION)); // 43 (or 42) } + #endif // SDSUPPORT + #if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY) // // Progress bar frame // - #define PROGRESS_BAR_X 54 #define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X) @@ -650,7 +649,6 @@ static void lcd_implementation_status_screen() { #endif if (PAGE_CONTAINS(41, 48)) { - char buffer[10]; duration_t elapsed = print_job_timer.duration(); bool has_days = (elapsed.value >= 60*60*24L); @@ -659,7 +657,7 @@ static void lcd_implementation_status_screen() { lcd_print(buffer); } - #endif + #endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY // // XYZ Coordinates From 330437ad7c7e750c19619af01059748139940284 Mon Sep 17 00:00:00 2001 From: blye Date: Thu, 25 Jan 2018 08:33:32 +0000 Subject: [PATCH 33/46] Update LCD_SET_PROGRESS_MANUALLY in configs --- Marlin/Configuration_adv.h | 6 +++--- Marlin/src/config/default/Configuration_adv.h | 6 +++--- .../config/examples/AlephObjects/TAZ4/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/Anet/A6/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/Anet/A8/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h | 6 +++--- .../src/config/examples/BQ/Hephestos_2/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/Cartesio/Configuration_adv.h | 6 +++--- .../src/config/examples/Creality/CR-10/Configuration_adv.h | 6 +++--- .../src/config/examples/Creality/CR-10S/Configuration_adv.h | 6 +++--- .../src/config/examples/Creality/Ender/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/Felix/Configuration_adv.h | 6 +++--- .../config/examples/FolgerTech/i3-2020/Configuration_adv.h | 6 +++--- .../config/examples/Infitary/i3-M508/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/MakerParts/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/Malyan/M150/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/Malyan/M200/Configuration_adv.h | 6 +++--- .../examples/Micromake/C1/enhanced/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/RigidBot/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/SCARA/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/Sanguinololu/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/TheBorg/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/TinyBoy2/Configuration_adv.h | 6 +++--- .../config/examples/UltiMachine/Archim2/Configuration_adv.h | 6 +++--- .../src/config/examples/Velleman/K8200/Configuration_adv.h | 6 +++--- .../src/config/examples/Velleman/K8400/Configuration_adv.h | 6 +++--- .../config/examples/Wanhao/Duplicator 6/Configuration_adv.h | 6 +++--- .../examples/delta/FLSUN/auto_calibrate/Configuration_adv.h | 6 +++--- .../config/examples/delta/FLSUN/kossel/Configuration_adv.h | 6 +++--- .../examples/delta/FLSUN/kossel_mini/Configuration_adv.h | 6 +++--- .../src/config/examples/delta/generic/Configuration_adv.h | 6 +++--- .../config/examples/delta/kossel_mini/Configuration_adv.h | 6 +++--- .../config/examples/delta/kossel_pro/Configuration_adv.h | 6 +++--- .../src/config/examples/delta/kossel_xl/Configuration_adv.h | 6 +++--- .../config/examples/gCreate/gMax1.5+/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/makibox/Configuration_adv.h | 6 +++--- .../src/config/examples/tvrrug/Round2/Configuration_adv.h | 6 +++--- Marlin/src/config/examples/wt150/Configuration_adv.h | 6 +++--- 43 files changed, 129 insertions(+), 129 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index d74efa330..f7fc3d406 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index d74efa330..f7fc3d406 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index bac805e2a..c451f0642 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index 3312831c5..5928bdcd8 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 33481688b..7b00dc53a 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h index 721c99633..fd8c42e87 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h @@ -491,6 +491,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -581,9 +584,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h index 6d8a9309e..dd6afbbfd 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index b6f6cb958..ec7c3b778 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT 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 47b4e8d31..2a583e80a 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 #define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index b6f6cb958..ec7c3b778 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index bc018543a..edf506e2e 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT 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 b039009a1..696d20213 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h index 510f326c6..d649203b3 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h index 0952a2c8b..a21f541dc 100644 --- a/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index 04a60dca1..1a755196c 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h index 3fe6086b7..80f2b52a2 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT 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 8c9bad66b..763cf76da 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h index 10e158ea9..12ed9b789 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h index 251cc13ae..bddaeade4 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h +++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus #define LCD_TIMEOUT_TO_STATUS 30000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 #define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index e8564fa5c..94ae68871 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 #define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h index d19f36752..cd7d0aba5 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 #define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h index ab4923160..5170c3d43 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index 9c427fc78..e97930502 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -491,6 +491,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -581,9 +584,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index b2c1074d5..f44f75499 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index 5f535c7f2..b2bde31fa 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index dea3d7119..6dffde953 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h index b803b1331..3de031bd0 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h +++ b/Marlin/src/config/examples/TheBorg/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index 83e268851..e924275f8 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h index 0322af662..ae3ad1ca2 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index ce7739563..284114ca2 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -503,6 +503,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -593,9 +596,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 #define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index b71b38352..90c2b6726 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index a3c278774..ba2fd0242 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -492,6 +492,9 @@ // The timeout (in ms) to return to the status screen from sub-menus #define LCD_TIMEOUT_TO_STATUS 60000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -582,9 +585,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT 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 fd147fd35..4a5cc93b6 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 @@ -492,6 +492,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -582,9 +585,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h index 4c1ba8376..7ad6c4191 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -492,6 +492,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -582,9 +585,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT 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 6f781bc95..e2444b440 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 @@ -492,6 +492,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -582,9 +585,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index 6f781bc95..e2444b440 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -492,6 +492,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -582,9 +585,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT 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 6f781bc95..e2444b440 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -492,6 +492,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -582,9 +585,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT 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 9b836c723..93df5688f 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -497,6 +497,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -587,9 +590,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT 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 2a5e39e8b..1cc0fe829 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -492,6 +492,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -582,9 +585,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT 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 231a00420..dc958a01d 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index e98699f92..e5ecde2d2 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index f2cd424e2..af842f9c5 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -490,6 +490,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -580,9 +583,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index 6bbb8be3a..02e650e1c 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -491,6 +491,9 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + /** * LED Control Menu * Enable this feature to add LED Control to the LCD menu @@ -581,9 +584,6 @@ //#define LCD_PROGRESS_BAR_TEST #endif - // Add an 'M73' G-code to set the current percentage - //#define LCD_SET_PROGRESS_MANUALLY - // This allows hosts to request long names for files and folders with M33 //#define LONG_FILENAME_HOST_SUPPORT From f6cc89ec7c287b3047b100dd5ac0ecf4d8706bcf Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 17 Feb 2018 08:01:36 -0600 Subject: [PATCH 34/46] LCD_PROGRESS_BAR w/out SDSUPPORT for character LCD --- Marlin/src/inc/SanityCheck.h | 4 ++-- Marlin/src/lcd/ultralcd_impl_HD44780.h | 28 ++++++++++++-------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 3ca4aa623..af1762dc3 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -327,8 +327,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, * Progress Bar */ #if ENABLED(LCD_PROGRESS_BAR) - #if DISABLED(SDSUPPORT) - #error "LCD_PROGRESS_BAR requires SDSUPPORT." + #if DISABLED(SDSUPPORT) && DISABLED(LCD_SET_PROGRESS_MANUALLY) + #error "LCD_PROGRESS_BAR requires SDSUPPORT or LCD_SET_PROGRESS_MANUALLY." #elif DISABLED(ULTRA_LCD) #error "LCD_PROGRESS_BAR requires a character LCD." #elif ENABLED(DOGLCD) diff --git a/Marlin/src/lcd/ultralcd_impl_HD44780.h b/Marlin/src/lcd/ultralcd_impl_HD44780.h index 0d011e30f..70dc5294b 100644 --- a/Marlin/src/lcd/ultralcd_impl_HD44780.h +++ b/Marlin/src/lcd/ultralcd_impl_HD44780.h @@ -426,23 +426,21 @@ static void lcd_set_custom_characters( createChar_P(LCD_FEEDRATE_CHAR, feedrate); createChar_P(LCD_CLOCK_CHAR, clock); - #if ENABLED(SDSUPPORT) - #if ENABLED(LCD_PROGRESS_BAR) - if (screen_charset == CHARSET_INFO) { // 3 Progress bar characters for info screen - for (int16_t i = 3; i--;) - createChar_P(LCD_STR_PROGRESS[i], progress[i]); - } - else - #endif - { // SD Card sub-menu special characters - createChar_P(LCD_UPLEVEL_CHAR, uplevel); + #if ENABLED(LCD_PROGRESS_BAR) + if (screen_charset == CHARSET_INFO) { // 3 Progress bar characters for info screen + for (int16_t i = 3; i--;) + createChar_P(LCD_STR_PROGRESS[i], progress[i]); + } + else + #endif + { + createChar_P(LCD_UPLEVEL_CHAR, uplevel); + #if ENABLED(SDSUPPORT) + // SD Card sub-menu special characters createChar_P(LCD_STR_REFRESH[0], refresh); createChar_P(LCD_STR_FOLDER[0], folder); - } - #else - // With no SD support, only need the uplevel character - createChar_P(LCD_UPLEVEL_CHAR, uplevel); - #endif + #endif + } } } } From 472229b974087e330d5be27c0058ad808e5ac55c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 17 Feb 2018 08:27:54 -0600 Subject: [PATCH 35/46] Fix #9681 --- Marlin/src/module/configuration_store.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp index cd2019324..6799b1f93 100644 --- a/Marlin/src/module/configuration_store.cpp +++ b/Marlin/src/module/configuration_store.cpp @@ -886,7 +886,7 @@ void MarlinSettings::postprocess() { } else { float dummy = 0; - #if DISABLED(AUTO_BED_LEVELING_UBL) || DISABLED(FWRETRACT) + #if DISABLED(AUTO_BED_LEVELING_UBL) || DISABLED(FWRETRACT) || ENABLED(NO_VOLUMETRICS) bool dummyb; #endif From 7d093edc18cb1a851a6d4b96ffce5dbab5d9fb02 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 17 Feb 2018 15:45:26 -0600 Subject: [PATCH 36/46] Add Tronxy XY100 configuration Based on #9674 --- .../examples/Tronxy/XY100/Configuration.h | 1833 +++++++++++++++++ 1 file changed, 1833 insertions(+) create mode 100644 Marlin/src/config/examples/Tronxy/XY100/Configuration.h diff --git a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h new file mode 100644 index 000000000..86d3223fa --- /dev/null +++ b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h @@ -0,0 +1,1833 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Configuration.h + * + * Basic settings such as: + * + * - Type of electronics + * - Type of temperature sensor + * - Printer geometry + * - Endstop configuration + * - LCD controller + * - Extra features + * + * Advanced settings can be found in Configuration_adv.h + * + */ +#ifndef CONFIGURATION_H +#define CONFIGURATION_H +#define CONFIGURATION_H_VERSION 020000 + +//=========================================================================== +//============================= Getting Started ============================= +//=========================================================================== + +/** + * Here are some standard links for getting your machine calibrated: + * + * http://reprap.org/wiki/Calibration + * http://youtu.be/wAL9d7FgInk + * http://calculator.josefprusa.cz + * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide + * http://www.thingiverse.com/thing:5573 + * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap + * http://www.thingiverse.com/thing:298812 + */ + +//=========================================================================== +//============================= DELTA Printer =============================== +//=========================================================================== +// For a Delta printer start with one of the configuration files in the +// config/examples/delta directory and customize for your machine. +// + +//=========================================================================== +//============================= SCARA Printer =============================== +//=========================================================================== +// For a SCARA printer start with the configuration files in +// config/examples/SCARA and customize for your machine. +// + +// @section info + +// User-specified version info of this build to display in [Pronterface, etc] terminal window during +// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this +// build by the user have been successfully uploaded into firmware. +#define STRING_CONFIG_H_AUTHOR "(Rob Griffiths, default config)" // Who made the changes. +#define SHOW_BOOTSCREEN +#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 +#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 + +// +// *** VENDORS PLEASE READ ***************************************************** +// +// Marlin now allow you to have a vendor boot image to be displayed on machine +// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your +// custom boot image and then the default Marlin boot image is shown. +// +// We suggest for you to take advantage of this new feature and keep the Marlin +// boot image unmodified. For an example have a look at the bq Hephestos 2 +// example configuration folder. +// +//#define SHOW_CUSTOM_BOOTSCREEN + +// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +//#define CUSTOM_STATUS_SCREEN_IMAGE + +// @section machine + +/** + * Select the serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader. + * + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +#define SERIAL_PORT 0 + +/** + * Select a secondary serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Serial port -1 is the USB emulated serial port, if available. + * + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +#define SERIAL_PORT_2 -1 + +/** + * This setting determines the communication speed of the printer. + * + * 250000 works in most cases, but you might try a lower speed if + * you commonly experience drop-outs during host printing. + * You may try up to 1000000 to speed up SD file transfer. + * + * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] + */ +#define BAUDRATE 250000 + +// Enable the Bluetooth serial interface on AT90USB devices +//#define BLUETOOTH + +// The following define selects which electronics board you have. +// Please choose the name from boards.h that matches your setup +#ifndef MOTHERBOARD + #define MOTHERBOARD BOARD_MELZI +#endif + +// Optional custom name for your RepStrap or other custom machine +// Displayed in the LCD "Ready" message +#define CUSTOM_MACHINE_NAME "TronXY XY100" + +// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) +// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) +//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" + +// @section extruder + +// This defines the number of extruders +// :[1, 2, 3, 4, 5] +#define EXTRUDERS 1 + +// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc. +#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 + +// For Cyclops or any "multi-extruder" that shares a single nozzle. +//#define SINGLENOZZLE + +/** + * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants. + * + * This device allows one stepper driver on a control board to drive + * two to eight stepper motors, one at a time, in a manner suitable + * for extruders. + * + * This option only allows the multiplexer to switch on tool-change. + * Additional options to configure custom E moves are pending. + */ +//#define MK2_MULTIPLEXER +#if ENABLED(MK2_MULTIPLEXER) + // Override the default DIO selector pins here, if needed. + // Some pins files may provide defaults for these pins. + //#define E_MUX0_PIN 40 // Always Required + //#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers + //#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers +#endif + +// A dual extruder that uses a single stepper motor +//#define SWITCHING_EXTRUDER +#if ENABLED(SWITCHING_EXTRUDER) + #define SWITCHING_EXTRUDER_SERVO_NR 0 + #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3] + #if EXTRUDERS > 3 + #define SWITCHING_EXTRUDER_E23_SERVO_NR 1 + #endif +#endif + +// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles +//#define SWITCHING_NOZZLE +#if ENABLED(SWITCHING_NOZZLE) + #define SWITCHING_NOZZLE_SERVO_NR 0 + #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 + //#define HOTEND_OFFSET_Z { 0.0, 0.0 } +#endif + +/** + * Two separate X-carriages with extruders that connect to a moving part + * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN. + */ +//#define PARKING_EXTRUDER +#if ENABLED(PARKING_EXTRUDER) + #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage + #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil + #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined. + #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders + #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder + #define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking + #define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0. +#endif + +/** + * "Mixing Extruder" + * - Adds a new code, M165, to set the current mix factors. + * - Extends the stepping routines to move multiple steppers in proportion to the mix. + * - Optional support for Repetier Firmware M163, M164, and virtual extruder. + * - This implementation supports only a single extruder. + * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation + */ +//#define MIXING_EXTRUDER +#if ENABLED(MIXING_EXTRUDER) + #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder + #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 + //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands +#endif + +// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). +// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). +// For the other hotends it is their distance from the extruder 0 hotend. +//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis +//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis + +// @section machine + +/** + * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN + * + * 0 = No Power Switch + * 1 = ATX + * 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) + * + * :{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' } + */ +#define POWER_SUPPLY 0 + +#if POWER_SUPPLY > 0 + // Enable this option to leave the PSU off at startup. + // Power to steppers and heaters will need to be turned on with M80. + //#define PS_DEFAULT_OFF + + //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin + #if ENABLED(AUTO_POWER_CONTROL) + #define AUTO_POWER_FANS // Turn on PSU if fans need power + #define AUTO_POWER_E_FANS + #define AUTO_POWER_CONTROLLERFAN + #define POWER_TIMEOUT 30 + #endif + +#endif + +// @section temperature + +//=========================================================================== +//============================= Thermal Settings ============================ +//=========================================================================== + +/** + * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table + * + * Temperature sensors available: + * + * -3 : thermocouple with MAX31855 (only for sensor 0) + * -2 : thermocouple with MAX6675 (only for sensor 0) + * -1 : thermocouple with AD595 + * 0 : not used + * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) + * 3 : Mendel-parts thermistor (4.7k pullup) + * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! + * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup) + * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) + * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) + * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) + * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) + * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) + * 10 : 100k RS thermistor 198-961 (4.7k pullup) + * 11 : 100k beta 3950 1% thermistor (4.7k pullup) + * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) + * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" + * 15 : 100k thermistor calibration for JGAurora A5 hotend + * 20 : the PT100 circuit found in the Ultimainboard V2.x + * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 + * 66 : 4.7M High Temperature thermistor from Dyze Design + * 70 : the 100K thermistor found in the bq Hephestos 2 + * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor + * + * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k. + * (but gives greater accuracy and more stable PID) + * 51 : 100k thermistor - EPCOS (1k pullup) + * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup) + * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) + * + * 1047 : Pt1000 with 4k7 pullup + * 1010 : Pt1000 with 1k pullup (non standard) + * 147 : Pt100 with 4k7 pullup + * 110 : Pt100 with 1k pullup (non standard) + * + * Use these for Testing or Development purposes. NEVER for production machine. + * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. + * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. + * + * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + */ +#define TEMP_SENSOR_0 1 +#define TEMP_SENSOR_1 0 +#define TEMP_SENSOR_2 0 +#define TEMP_SENSOR_3 0 +#define TEMP_SENSOR_4 0 +#define TEMP_SENSOR_BED 0 + +// Dummy thermistor constant temperature readings, for use with 998 and 999 +#define DUMMY_THERMISTOR_998_VALUE 25 +#define DUMMY_THERMISTOR_999_VALUE 100 + +// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings +// from the two sensors differ too much the print will be aborted. +//#define TEMP_SENSOR_1_AS_REDUNDANT +#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 + +// Extruder temperature must be close to target for this long before M109 returns success +#define TEMP_RESIDENCY_TIME 10 // (seconds) +#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one +#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. + +// Bed temperature must be close to target for this long before M190 returns success +#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) +#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one +#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. + +// The minimal temperature defines the temperature below which the heater will not be enabled It is used +// to check that the wiring to the thermistor is not broken. +// Otherwise this would lead to the heater being powered on all the time. +#define HEATER_0_MINTEMP 5 +#define HEATER_1_MINTEMP 5 +#define HEATER_2_MINTEMP 5 +#define HEATER_3_MINTEMP 5 +#define HEATER_4_MINTEMP 5 +#define BED_MINTEMP 5 + +// When temperature exceeds max temp, your heater will be switched off. +// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! +// You should use MINTEMP for thermistor short/failure protection. +#define HEATER_0_MAXTEMP 275 +#define HEATER_1_MAXTEMP 275 +#define HEATER_2_MAXTEMP 275 +#define HEATER_3_MAXTEMP 275 +#define HEATER_4_MAXTEMP 275 +#define BED_MAXTEMP 150 + +//=========================================================================== +//============================= PID Settings ================================ +//=========================================================================== +// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning + +// Comment the following line to disable PID and enable bang-bang. +#define PIDTEMP +#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current +#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current +#define PID_K1 0.95 // Smoothing factor within any PID loop +#if ENABLED(PIDTEMP) + #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. + //#define PID_DEBUG // Sends debug data to the serial port. + //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX + //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay + //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) + // Set/get with gcode: M301 E[extruder number, 0-2] + #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature + // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. + + // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it + + // Ultimaker + // #define DEFAULT_Kp 22.2 + // #define DEFAULT_Ki 1.08 + // #define DEFAULT_Kd 114 + + // MakerGear + //#define DEFAULT_Kp 7.0 + //#define DEFAULT_Ki 0.1 + //#define DEFAULT_Kd 12 + + // Mendel Parts V9 on 12V + //#define DEFAULT_Kp 63.0 + //#define DEFAULT_Ki 2.25 + //#define DEFAULT_Kd 440 + + // TronXY XY-100 Standard Extruder at 210 Degree Celsius and 100% Fan + // (measured after M106 S255 with M303 E0 S210 C8) + // #define DEFAULT_Kp 20.32 + // #define DEFAULT_Ki 1.18 + // #define DEFAULT_Kd 87.80 + + // TronXY XY-100 Standard Extruder, from original firmware + #define DEFAULT_Kp 7.0000 + #define DEFAULT_Ki 2.0000 + #define DEFAULT_Kd 40.0000 + +#endif // PIDTEMP + +//=========================================================================== +//============================= PID > Bed Temperature Control =============== +//=========================================================================== +// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis +// +// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. +// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, +// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. +// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. +// If your configuration is significantly different than this and you don't understand the issues involved, you probably +// shouldn't use bed PID until someone else verifies your hardware works. +// If this is enabled, find your own PID constants below. +//#define PIDTEMPBED + +//#define BED_LIMIT_SWITCHING + +// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. +// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) +// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, +// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) +#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current + +#if ENABLED(PIDTEMPBED) + + //#define PID_BED_DEBUG // Sends debug data to the serial port. + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) + #define DEFAULT_bedKp 10.00 + #define DEFAULT_bedKi .023 + #define DEFAULT_bedKd 305.4 + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from pidautotune + //#define DEFAULT_bedKp 97.1 + //#define DEFAULT_bedKi 1.41 + //#define DEFAULT_bedKd 1675.16 + + // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. +#endif // PIDTEMPBED + +// @section extruder + +// This option prevents extrusion if the temperature is below EXTRUDE_MINTEMP. +// It also enables the M302 command to set the minimum extrusion temperature +// or to allow moving the extruder regardless of the hotend temperature. +// *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! *** +#define PREVENT_COLD_EXTRUSION +#define EXTRUDE_MINTEMP 170 + +// This option prevents a single extrusion longer than EXTRUDE_MAXLENGTH. +// Note that for Bowden Extruders a too-small value here may prevent loading. +#define PREVENT_LENGTHY_EXTRUDE +#define EXTRUDE_MAXLENGTH 200 + +//=========================================================================== +//======================== Thermal Runaway Protection ======================= +//=========================================================================== + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * If you get "Thermal Runaway" or "Heating failed" errors the + * details can be tuned in Configuration_adv.h + */ + +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed + +//=========================================================================== +//============================= Mechanical Settings ========================= +//=========================================================================== + +// @section machine + +// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics +// either in the usual order or reversed +//#define COREXY +//#define COREXZ +//#define COREYZ +//#define COREYX +//#define COREZX +//#define COREZY + +//=========================================================================== +//============================== Endstop Settings =========================== +//=========================================================================== + +// @section homing + +// Specify here all the endstop connectors that are connected to any endstop or probe. +// Almost all printers will be using one per axis. Probes will use one or more of the +// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. +#define USE_XMIN_PLUG +#define USE_YMIN_PLUG +#define USE_ZMIN_PLUG +//#define USE_XMAX_PLUG +//#define USE_YMAX_PLUG +//#define USE_ZMAX_PLUG + +// coarse Endstop Settings +#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors + +#if DISABLED(ENDSTOPPULLUPS) + // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined + //#define ENDSTOPPULLUP_XMAX + //#define ENDSTOPPULLUP_YMAX + //#define ENDSTOPPULLUP_ZMAX + //#define ENDSTOPPULLUP_XMIN + //#define ENDSTOPPULLUP_YMIN + //#define ENDSTOPPULLUP_ZMIN + //#define ENDSTOPPULLUP_ZMIN_PROBE +#endif + +// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). +#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. +#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. +#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. +#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. + +// Enable this feature if all enabled endstop pins are interrupt-capable. +// This will remove the need to poll the interrupt pins, saving many CPU cycles. +//#define ENDSTOP_INTERRUPTS_FEATURE + +//============================================================================= +//============================== Movement Settings ============================ +//============================================================================= +// @section motion + +/** + * Default Settings + * + * These settings can be reset by M502 + * + * Note that if EEPROM is enabled, saved values will override these. + */ + +/** + * With this option each E stepper can have its own factors for the + * following movement settings. If fewer factors are given than the + * total number of extruders, the last value applies to the rest. + */ +//#define DISTINCT_E_FACTORS + +/** + * Default Axis Steps Per Unit (steps/mm) + * Override with M92 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] + */ +#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 1600, 90 } + +/** + * Default Max Feed Rate (mm/s) + * Override with M203 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] + */ +#define DEFAULT_MAX_FEEDRATE { 400, 400, 4, 50 } + +/** + * Default Max Acceleration (change/s) change = mm/s + * (Maximum start speed for accelerated moves) + * Override with M201 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] + */ +#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 1000, 5000 } + +/** + * Default Acceleration (change/s) change = mm/s + * Override with M204 + * + * M204 P Acceleration + * M204 R Retract Acceleration + * M204 T Travel Acceleration + */ +#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves + +/** + * Default Jerk (mm/s) + * Override with M205 X Y Z E + * + * "Jerk" specifies the minimum speed change that requires acceleration. + * When changing speed and direction, if the difference is less than the + * value set here, it may happen instantaneously. + */ +#define DEFAULT_XJERK 20.0 +#define DEFAULT_YJERK 20.0 +#define DEFAULT_ZJERK 0.4 +#define DEFAULT_EJERK 5.0 + +//=========================================================================== +//============================= Z Probe Options ============================= +//=========================================================================== +// @section probes + +// +// See http://marlinfw.org/docs/configuration/probes.html +// + +/** + * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + * + * Enable this option for a probe connected to the Z Min endstop pin. + */ +#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + +/** + * Z_MIN_PROBE_ENDSTOP + * + * Enable this option for a probe connected to any pin except Z-Min. + * (By default Marlin assumes the Z-Max endstop pin.) + * To use a custom Z Probe pin, set Z_MIN_PROBE_PIN below. + * + * - The simplest option is to use a free endstop connector. + * - Use 5V for powered (usually inductive) sensors. + * + * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin: + * - For simple switches connect... + * - normally-closed switches to GND and D32. + * - normally-open switches to 5V and D32. + * + * WARNING: Setting the wrong pin may have unexpected and potentially + * disastrous consequences. Use with caution and do your homework. + * + */ +//#define Z_MIN_PROBE_ENDSTOP + +/** + * Probe Type + * + * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. + * Activate one of these to use Auto Bed Leveling below. + */ + +/** + * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe. + * Use G29 repeatedly, adjusting the Z height at each point with movement commands + * or (with LCD_BED_LEVELING) the LCD controller. + */ +//#define PROBE_MANUALLY + +/** + * A Fix-Mounted Probe either doesn't deploy or needs manual deployment. + * (e.g., an inductive probe or a nozzle-based probe-switch.) + */ +//#define FIX_MOUNTED_PROBE + +/** + * Z Servo Probe, such as an endstop switch on a rotating arm. + */ +//#define Z_ENDSTOP_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles + +/** + * The BLTouch probe uses a Hall effect sensor and emulates a servo. + */ +//#define BLTOUCH +#if ENABLED(BLTOUCH) + //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed +#endif + +/** + * Enable one or more of the following if probing seems unreliable. + * Heaters and/or fans can be disabled during probing to minimize electrical + * noise. A delay can also be added to allow noise and vibration to settle. + * These options are most useful for the BLTouch probe, but may also improve + * readings with inductive probes and piezo sensors. + */ +//#define PROBING_HEATERS_OFF // Turn heaters off when probing +//#define PROBING_FANS_OFF // Turn fans off when probing +//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors + +// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) +//#define SOLENOID_PROBE + +// A sled-mounted probe like those designed by Charles Bell. +//#define Z_PROBE_SLED +//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. + +// +// For Z_PROBE_ALLEN_KEY see the Delta example configurations. +// + +/** + * Z Probe to nozzle (X,Y) offset, relative to (0, 0). + * X and Y offsets must be integers. + * + * In the following example the X and Y offsets are both positive: + * #define X_PROBE_OFFSET_FROM_EXTRUDER 10 + * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 + * + * +-- BACK ---+ + * | | + * L | (+) P | R <-- probe (20,20) + * E | | I + * F | (-) N (+) | G <-- nozzle (10,10) + * T | | H + * | (-) | T + * | | + * O-- FRONT --+ + * (0,0) + */ +#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle] +#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle] +#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] + +// X and Y axis travel speed (mm/m) between probes +#define XY_PROBE_SPEED 8000 + +// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2) +#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z + +// Speed for the "accurate" probe of each point +#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) + +// The number of probes to perform at each point. +// Set to 2 for a fast/slow probe, using the second probe result. +// Set to 3 or more for slow probes, averaging the results. +//#define MULTIPLE_PROBING 2 + +/** + * Z probes require clearance when deploying, stowing, and moving between + * probe points to avoid hitting the bed and other hardware. + * Servo-mounted probes require extra space for the arm to rotate. + * Inductive probes need space to keep from triggering early. + * + * Use these settings to specify the distance (mm) to raise the probe (or + * lower the bed). The values set here apply over and above any (negative) + * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD. + * Only integer values >= 1 are valid here. + * + * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle. + * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle. + */ +#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow +#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points + +// For M851 give a range for adjusting the Z probe offset +#define Z_PROBE_OFFSET_RANGE_MIN -20 +#define Z_PROBE_OFFSET_RANGE_MAX 20 + +// Enable the M48 repeatability test to test probe accuracy +//#define Z_MIN_PROBE_REPEATABILITY_TEST + +// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 +// :{ 0:'Low', 1:'High' } +#define X_ENABLE_ON 0 +#define Y_ENABLE_ON 0 +#define Z_ENABLE_ON 0 +#define E_ENABLE_ON 0 // For all extruders + +// Disables axis stepper immediately when it's not being used. +// WARNING: When motors turn off there is a chance of losing position accuracy! +#define DISABLE_X false +#define DISABLE_Y false +#define DISABLE_Z false +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING + +// @section extruder + +#define DISABLE_E false // For all extruders +#define DISABLE_INACTIVE_EXTRUDER true // Keep only the active extruder enabled. + +// @section machine + +// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. +#define INVERT_X_DIR false +#define INVERT_Y_DIR false +#define INVERT_Z_DIR true + +// Enable this option for Toshiba stepper drivers +//#define CONFIG_STEPPERS_TOSHIBA + +// @section extruder + +// For direct drive extruder v9 set to true, for geared extruder set to false. +#define INVERT_E0_DIR false +#define INVERT_E1_DIR false +#define INVERT_E2_DIR false +#define INVERT_E3_DIR false +#define INVERT_E4_DIR false + +// @section homing + +//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed + +#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... + // Be sure you have this distance over your Z_MAX_POS in case. + +// Direction of endstops when homing; 1=MAX, -1=MIN +// :[-1,1] +#define X_HOME_DIR -1 +#define Y_HOME_DIR -1 +#define Z_HOME_DIR -1 + +// @section machine + +// The size of the print bed +#define X_BED_SIZE 120 +#define Y_BED_SIZE 140 + +// Travel limits (mm) after homing, corresponding to endstop positions. +#define X_MIN_POS -10 +#define Y_MIN_POS 0 +#define Z_MIN_POS 0 +#define X_MAX_POS X_BED_SIZE +#define Y_MAX_POS Y_BED_SIZE +#define Z_MAX_POS 130 + +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds +#define MIN_SOFTWARE_ENDSTOPS +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds +#define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif + +/** + * Filament Runout Sensor + * A mechanical or opto endstop is used to check for the presence of filament. + * + * RAMPS-based boards use SERVO3_PIN. + * For other boards you may need to define FIL_RUNOUT_PIN. + * By default the firmware assumes HIGH = has filament, LOW = ran out + */ +//#define FILAMENT_RUNOUT_SENSOR +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. + #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. + #define FILAMENT_RUNOUT_SCRIPT "M600" +#endif + +//=========================================================================== +//=============================== Bed Leveling ============================== +//=========================================================================== +// @section calibrate + +/** + * Choose one of the options below to enable G29 Bed Leveling. The parameters + * and behavior of G29 will change depending on your selection. + * + * If using a Probe for Z Homing, enable Z_SAFE_HOMING also! + * + * - AUTO_BED_LEVELING_3POINT + * Probe 3 arbitrary points on the bed (that aren't collinear) + * You specify the XY coordinates of all 3 points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_LINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_BILINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a mesh, best for large or uneven beds. + * + * - 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. + * + * - MESH_BED_LEVELING + * Probe a grid manually + * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.) + * For machines without a probe, Mesh Bed Leveling provides a method to perform + * leveling in steps so you can manually adjust the Z height at each grid-point. + * With an LCD controller the process is guided step-by-step. + */ +//#define AUTO_BED_LEVELING_3POINT +//#define AUTO_BED_LEVELING_LINEAR +//#define AUTO_BED_LEVELING_BILINEAR +//#define AUTO_BED_LEVELING_UBL +//#define MESH_BED_LEVELING + +/** + * Enable detailed logging of G28, G29, M48, etc. + * Turn on with the command 'M111 S32'. + * NOTE: Requires a lot of PROGMEM! + */ +//#define DEBUG_LEVELING_FEATURE + +#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, + // at which point movement will be level to the machine's XY plane. + // The height can be set with M420 Z + #define ENABLE_LEVELING_FADE_HEIGHT + + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. This follows the + // contours of the bed more closely than edge-to-edge straight moves. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + + /** + * Enable the G26 Mesh Validation Pattern tool. + */ + //#define G26_MESH_VALIDATION + #if ENABLED(G26_MESH_VALIDATION) + #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle. + #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool. + #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool. + #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool. + #endif + +#endif + +#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) + + // Set the number of grid points per dimension. + #define GRID_MAX_POINTS_X 3 + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + // The Z probe minimum outer margin (to validate G29 parameters). + #define MIN_PROBE_EDGE 10 + + // Set the boundaries for probing (where the probe can reach). + #define LEFT_PROBE_BED_POSITION 15 + #define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - 15) + #define FRONT_PROBE_BED_POSITION 15 + #define BACK_PROBE_BED_POSITION (Y_BED_SIZE - 15) + + // Probe along the Y axis, advancing X after each column + //#define PROBE_Y_FIRST + + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + + // Beyond the probed grid, continue the implied tilt? + // Default is to maintain the height of the nearest edge. + //#define EXTRAPOLATE_BEYOND_GRID + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + + #endif + +#elif ENABLED(AUTO_BED_LEVELING_3POINT) + + // 3 arbitrary points to probe. + // A simple cross-product is used to estimate the plane of the bed. + #define ABL_PROBE_PT_1_X 15 + #define ABL_PROBE_PT_1_Y 180 + #define ABL_PROBE_PT_2_X 15 + #define ABL_PROBE_PT_2_Y 20 + #define ABL_PROBE_PT_3_X 170 + #define ABL_PROBE_PT_3_Y 20 + +#elif ENABLED(AUTO_BED_LEVELING_UBL) + + //=========================================================================== + //========================= Unified Bed Leveling ============================ + //=========================================================================== + + //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh + + #define MESH_INSET 1 // Mesh inset margin on print area + #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + #define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh + #define UBL_PROBE_PT_1_Y 180 + #define UBL_PROBE_PT_2_X 39 + #define UBL_PROBE_PT_2_Y 20 + #define UBL_PROBE_PT_3_X 180 + #define UBL_PROBE_PT_3_Y 20 + + #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + +#elif ENABLED(MESH_BED_LEVELING) + + //=========================================================================== + //=================================== Mesh ================================== + //=========================================================================== + + #define MESH_INSET 10 // Mesh inset margin on print area + #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS + +#endif // BED_LEVELING + +/** + * Use the LCD controller for bed leveling + * Requires MESH_BED_LEVELING or PROBE_MANUALLY + */ +//#define LCD_BED_LEVELING + +#if ENABLED(LCD_BED_LEVELING) + #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. + #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment +#endif + +// Add a menu item to move between bed corners for manual bed adjustment +//#define LEVEL_BED_CORNERS + +/** + * Commands to execute at the end of G29 probing. + * Useful to retract or move the Z probe out of the way. + */ +//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" + + +// @section homing + +// The center of the bed is at (X=0, Y=0) +//#define BED_CENTER_AT_0_0 + +// Manually set the home position. Leave these undefined for automatic settings. +// For DELTA this is the top-center of the Cartesian print volume. +//#define MANUAL_X_HOME_POS 0 +//#define MANUAL_Y_HOME_POS 0 +//#define MANUAL_Z_HOME_POS 0 + +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +// +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28). +#endif + +// Homing speeds (mm/m) +#define HOMING_FEEDRATE_XY (50*60) +#define HOMING_FEEDRATE_Z (4*60) + +// @section calibrate + +/** + * Bed Skew Compensation + * + * This feature corrects for misalignment in the XYZ axes. + * + * Take the following steps to get the bed skew in the XY plane: + * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185) + * 2. For XY_DIAG_AC measure the diagonal A to C + * 3. For XY_DIAG_BD measure the diagonal B to D + * 4. For XY_SIDE_AD measure the edge A to D + * + * Marlin automatically computes skew factors from these measurements. + * Skew factors may also be computed and set manually: + * + * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2 + * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD))) + * + * If desired, follow the same procedure for XZ and YZ. + * Use these diagrams for reference: + * + * Y Z Z + * ^ B-------C ^ B-------C ^ B-------C + * | / / | / / | / / + * | / / | / / | / / + * | A-------D | A-------D | A-------D + * +-------------->X +-------------->X +-------------->Y + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR + */ +//#define SKEW_CORRECTION + +#if ENABLED(SKEW_CORRECTION) + // Input all length measurements here: + #define XY_DIAG_AC 282.8427124746 + #define XY_DIAG_BD 282.8427124746 + #define XY_SIDE_AD 200 + + // Or, set the default skew factors directly here + // to override the above measurements: + #define XY_SKEW_FACTOR 0.0 + + //#define SKEW_CORRECTION_FOR_Z + #if ENABLED(SKEW_CORRECTION_FOR_Z) + #define XZ_DIAG_AC 282.8427124746 + #define XZ_DIAG_BD 282.8427124746 + #define YZ_DIAG_AC 282.8427124746 + #define YZ_DIAG_BD 282.8427124746 + #define YZ_SIDE_AD 200 + #define XZ_SKEW_FACTOR 0.0 + #define YZ_SKEW_FACTOR 0.0 + #endif + + // Enable this option for M852 to set skew at runtime + //#define SKEW_CORRECTION_GCODE +#endif + +//============================================================================= +//============================= Additional Features =========================== +//============================================================================= + +// @section extras + +// +// EEPROM +// +// The microcontroller can store settings in the EEPROM, e.g. max velocity... +// M500 - stores parameters in EEPROM +// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). +// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. +// +//#define EEPROM_SETTINGS // Enable for M500 and M501 commands +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. + +// +// Host Keepalive +// +// When enabled Marlin will send a busy status message to the host +// every couple of seconds when it can't accept commands. +// +#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages +#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. +#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating + +// +// M100 Free Memory Watcher +// +//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage + +// +// G20/G21 Inch mode support +// +//#define INCH_MODE_SUPPORT + +// +// M149 Set temperature units support +// +//#define TEMPERATURE_UNITS_SUPPORT + +// @section temperature + +// Preheat Constants +#define PREHEAT_1_TEMP_HOTEND 200 +#define PREHEAT_1_TEMP_BED 70 +#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 + +#define PREHEAT_2_TEMP_HOTEND 240 +#define PREHEAT_2_TEMP_BED 110 +#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 + +/** + * Nozzle Park + * + * Park the nozzle at the given XYZ position on idle or G27. + * + * The "P" parameter controls the action applied to the Z axis: + * + * P0 (Default) If Z is below park Z raise the nozzle. + * P1 Raise the nozzle always to Z-park height. + * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS. + */ +#define NOZZLE_PARK_FEATURE + +#if ENABLED(NOZZLE_PARK_FEATURE) + // Specify a park position as { X, Y, Z } + #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } + #define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) + #define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) +#endif + +/** + * Clean Nozzle Feature -- EXPERIMENTAL + * + * Adds the G12 command to perform a nozzle cleaning process. + * + * Parameters: + * P Pattern + * S Strokes / Repetitions + * T Triangles (P1 only) + * + * Patterns: + * P0 Straight line (default). This process requires a sponge type material + * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions) + * between the start / end points. + * + * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the + * number of zig-zag triangles to do. "S" defines the number of strokes. + * Zig-zags are done in whichever is the narrower dimension. + * For example, "G12 P1 S1 T3" will execute: + * + * -- + * | (X0, Y1) | /\ /\ /\ | (X1, Y1) + * | | / \ / \ / \ | + * A | | / \ / \ / \ | + * | | / \ / \ / \ | + * | (X0, Y0) | / \/ \/ \ | (X1, Y0) + * -- +--------------------------------+ + * |________|_________|_________| + * T1 T2 T3 + * + * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE. + * "R" specifies the radius. "S" specifies the stroke count. + * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT. + * + * Caveats: The ending Z should be the same as starting Z. + * Attention: EXPERIMENTAL. G-code arguments may change. + * + */ +//#define NOZZLE_CLEAN_FEATURE + +#if ENABLED(NOZZLE_CLEAN_FEATURE) + // Default number of pattern repetitions + #define NOZZLE_CLEAN_STROKES 12 + + // Default number of triangles + #define NOZZLE_CLEAN_TRIANGLES 3 + + // Specify positions as { X, Y, Z } + #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} + #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} + + // Circular pattern radius + #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 + // Circular pattern circle fragments number + #define NOZZLE_CLEAN_CIRCLE_FN 10 + // Middle point of circle + #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT + + // Moves the nozzle to the initial position + #define NOZZLE_CLEAN_GOBACK +#endif + +/** + * Print Job Timer + * + * Automatically start and stop the print job timer on M104/M109/M190. + * + * M104 (hotend, no wait) - high temp = none, low temp = stop timer + * M109 (hotend, wait) - high temp = start timer, low temp = stop timer + * M190 (bed, wait) - high temp = start timer, low temp = none + * + * The timer can also be controlled with the following commands: + * + * M75 - Start the print job timer + * M76 - Pause the print job timer + * M77 - Stop the print job timer + */ +#define PRINTJOB_TIMER_AUTOSTART + +/** + * Print Counter + * + * Track statistical data such as: + * + * - Total print jobs + * - Total successful print jobs + * - Total failed print jobs + * - Total time printing + * + * View the current statistics with M78. + */ +#define PRINTCOUNTER + +//============================================================================= +//============================= LCD and SD support ============================ +//============================================================================= + +// @section lcd + +/** + * LCD LANGUAGE + * + * Select the language to display on the LCD. These languages are available: + * + * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl, + * hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8, + * tr, uk, zh_CN, zh_TW, test + * + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' } + */ +#define LCD_LANGUAGE en + +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCDs provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See http://marlinfw.org/docs/development/lcd_language.html + * + * :['JAPANESE', 'WESTERN', 'CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE + +/** + * LCD TYPE + * + * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD. + * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display. + * (These options will be enabled automatically for most displays.) + * + * IMPORTANT: The U8glib library is required for Full Graphic Display! + * https://github.com/olikraus/U8glib_Arduino + */ +//#define ULTRA_LCD // Character based +//#define DOGLCD // Full graphics display + +/** + * SD CARD + * + * SD Card support is disabled by default. If your controller has an SD slot, + * you must uncomment the following option or it won't work. + * + */ +#define SDSUPPORT + +/** + * SD CARD: SPI SPEED + * + * Enable one of the following items for a slower SPI transfer speed. + * This may be required to resolve "volume init" errors. + */ +//#define SPI_SPEED SPI_HALF_SPEED +//#define SPI_SPEED SPI_QUARTER_SPEED +//#define SPI_SPEED SPI_EIGHTH_SPEED + +/** + * SD CARD: ENABLE CRC + * + * Use CRC checks and retries on the SD communication. + */ +//#define SD_CHECK_AND_RETRY + +// +// ENCODER SETTINGS +// +// This option overrides the default number of encoder pulses needed to +// produce one step. Should be increased for high-resolution encoders. +// +//#define ENCODER_PULSES_PER_STEP 1 + +// +// Use this option to override the number of step signals required to +// move between next/prev menu items. +// +//#define ENCODER_STEPS_PER_MENU_ITEM 5 + +/** + * Encoder Direction Options + * + * Test your encoder's behavior first with both options disabled. + * + * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. + * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. + * Reversed Value Editing only? Enable BOTH options. + */ + +// +// This option reverses the encoder direction everywhere. +// +// Set this option if CLOCKWISE causes values to DECREASE +// +//#define REVERSE_ENCODER_DIRECTION + +// +// This option reverses the encoder direction for navigating LCD menus. +// +// If CLOCKWISE normally moves DOWN this makes it go UP. +// If CLOCKWISE normally moves UP this makes it go DOWN. +// +//#define REVERSE_MENU_DIRECTION + +// +// Individual Axis Homing +// +// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. +// +//#define INDIVIDUAL_AXIS_HOMING_MENU + +// +// SPEAKER/BUZZER +// +// If you have a speaker that can produce tones, enable it here. +// By default Marlin assumes you have a buzzer with a fixed frequency. +// +//#define SPEAKER + +// +// The duration and frequency for the UI feedback sound. +// Set these to 0 to disable audio feedback in the LCD menus. +// +// Note: Test audio output with the G-Code: +// M300 S P +// +//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 +//#define LCD_FEEDBACK_FREQUENCY_HZ 5000 + +// +// CONTROLLER TYPE: Standard +// +// Marlin supports a wide variety of controllers. +// Enable one of the following options to specify your controller. +// + +// +// Original RADDS LCD Display+Encoder+SDCardReader +// http://doku.radds.org/dokumentation/lcd-display/ +// +//#define RADDS_DISPLAY + +// +// ULTIMAKER Controller. +// +//#define ULTIMAKERCONTROLLER + +// +// ULTIPANEL as seen on Thingiverse. +// +//#define ULTIPANEL + +// +// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) +// http://reprap.org/wiki/PanelOne +// +//#define PANEL_ONE + +// +// MaKr3d Makr-Panel with graphic controller and SD support. +// http://reprap.org/wiki/MaKr3d_MaKrPanel +// +//#define MAKRPANEL + +// +// ReprapWorld Graphical LCD +// https://reprapworld.com/?products_details&products_id/1218 +// +//#define REPRAPWORLD_GRAPHICAL_LCD + +// +// Activate one of these if you have a Panucatt Devices +// Viki 2.0 or mini Viki with Graphic LCD +// http://panucatt.com +// +//#define VIKI2 +//#define miniVIKI + +// +// Adafruit ST7565 Full Graphic Controller. +// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ +// +//#define ELB_FULL_GRAPHIC_CONTROLLER + +// +// RepRapDiscount Smart Controller. +// http://reprap.org/wiki/RepRapDiscount_Smart_Controller +// +// Note: Usually sold with a white PCB. +// +//#define REPRAP_DISCOUNT_SMART_CONTROLLER + +// +// GADGETS3D G3D LCD/SD Controller +// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel +// +// Note: Usually sold with a blue PCB. +// +//#define G3D_PANEL + +// +// RepRapDiscount FULL GRAPHIC Smart Controller +// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller +// +//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + +// +// MakerLab Mini Panel with graphic +// controller and SD support - http://reprap.org/wiki/Mini_panel +// +//#define MINIPANEL + +// +// RepRapWorld REPRAPWORLD_KEYPAD v1.1 +// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 +// +// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key +// is pressed, a value of 10.0 means 10mm per click. +// +//#define REPRAPWORLD_KEYPAD +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 + +// +// RigidBot Panel V1.0 +// http://www.inventapart.com/ +// +//#define RIGIDBOT_PANEL + +// +// BQ LCD Smart Controller shipped by +// default with the BQ Hephestos 2 and Witbox 2. +// +//#define BQ_LCD_SMART_CONTROLLER + +// +// Cartesio UI +// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface +// +//#define CARTESIO_UI + +// +// ANET and Tronxy Controller supported displays. +// +#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin. + // This LCD is known to be susceptible to electrical interference + // which scrambles the display. Pressing any button clears it up. + // This is a LCD2004 display with 5 analog buttons. + +//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6 + // A clone of the RepRapDiscount full graphics display but with + // different pins/wiring (see pins_ANET_10.h). + +// +// LCD for Melzi Card with Graphical LCD +// +//#define LCD_FOR_MELZI + +// +// LCD for Malyan M200 printers. +// This requires SDSUPPORT to be enabled +// +//#define MALYAN_LCD + +// +// CONTROLLER TYPE: I2C +// +// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C +// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C +// + +// +// Elefu RA Board Control Panel +// http://www.elefu.com/index.php?route=product/product&product_id=53 +// +//#define RA_CONTROL_PANEL + +// +// Sainsmart YW Robot (LCM1602) LCD Display +// +// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library +// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home +// +//#define LCD_I2C_SAINSMART_YWROBOT + +// +// Generic LCM1602 LCD adapter +// +//#define LCM1602 + +// +// PANELOLU2 LCD with status LEDs, +// separate encoder and click inputs. +// +// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. +// For more info: https://github.com/lincomatic/LiquidTWI2 +// +// Note: The PANELOLU2 encoder click input can either be directly connected to +// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). +// +//#define LCD_I2C_PANELOLU2 + +// +// Panucatt VIKI LCD with status LEDs, +// integrated click & L/R/U/D buttons, separate encoder inputs. +// +//#define LCD_I2C_VIKI + +// +// SSD1306 OLED full graphics generic display +// +//#define U8GLIB_SSD1306 + +// +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +// +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + +// +// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder +// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1) +// +//#define ULTI_CONTROLLER + +// +// CONTROLLER TYPE: Shift register panels +// +// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH +// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD +// +//#define SAV_3DLCD + +// +// TinyBoy2 128x64 OLED / Encoder Panel +// +//#define OLED_PANEL_TINYBOY2 + +// +// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller +// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html +// +//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602 + +// +// MKS MINI12864 with graphic controller and SD support +// http://reprap.org/wiki/MKS_MINI_12864 +// +//#define MKS_MINI_12864 + +// +// Factory display for Creality CR-10 +// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html +// +// This is RAMPS-compatible using a single 10-pin connector. +// (For CR-10 owners who want to replace the Melzi Creality board but retain the display) +// +//#define CR10_STOCKDISPLAY + +// +// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER +// http://reprap.org/wiki/MKS_12864OLED +// +// Tiny, but very sharp OLED display +// +//#define MKS_12864OLED // Uses the SH1106 controller (default) +//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller + +// +// AZSMZ 12864 LCD with SD +// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html +// +//#define AZSMZ_12864 + +// Silvergate GLCD controller +// http://github.com/android444/Silvergate +// +//#define SILVER_GATE_GLCD_CONTROLLER + +//============================================================================= +//=============================== Extra Features ============================== +//============================================================================= + +// @section extras + +// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino +//#define FAST_PWM_FAN + +// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency +// which is not as annoying as with the hardware PWM. On the other hand, if this frequency +// is too low, you should also increment SOFT_PWM_SCALE. +//#define FAN_SOFT_PWM + +// Incrementing this by 1 will double the software PWM frequency, +// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. +// However, control resolution will be halved for each increment; +// at zero value, there are 128 effective control positions. +#define SOFT_PWM_SCALE 0 + +// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can +// be used to mitigate the associated resolution loss. If enabled, +// some of the PWM cycles are stretched so on average the desired +// duty cycle is attained. +//#define SOFT_PWM_DITHER + +// Temperature status LEDs that display the hotend and bed temperature. +// If all hotends, bed temperature, and target temperature are under 54C +// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis) +//#define TEMP_STAT_LEDS + +// M240 Triggers a camera by emulating a Canon RC-1 Remote +// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ +//#define PHOTOGRAPH_PIN 23 + +// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure +//#define SF_ARC_FIX + +// Support for the BariCUDA Paste Extruder +//#define BARICUDA + +// Support for BlinkM/CyzRgb +//#define BLINKM + +// Support for PCA9632 PWM LED driver +//#define PCA9632 + +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * For Neopixel LED an overall brightness parameter is also available. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. + * *** CAUTION *** + * + * LED Type. Enable only one of the following two options. + * + */ +//#define RGB_LED +//#define RGBW_LED + +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) + #define RGB_LED_R_PIN 34 + #define RGB_LED_G_PIN 43 + #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 +#endif + +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_LED +#if ENABLED(NEOPIXEL_LED) + #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) + #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. + #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - Change to green once print has finished + * - Turn off after the print has finished and the user has pushed a button + */ +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED) + #define PRINTER_EVENT_LEDS +#endif + +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ + +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ +//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command + +// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. +// 300ms is a good value but you can try less delay. +// If the servo can't reach the requested position, increase it. +#define SERVO_DELAY { 300 } + +// Servo deactivation +// +// With this option servos are powered only during movement, then turned off to prevent jitter. +//#define DEACTIVATE_SERVOS_AFTER_MOVE + +#endif // CONFIGURATION_H From e05673a3794632bafe82bcaed5f619a9c43e1951 Mon Sep 17 00:00:00 2001 From: Bob-the-Kuhn Date: Sat, 17 Feb 2018 16:41:36 -0600 Subject: [PATCH 37/46] [2.0.x] VIKI2 & RE_ARM changes (#9686) * VIKI2 & RE_ARM changes 1. Remove `DISABLED(SDSUPPORT)` from ST7565 in `ultralcd_impl_DOGM.h`. These LCDs share pins with the SD card and can run at the SD card rates. 2. Add SDSS definition to `pins_RAMPS_RE_ARM.h`. Apparently the SDSS definition in `pins.h` is being processed before the one in `spi_pins.h` which resulted in not being able to read the SD card. --- Marlin/src/lcd/ultralcd_impl_DOGM.h | 2 +- Marlin/src/pins/pins_RAMPS_RE_ARM.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/src/lcd/ultralcd_impl_DOGM.h b/Marlin/src/lcd/ultralcd_impl_DOGM.h index 92dec8418..0b7b4badf 100644 --- a/Marlin/src/lcd/ultralcd_impl_DOGM.h +++ b/Marlin/src/lcd/ultralcd_impl_DOGM.h @@ -187,7 +187,7 @@ #elif ENABLED(U8GLIB_ST7565_64128N) // The MaKrPanel, Mini Viki, and Viki 2.0, ST7565 controller - #if DISABLED(SDSUPPORT) && (DOGLCD_SCK == SCK_PIN) && (DOGLCD_MOSI == MOSI_PIN) + #if DOGLCD_SCK == SCK_PIN && DOGLCD_MOSI == MOSI_PIN U8GLIB_64128N_2X_HAL u8g(DOGLCD_CS, DOGLCD_A0); // using HW-SPI #else U8GLIB_64128N_2X_HAL u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // using SW-SPI diff --git a/Marlin/src/pins/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/pins_RAMPS_RE_ARM.h index 9ef36b430..8932ece82 100644 --- a/Marlin/src/pins/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/pins_RAMPS_RE_ARM.h @@ -197,6 +197,7 @@ // Misc. Functions // #define LED_PIN P4_28 // (13) +#define SDSS P1_23 // (53) // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector #define FIL_RUNOUT_PIN P1_18 // (4) From da7c51d8208610b0daec622379450aef599d2bc4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 17 Feb 2018 21:24:04 -0600 Subject: [PATCH 38/46] Space out some pins lines --- Marlin/src/pins/pins_ANET_10.h | 2 +- Marlin/src/pins/pins_AZTEEG_X3_PRO.h | 2 +- Marlin/src/pins/pins_BEAST.h | 3 +++ Marlin/src/pins/pins_CHITU3D.h | 2 ++ Marlin/src/pins/pins_DUE3DOM.h | 6 +++++- Marlin/src/pins/pins_DUE3DOM_MINI.h | 10 +++++++--- Marlin/src/pins/pins_MAKEBOARD_MINI.h | 2 +- Marlin/src/pins/pins_MEGACONTROLLER.h | 2 ++ Marlin/src/pins/pins_RADDS.h | 7 ++++++- Marlin/src/pins/pins_RAMPS.h | 2 +- Marlin/src/pins/pins_RAMPS_DUO.h | 9 +++++++++ Marlin/src/pins/pins_RURAMPS4D.h | 9 +++++++-- Marlin/src/pins/pins_STM32F1R.h | 2 ++ Marlin/src/pins/pins_STM3R_MINI.h | 3 +++ 14 files changed, 50 insertions(+), 11 deletions(-) diff --git a/Marlin/src/pins/pins_ANET_10.h b/Marlin/src/pins/pins_ANET_10.h index 91159cf89..c13236a7c 100644 --- a/Marlin/src/pins/pins_ANET_10.h +++ b/Marlin/src/pins/pins_ANET_10.h @@ -148,7 +148,7 @@ * ZONESTAR_LCD * ANET_FULL_GRAPHICS_LCD * REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -*/ + */ #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) #define LCD_SDSS 28 diff --git a/Marlin/src/pins/pins_AZTEEG_X3_PRO.h b/Marlin/src/pins/pins_AZTEEG_X3_PRO.h index 61810d98e..159cd0f76 100644 --- a/Marlin/src/pins/pins_AZTEEG_X3_PRO.h +++ b/Marlin/src/pins/pins_AZTEEG_X3_PRO.h @@ -41,7 +41,7 @@ #error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu." #endif -//DIGIPOT slave addresses +// DIGIPOT slave addresses #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT 0x2C (0x58 <- 0x2C << 1) #define DIGIPOT_I2C_ADDRESS_B 0x2E // unshifted slave address for second DIGIPOT 0x2E (0x5C <- 0x2E << 1) diff --git a/Marlin/src/pins/pins_BEAST.h b/Marlin/src/pins/pins_BEAST.h index ee572f9be..850288812 100644 --- a/Marlin/src/pins/pins_BEAST.h +++ b/Marlin/src/pins/pins_BEAST.h @@ -213,6 +213,7 @@ #define STAT_LED_BLUE_PIN 35 #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) + #define BTN_EN1 35 #define BTN_EN2 37 #define BTN_ENC 31 @@ -223,7 +224,9 @@ #define DOGLCD_CS 29 #define DOGLCD_A0 27 #define LCD_BACKLIGHT_PIN 33 + #elif ENABLED(MINIPANEL) + #define BEEPER_PIN 42 // Pins for DOGM SPI LCD Support #define DOGLCD_A0 44 diff --git a/Marlin/src/pins/pins_CHITU3D.h b/Marlin/src/pins/pins_CHITU3D.h index 258f7f723..2fd1b525e 100644 --- a/Marlin/src/pins/pins_CHITU3D.h +++ b/Marlin/src/pins/pins_CHITU3D.h @@ -222,7 +222,9 @@ #define DOGLCD_CS 29 #define DOGLCD_A0 27 #define LCD_BACKLIGHT_PIN 33 + #elif ENABLED(MINIPANEL) + #define BEEPER_PIN 42 // Pins for DOGM SPI LCD Support #define DOGLCD_A0 44 diff --git a/Marlin/src/pins/pins_DUE3DOM.h b/Marlin/src/pins/pins_DUE3DOM.h index 06e73ac8e..8b0a16352 100644 --- a/Marlin/src/pins/pins_DUE3DOM.h +++ b/Marlin/src/pins/pins_DUE3DOM.h @@ -111,6 +111,7 @@ // LCD / Controller // #if ENABLED(ULTRA_LCD) + #define LCD_PINS_RS 42 #define LCD_PINS_ENABLE 43 #define LCD_PINS_D4 44 @@ -119,6 +120,7 @@ #define LCD_PINS_D7 47 #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) + #define BEEPER_PIN 41 #define BTN_EN1 50 @@ -128,8 +130,8 @@ #define SDSS 4 #define SD_DETECT_PIN 14 - // RADDS LCD panel #elif ENABLED(RADDS_DISPLAY) + #define BEEPER_PIN 41 #define BTN_EN1 50 @@ -143,6 +145,7 @@ #define SD_DETECT_PIN 14 #elif ENABLED(SSD1306_OLED_I2C_CONTROLLER) + #define BTN_EN1 50 #define BTN_EN2 52 #define BTN_ENC 48 @@ -151,6 +154,7 @@ #define SD_DETECT_PIN 14 #elif ENABLED(SPARK_FULL_GRAPHICS) + #define LCD_PINS_D4 29 #define LCD_PINS_ENABLE 27 #define LCD_PINS_RS 25 diff --git a/Marlin/src/pins/pins_DUE3DOM_MINI.h b/Marlin/src/pins/pins_DUE3DOM_MINI.h index c3523fc41..7ea23835a 100644 --- a/Marlin/src/pins/pins_DUE3DOM_MINI.h +++ b/Marlin/src/pins/pins_DUE3DOM_MINI.h @@ -77,9 +77,9 @@ // SPI for Max6675 or Max31855 Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS 53 + #define MAX6675_SS 53 #else - #define MAX6675_SS 53 + #define MAX6675_SS 53 #endif // @@ -103,6 +103,7 @@ // LCD / Controller // #if ENABLED(ULTRA_LCD) + #define LCD_PINS_RS 42 #define LCD_PINS_ENABLE 43 #define LCD_PINS_D4 44 @@ -111,6 +112,7 @@ #define LCD_PINS_D7 47 #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) + #define BEEPER_PIN 41 #define BTN_EN1 50 @@ -120,8 +122,8 @@ #define SDSS 4 #define SD_DETECT_PIN 14 - // RADDS LCD panel #elif ENABLED(RADDS_DISPLAY) + #define BEEPER_PIN 41 #define BTN_EN1 50 @@ -135,6 +137,7 @@ #define SD_DETECT_PIN 14 #elif ENABLED(SSD1306_OLED_I2C_CONTROLLER) + #define BTN_EN1 50 #define BTN_EN2 52 #define BTN_ENC 48 @@ -143,6 +146,7 @@ #define SD_DETECT_PIN 14 #elif ENABLED(SPARK_FULL_GRAPHICS) + #define LCD_PINS_D4 29 #define LCD_PINS_ENABLE 27 #define LCD_PINS_RS 25 diff --git a/Marlin/src/pins/pins_MAKEBOARD_MINI.h b/Marlin/src/pins/pins_MAKEBOARD_MINI.h index 8a6491abb..5dcf1e218 100644 --- a/Marlin/src/pins/pins_MAKEBOARD_MINI.h +++ b/Marlin/src/pins/pins_MAKEBOARD_MINI.h @@ -36,4 +36,4 @@ #undef Z_MAX_PIN #define X_STOP_PIN 2 #define Y_STOP_PIN 15 -#define Z_STOP_PIN 19 \ No newline at end of file +#define Z_STOP_PIN 19 diff --git a/Marlin/src/pins/pins_MEGACONTROLLER.h b/Marlin/src/pins/pins_MEGACONTROLLER.h index c4a10705a..f5660547a 100644 --- a/Marlin/src/pins/pins_MEGACONTROLLER.h +++ b/Marlin/src/pins/pins_MEGACONTROLLER.h @@ -133,6 +133,7 @@ // LCD / Controller // #if ENABLED(MINIPANEL) + #define BEEPER_PIN 46 // Pins for DOGM SPI LCD Support #define DOGLCD_A0 47 @@ -152,6 +153,7 @@ #define BTN_ENC 10 #define SD_DETECT_PIN 49 + #endif // MINIPANEL // diff --git a/Marlin/src/pins/pins_RADDS.h b/Marlin/src/pins/pins_RADDS.h index 68d8f3cbe..e4944ba48 100644 --- a/Marlin/src/pins/pins_RADDS.h +++ b/Marlin/src/pins/pins_RADDS.h @@ -157,8 +157,9 @@ // LCD / Controller // #if ENABLED(ULTRA_LCD) - // RADDS LCD panel + #if ENABLED(RADDS_DISPLAY) + #define LCD_PINS_RS 42 #define LCD_PINS_ENABLE 43 #define LCD_PINS_D4 44 @@ -179,6 +180,7 @@ #define SD_DETECT_PIN 14 #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define LCD_PINS_RS 46 #define LCD_PINS_ENABLE 47 #define LCD_PINS_D4 44 @@ -190,6 +192,7 @@ #define BTN_ENC 48 #elif ENABLED(SSD1306_OLED_I2C_CONTROLLER) + #define BTN_EN1 50 #define BTN_EN2 52 #define BTN_ENC 48 @@ -198,6 +201,7 @@ #define SD_DETECT_PIN 14 #elif ENABLED(SPARK_FULL_GRAPHICS) + #define LCD_PINS_D4 29 #define LCD_PINS_ENABLE 27 #define LCD_PINS_RS 25 @@ -207,4 +211,5 @@ #define BTN_ENC 37 #endif // SPARK_FULL_GRAPHICS + #endif // ULTRA_LCD diff --git a/Marlin/src/pins/pins_RAMPS.h b/Marlin/src/pins/pins_RAMPS.h index 2fe422b59..4e01bad76 100644 --- a/Marlin/src/pins/pins_RAMPS.h +++ b/Marlin/src/pins/pins_RAMPS.h @@ -155,7 +155,7 @@ //#define X2_HARDWARE_SERIAL Serial1 //#define Y_HARDWARE_SERIAL Serial1 //#define Y2_HARDWARE_SERIAL Serial1 - //#define Z_HARDWARE_SERIAL Serial3 + //#define Z_HARDWARE_SERIAL Serial1 //#define Z2_HARDWARE_SERIAL Serial1 //#define E0_HARDWARE_SERIAL Serial1 //#define E1_HARDWARE_SERIAL Serial1 diff --git a/Marlin/src/pins/pins_RAMPS_DUO.h b/Marlin/src/pins/pins_RAMPS_DUO.h index 264cf4167..c25285132 100644 --- a/Marlin/src/pins/pins_RAMPS_DUO.h +++ b/Marlin/src/pins/pins_RAMPS_DUO.h @@ -77,6 +77,7 @@ // LCD / Controller // #if ENABLED(ULTRA_LCD) + #if ENABLED(NEWPANEL) && ENABLED(PANEL_ONE) #undef LCD_PINS_D4 #define LCD_PINS_D4 68 @@ -89,13 +90,17 @@ #endif #if ENABLED(NEWPANEL) + #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) + #undef BTN_EN1 #define BTN_EN1 67 #undef BTN_ENC #define BTN_ENC 66 + #elif ENABLED(MINIPANEL) + #undef DOGLCD_CS #define DOGLCD_CS 69 @@ -107,7 +112,9 @@ #undef BTN_EN2 #define BTN_EN2 66 + #else + #if ENABLED(REPRAPWORLD_KEYPAD) #undef BTN_EN1 #define BTN_EN1 67 // encoder @@ -119,5 +126,7 @@ #define BTN_EN2 66 // AUX2 PIN 4 #endif #endif + #endif // NEWPANEL + #endif // ULTRA_LCD diff --git a/Marlin/src/pins/pins_RURAMPS4D.h b/Marlin/src/pins/pins_RURAMPS4D.h index 2ad365e00..5aa8ede23 100644 --- a/Marlin/src/pins/pins_RURAMPS4D.h +++ b/Marlin/src/pins/pins_RURAMPS4D.h @@ -190,8 +190,9 @@ // LCD / Controller // #if ENABLED(ULTRA_LCD) - // RADDS LCD panel + #if ENABLED(RADDS_DISPLAY) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) + #define LCD_PINS_RS 63 #define LCD_PINS_ENABLE 64 #define LCD_PINS_D4 48 @@ -208,6 +209,7 @@ #define SD_DETECT_PIN 51 #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define LCD_PINS_RS 52 #define LCD_PINS_ENABLE 53 #define LCD_PINS_D4 48 @@ -225,6 +227,7 @@ #endif #elif ENABLED(SSD1306_OLED_I2C_CONTROLLER) + #define BTN_EN1 44 #define BTN_EN2 42 #define BTN_ENC 40 @@ -233,14 +236,16 @@ #define SD_DETECT_PIN 51 #elif ENABLED(SPARK_FULL_GRAPHICS) + //http://doku.radds.org/dokumentation/other-electronics/sparklcd/ - #error "Oops! SPARK_FULL_GRAPHICS not supported with this board" + #error "Oops! SPARK_FULL_GRAPHICS not supported with RURAMPS4D." //#define LCD_PINS_D4 29//? //#define LCD_PINS_ENABLE 27//? //#define LCD_PINS_RS 25//? //#define BTN_EN1 35//? //#define BTN_EN2 33//? //#define BTN_ENC 37//? + #endif // SPARK_FULL_GRAPHICS #endif // ULTRA_LCD diff --git a/Marlin/src/pins/pins_STM32F1R.h b/Marlin/src/pins/pins_STM32F1R.h index 43b00e7e3..acbc2f47c 100644 --- a/Marlin/src/pins/pins_STM32F1R.h +++ b/Marlin/src/pins/pins_STM32F1R.h @@ -218,7 +218,9 @@ #define DOGLCD_CS 29 #define DOGLCD_A0 27 #define LCD_BACKLIGHT_PIN 33 + #elif ENABLED(MINIPANEL) + #define BEEPER_PIN 42 // Pins for DOGM SPI LCD Support #define DOGLCD_A0 44 diff --git a/Marlin/src/pins/pins_STM3R_MINI.h b/Marlin/src/pins/pins_STM3R_MINI.h index dbcc1a949..c36b74096 100644 --- a/Marlin/src/pins/pins_STM3R_MINI.h +++ b/Marlin/src/pins/pins_STM3R_MINI.h @@ -216,6 +216,7 @@ #define STAT_LED_BLUE_PIN 35 #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) + #define BTN_EN1 35 #define BTN_EN2 37 #define BTN_ENC 31 @@ -226,7 +227,9 @@ #define DOGLCD_CS 29 #define DOGLCD_A0 27 #define LCD_BACKLIGHT_PIN 33 + #elif ENABLED(MINIPANEL) + #define BEEPER_PIN 42 // Pins for DOGM SPI LCD Support #define DOGLCD_A0 44 From 60fc3722114f31e27522650910bee3236bcbe164 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 17 Feb 2018 15:29:50 -0600 Subject: [PATCH 39/46] Add CODEPENDENT_XY_HOMING to example configs --- Marlin/src/config/default/Configuration_adv.h | 3 +++ .../src/config/examples/AlephObjects/TAZ4/Configuration_adv.h | 3 +++ Marlin/src/config/examples/Anet/A6/Configuration_adv.h | 3 +++ Marlin/src/config/examples/Anet/A8/Configuration_adv.h | 3 +++ Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h | 3 +++ Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h | 3 +++ Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h | 3 +++ Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h | 3 +++ Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h | 3 +++ Marlin/src/config/examples/Cartesio/Configuration_adv.h | 3 +++ Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h | 3 +++ Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h | 3 +++ Marlin/src/config/examples/Creality/Ender/Configuration_adv.h | 3 +++ Marlin/src/config/examples/Felix/Configuration_adv.h | 3 +++ .../src/config/examples/FolgerTech/i3-2020/Configuration_adv.h | 3 +++ .../src/config/examples/Infitary/i3-M508/Configuration_adv.h | 3 +++ Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h | 3 +++ Marlin/src/config/examples/MakerParts/Configuration_adv.h | 3 +++ Marlin/src/config/examples/Malyan/M150/Configuration_adv.h | 3 +++ Marlin/src/config/examples/Malyan/M200/Configuration_adv.h | 3 +++ .../config/examples/Micromake/C1/enhanced/Configuration_adv.h | 3 +++ Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h | 3 +++ Marlin/src/config/examples/RigidBot/Configuration_adv.h | 3 +++ Marlin/src/config/examples/SCARA/Configuration_adv.h | 3 +++ Marlin/src/config/examples/Sanguinololu/Configuration_adv.h | 3 +++ Marlin/src/config/examples/TheBorg/Configuration_adv.h | 3 +++ Marlin/src/config/examples/TinyBoy2/Configuration_adv.h | 3 +++ .../config/examples/UltiMachine/Archim2/Configuration_adv.h | 3 +++ Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h | 3 +++ Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h | 3 +++ .../config/examples/Wanhao/Duplicator 6/Configuration_adv.h | 3 +++ .../examples/delta/FLSUN/auto_calibrate/Configuration_adv.h | 3 +++ .../src/config/examples/delta/FLSUN/kossel/Configuration_adv.h | 3 +++ .../examples/delta/FLSUN/kossel_mini/Configuration_adv.h | 3 +++ Marlin/src/config/examples/delta/generic/Configuration_adv.h | 3 +++ .../src/config/examples/delta/kossel_mini/Configuration_adv.h | 3 +++ .../src/config/examples/delta/kossel_pro/Configuration_adv.h | 3 +++ Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h | 3 +++ .../src/config/examples/gCreate/gMax1.5+/Configuration_adv.h | 3 +++ Marlin/src/config/examples/makibox/Configuration_adv.h | 3 +++ Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h | 3 +++ Marlin/src/config/examples/wt150/Configuration_adv.h | 3 +++ 42 files changed, 126 insertions(+) diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index f7fc3d406..243ad3297 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index c451f0642..00c700343 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index 5928bdcd8..c3520aee1 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 7b00dc53a..912b64d6a 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h index fd8c42e87..d3bd3b2ed 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h index dd6afbbfd..bb8eb5dec 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index ec7c3b778..06994aae2 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} 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 2a583e80a..5eb03d180 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X #define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index ec7c3b778..06994aae2 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index edf506e2e..9be79050b 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X #define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} 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 696d20213..b3e8b8c55 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h index d649203b3..fcc9afd7e 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h index a21f541dc..f16433f92 100644 --- a/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index 1a755196c..a3dae02c6 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h index 80f2b52a2..8e490f853 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} 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 763cf76da..bdb8798bd 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h index 12ed9b789..5f7bd9dc9 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h index bddaeade4..37aa8bf65 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h +++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index 94ae68871..04a8f7b0e 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h index cd7d0aba5..d5fa7ef2d 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h index 5170c3d43..b406b99d8 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index e97930502..750336556 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index f44f75499..f7aabe342 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index b2bde31fa..f6dea0622 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index 6dffde953..82fad3d16 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h index 3de031bd0..51f416d03 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h +++ b/Marlin/src/config/examples/TheBorg/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index e924275f8..cf1be79b7 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h index ae3ad1ca2..756dada7b 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index 284114ca2..bcd42279b 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -375,6 +375,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index 90c2b6726..af6773c93 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index ba2fd0242..28ae6c3a9 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} 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 4a5cc93b6..3aac73b8f 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 @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h index 7ad6c4191..7b10f7e1e 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} 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 e2444b440..daadd5efd 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 @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index e2444b440..daadd5efd 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} 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 e2444b440..daadd5efd 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} 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 93df5688f..a9f5d4fa8 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -367,6 +367,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} 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 1cc0fe829..232b8d6e5 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} 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 dc958a01d..01afd6b77 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index e5ecde2d2..a5b15b437 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index af842f9c5..5b1ae96d9 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index 02e650e1c..9c7ea6d35 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} From 9019ea0fce853e02c6ef860e18ca944b8b1084ae Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 16 Feb 2018 16:59:44 +0100 Subject: [PATCH 40/46] Option to force X or Y to home first when homing the other axis --- .travis.yml | 8 ++++---- Marlin/Configuration_adv.h | 3 +++ Marlin/src/gcode/calibrate/G28.cpp | 16 ++++++++++++---- Marlin/src/inc/SanityCheck.h | 10 +++++++++- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7d73787e3..fd0a767e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,7 +67,7 @@ script: - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS - opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED AUTO_POWER_CONTROL - opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE - - opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL + - opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CODEPENDENT_XY_HOMING - opt_set ABL_GRID_POINTS_X 16 - opt_set ABL_GRID_POINTS_Y 16 - opt_set_adv FANMUX0_PIN 53 @@ -84,13 +84,13 @@ script: - opt_set TEMP_SENSOR_4 999 - opt_set TEMP_SENSOR_BED 1 - opt_enable AUTO_BED_LEVELING_UBL DEBUG_LEVELING_FEATURE G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT EEPROM_SETTINGS EEPROM_CHITCHAT G3D_PANEL SKEW_CORRECTION - - opt_enable_adv CUSTOM_USER_MENUS I2C_POSITION_ENCODERS BABYSTEPPING BABYSTEP_XY LIN_ADVANCE NANODLP_Z_SYNC + - opt_enable_adv CUSTOM_USER_MENUS I2C_POSITION_ENCODERS BABYSTEPPING BABYSTEP_XY LIN_ADVANCE NANODLP_Z_SYNC QUICK_HOME - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM} # - # Add a Sled Z Probe, do non-segmented moves, use Japanese language + # Add a Sled Z Probe, use UBL Cartesian moves, use Japanese language # - opt_set LANGUAGE kana_utf8 - - opt_enable Z_PROBE_SLED + - opt_enable Z_PROBE_SLED SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE - opt_disable SEGMENT_LEVELED_MOVES - opt_enable_adv BABYSTEP_ZPROBE_OFFSET DOUBLECLICK_FOR_Z_BABYSTEPPING - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM} diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index f7fc3d406..243ad3297 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index 736831494..5f3e7bfd8 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -227,10 +227,14 @@ void GcodeSuite::G28(const bool always_home_all) { #endif + // Home Y (before X) #if ENABLED(HOME_Y_BEFORE_X) - // Home Y - if (home_all || homeY) { + if (home_all || homeY + #if ENABLED(CODEPENDENT_XY_HOMING) + || homeX + #endif + ) { HOMEAXIS(Y); #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) DEBUG_POS("> homeY", current_position); @@ -240,7 +244,11 @@ void GcodeSuite::G28(const bool always_home_all) { #endif // Home X - if (home_all || homeX) { + if (home_all || homeX + #if ENABLED(CODEPENDENT_XY_HOMING) && DISABLED(HOME_Y_BEFORE_X) + || homeY + #endif + ) { #if ENABLED(DUAL_X_CARRIAGE) @@ -271,8 +279,8 @@ void GcodeSuite::G28(const bool always_home_all) { #endif } + // Home Y (after X) #if DISABLED(HOME_Y_BEFORE_X) - // Home Y if (home_all || homeY) { HOMEAXIS(Y); #if ENABLED(DEBUG_LEVELING_FEATURE) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index af1762dc3..03ace21c3 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -886,12 +886,20 @@ static_assert(1 >= 0 #endif /** - * Homing Bump + * Homing */ #if X_HOME_BUMP_MM < 0 || Y_HOME_BUMP_MM < 0 || Z_HOME_BUMP_MM < 0 #error "[XYZ]_HOME_BUMP_MM must be greater than or equal to 0." #endif +#if ENABLED(CODEPENDENT_XY_HOMING) + #if ENABLED(QUICK_HOME) + #error "QUICK_HOME is incompatible with CODEPENDENT_XY_HOMING." + #elif IS_KINEMATIC + #error "CODEPENDENT_XY_HOMING requires a Cartesian setup." + #endif +#endif + /** * Make sure Z_SAFE_HOMING point is reachable */ From 8ffa0b24a47ab888beed06ab0b4bf0ced63116e5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 18 Feb 2018 00:51:37 -0600 Subject: [PATCH 41/46] Strip excess G28 debug logging --- Marlin/src/gcode/calibrate/G28.cpp | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index 5f3e7bfd8..de6bcd321 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -198,12 +198,7 @@ void GcodeSuite::G28(const bool always_home_all) { #if Z_HOME_DIR > 0 // If homing away from BED do Z first - if (home_all || homeZ) { - HOMEAXIS(Z); - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> HOMEAXIS(Z)", current_position); - #endif - } + if (home_all || homeZ) HOMEAXIS(Z); #endif @@ -234,12 +229,7 @@ void GcodeSuite::G28(const bool always_home_all) { #if ENABLED(CODEPENDENT_XY_HOMING) || homeX #endif - ) { - HOMEAXIS(Y); - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> homeY", current_position); - #endif - } + ) HOMEAXIS(Y); #endif @@ -273,20 +263,11 @@ void GcodeSuite::G28(const bool always_home_all) { HOMEAXIS(X); #endif - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> homeX", current_position); - #endif } // Home Y (after X) #if DISABLED(HOME_Y_BEFORE_X) - if (home_all || homeY) { - HOMEAXIS(Y); - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> homeY", current_position); - #endif - } + if (home_all || homeY) HOMEAXIS(Y); #endif // Home Z last if homing towards the bed @@ -297,9 +278,6 @@ void GcodeSuite::G28(const bool always_home_all) { #else HOMEAXIS(Z); #endif - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> (home_all || homeZ) > final", current_position); - #endif } // home_all || homeZ #endif // Z_HOME_DIR < 0 From 83d7e95de0534061ca6887a711bc611d209a628a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 18 Feb 2018 02:23:55 -0600 Subject: [PATCH 42/46] Add MSG_THERMAL_RUNAWAY_BED (#9691) --- Marlin/src/lcd/language/language_en.h | 3 +++ Marlin/src/module/temperature.cpp | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 8812de9b8..1dd12a432 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -789,6 +789,9 @@ #ifndef MSG_THERMAL_RUNAWAY #define MSG_THERMAL_RUNAWAY _UxGT("THERMAL RUNAWAY") #endif +#ifndef MSG_THERMAL_RUNAWAY_BED + #define MSG_THERMAL_RUNAWAY_BED _UxGT("BED THERMAL RUNAWAY") +#endif #ifndef MSG_ERR_MAXTEMP #define MSG_ERR_MAXTEMP _UxGT("Err: MAXTEMP") #endif diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 975e8892f..ec3797e6a 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -435,7 +435,9 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS], _temp_error(hotend, PSTR(MSG_T_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD)); } else if (current < target - (MAX_OVERSHOOT_PID_AUTOTUNE)) // Heated, then temperature fell too far? - _temp_error(hotend, PSTR(MSG_T_THERMAL_RUNAWAY), PSTR(MSG_THERMAL_RUNAWAY)); + _temp_error(hotend, PSTR(MSG_T_THERMAL_RUNAWAY), + hotend >= 0 ? PSTR(MSG_THERMAL_RUNAWAY) : PSTR(MSG_THERMAL_RUNAWAY_BED) + ); #endif } // every 2 seconds @@ -1414,7 +1416,9 @@ void Temperature::init() { else if (PENDING(millis(), *timer)) break; *state = TRRunaway; case TRRunaway: - _temp_error(heater_id, PSTR(MSG_T_THERMAL_RUNAWAY), PSTR(MSG_THERMAL_RUNAWAY)); + _temp_error(heater_id, PSTR(MSG_T_THERMAL_RUNAWAY), + heater_id >= 0 ? PSTR(MSG_THERMAL_RUNAWAY) : PSTR(MSG_THERMAL_RUNAWAY_BED) + ); } } From bab0e975c873e3073d5bf1dcf62a9c42561cd447 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 18 Feb 2018 02:24:39 -0600 Subject: [PATCH 43/46] The ENDER can use BOARD_MELZI_CREALITY (#9692) --- .../examples/Creality/Ender/Configuration.h | 2 +- Marlin/src/core/boards.h | 1 - Marlin/src/pins/pins_CREALITY_ENDER.h | 34 ------------------- 3 files changed, 1 insertion(+), 36 deletions(-) delete mode 100644 Marlin/src/pins/pins_CREALITY_ENDER.h diff --git a/Marlin/src/config/examples/Creality/Ender/Configuration.h b/Marlin/src/config/examples/Creality/Ender/Configuration.h index 62920529f..527ebb9d1 100644 --- a/Marlin/src/config/examples/Creality/Ender/Configuration.h +++ b/Marlin/src/config/examples/Creality/Ender/Configuration.h @@ -123,7 +123,7 @@ // The following define selects which electronics board you have. // Please choose the name from boards.h that matches your setup #ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_CREALITY_ENDER + #define MOTHERBOARD BOARD_MELZI_CREALITY #endif // Optional custom name for your RepStrap or other custom machine diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 1f7993b2e..ffa91659e 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -116,7 +116,6 @@ #define BOARD_MELZI_MAKR3D 66 // Melzi with ATmega1284 (MaKr3d version) #define BOARD_MELZI_CREALITY 89 // Melzi Creality3D board (for CR-10 etc) #define BOARD_MELZI_MALYAN 92 // Melzi Malyan M150 board -#define BOARD_CREALITY_ENDER 601 // Creality Ender #define BOARD_MELZI_TRONXY 505 // Tronxy X5S #define BOARD_STB_11 64 // STB V1.1 #define BOARD_AZTEEG_X1 65 // Azteeg X1 diff --git a/Marlin/src/pins/pins_CREALITY_ENDER.h b/Marlin/src/pins/pins_CREALITY_ENDER.h deleted file mode 100644 index 72cfcc6ee..000000000 --- a/Marlin/src/pins/pins_CREALITY_ENDER.h +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Creality Ender pin assignments - * - * Applies to the following boards: - * - * Creality Ender-2 - * Creality Ender-4 - */ - -#define BOARD_NAME "Creality Ender" - -#include "pins_SANGUINOLOLU_12.h" From a6563df705ea69c3da68d907b62ca4fbb3e0045f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 18 Feb 2018 02:25:32 -0600 Subject: [PATCH 44/46] Sync pinsDebug_list.h between 1.1.x and 2.0.x (#9693) --- Marlin/src/pins/pinsDebug.h | 8 +- Marlin/src/pins/pinsDebug_list.h | 988 ++++++++++++++++++------------- 2 files changed, 578 insertions(+), 418 deletions(-) diff --git a/Marlin/src/pins/pinsDebug.h b/Marlin/src/pins/pinsDebug.h index 1e73ab900..45c15675d 100644 --- a/Marlin/src/pins/pinsDebug.h +++ b/Marlin/src/pins/pinsDebug.h @@ -39,8 +39,8 @@ #define _ADD_PIN_2(PIN_NAME, ENTRY_NAME) static const char ENTRY_NAME[] PROGMEM = { PIN_NAME }; #define _ADD_PIN(PIN_NAME, COUNTER) _ADD_PIN_2(PIN_NAME, entry_NAME_##COUNTER) -#define REPORT_NAME_DIGITAL(NAME, COUNTER) _ADD_PIN(#NAME, COUNTER) -#define REPORT_NAME_ANALOG(NAME, COUNTER) _ADD_PIN(#NAME, COUNTER) +#define REPORT_NAME_DIGITAL(COUNTER, NAME) _ADD_PIN(#NAME, COUNTER) +#define REPORT_NAME_ANALOG(COUNTER, NAME) _ADD_PIN(#NAME, COUNTER) #include "pinsDebug_list.h" #line 47 @@ -62,8 +62,8 @@ #define _ADD_PIN_2(ENTRY_NAME, NAME, IS_DIGITAL) { ENTRY_NAME, NAME, IS_DIGITAL }, #define _ADD_PIN(NAME, COUNTER, IS_DIGITAL) _ADD_PIN_2(entry_NAME_##COUNTER, NAME, IS_DIGITAL) -#define REPORT_NAME_DIGITAL(NAME, COUNTER) _ADD_PIN(NAME, COUNTER, true) -#define REPORT_NAME_ANALOG(NAME, COUNTER) _ADD_PIN(analogInputToDigitalPin(NAME), COUNTER, false) +#define REPORT_NAME_DIGITAL(COUNTER, NAME) _ADD_PIN(NAME, COUNTER, true) +#define REPORT_NAME_ANALOG(COUNTER, NAME) _ADD_PIN(analogInputToDigitalPin(NAME), COUNTER, false) typedef struct { diff --git a/Marlin/src/pins/pinsDebug_list.h b/Marlin/src/pins/pinsDebug_list.h index a6a175ccd..19b3c5d30 100644 --- a/Marlin/src/pins/pinsDebug_list.h +++ b/Marlin/src/pins/pinsDebug_list.h @@ -11,7 +11,7 @@ * (at your option) any later version. * * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY without even the implied warranty of + * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * @@ -25,894 +25,1054 @@ // Following this pattern is a must. // If the new pin name is over 28 characters long then pinsDebug.h will need to be modified. -// Pin list updated from 25 JUL 2017 Re-ARM branch - max length of pin name is 24 +// Pin lists 1.1.x and 2.0.x synchronized 2018-02-17 -#line 31 // set __LINE__ to a known value for both passes +#define PIN_EXISTS_ANALOG(PN) (PIN_EXISTS(PN) && PN##_PIN < NUM_ANALOG_INPUTS) +#define _EXISTS(PN) (defined(PN) && PN >= 0) +#define _EXISTS_ANALOG(PN) (_EXISTS(PN) && PN < NUM_ANALOG_INPUTS) -#if defined(EXT_AUX_A0) && EXT_AUX_A0 >= 0 && EXT_AUX_A0 < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(EXT_AUX_A0, __LINE__ ) +#line 0 // set __LINE__ to a known value for both passes + +#if _EXISTS_ANALOG(EXT_AUX_A0) + REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0) #endif -#if defined(EXT_AUX_A1) && EXT_AUX_A1 >= 0 && EXT_AUX_A1 < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(EXT_AUX_A1, __LINE__ ) +#if _EXISTS_ANALOG(EXT_AUX_A1) + REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A1) #endif -#if defined(EXT_AUX_A2) && EXT_AUX_A2 >= 0 && EXT_AUX_A2 < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(EXT_AUX_A2, __LINE__ ) +#if _EXISTS_ANALOG(EXT_AUX_A2) + REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A2) #endif -#if defined(EXT_AUX_A3) && EXT_AUX_A3 >= 0 && EXT_AUX_A3 < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(EXT_AUX_A3, __LINE__ ) +#if _EXISTS_ANALOG(EXT_AUX_A3) + REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A3) #endif -#if defined(EXT_AUX_A4) && EXT_AUX_A4 >= 0 && EXT_AUX_A4 < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(EXT_AUX_A4, __LINE__ ) +#if _EXISTS_ANALOG(EXT_AUX_A4) + REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A4) #endif -#if PIN_EXISTS(FILWIDTH) && FILWIDTH_PIN < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(FILWIDTH_PIN, __LINE__ ) +#if PIN_EXISTS_ANALOG(FILWIDTH) + REPORT_NAME_ANALOG(__LINE__, FILWIDTH_PIN) #endif -#if PIN_EXISTS(MAIN_VOLTAGE_MEASURE) && MAIN_VOLTAGE_MEASURE_PIN < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(MAIN_VOLTAGE_MEASURE_PIN, __LINE__ ) +#if PIN_EXISTS_ANALOG(MAIN_VOLTAGE_MEASURE) + REPORT_NAME_ANALOG(__LINE__, MAIN_VOLTAGE_MEASURE_PIN) #endif #if !defined(ARDUINO_ARCH_SAM) //TC1 & TC2 are macros in the SAM tool chain - #if defined(TC1) && TC1 >= 0 && TC1 < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(TC1, __LINE__ ) + #if _EXISTS_ANALOG(TC1) + REPORT_NAME_ANALOG(__LINE__, TC1) #endif - #if defined(TC2) && TC2 >= 0 && TC2 < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(TC2, __LINE__ ) + #if _EXISTS_ANALOG(TC2) + REPORT_NAME_ANALOG(__LINE__, TC2) #endif #endif -#if PIN_EXISTS(TEMP_0) && TEMP_0_PIN < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(TEMP_0_PIN, __LINE__ ) +#if PIN_EXISTS_ANALOG(TEMP_0) + REPORT_NAME_ANALOG(__LINE__, TEMP_0_PIN) +#endif +#if PIN_EXISTS_ANALOG(TEMP_1) + REPORT_NAME_ANALOG(__LINE__, TEMP_1_PIN) +#endif +#if PIN_EXISTS_ANALOG(TEMP_2) + REPORT_NAME_ANALOG(__LINE__, TEMP_2_PIN) +#endif +#if PIN_EXISTS_ANALOG(TEMP_3) + REPORT_NAME_ANALOG(__LINE__, TEMP_3_PIN) +#endif +#if PIN_EXISTS_ANALOG(TEMP_4) + REPORT_NAME_ANALOG(__LINE__, TEMP_4_PIN) #endif -#if PIN_EXISTS(TEMP_1) && TEMP_1_PIN < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(TEMP_1_PIN, __LINE__ ) +#if _EXISTS(THERMO_CS2) + REPORT_NAME_DIGITAL(__LINE__, THERMO_CS2) #endif -#if PIN_EXISTS(TEMP_2) && TEMP_2_PIN < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(TEMP_2_PIN, __LINE__ ) +#if PIN_EXISTS_ANALOG(TEMP_BED) + REPORT_NAME_ANALOG(__LINE__, TEMP_BED_PIN) #endif -#if PIN_EXISTS(TEMP_3) && TEMP_3_PIN < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(TEMP_3_PIN, __LINE__ ) +#if PIN_EXISTS_ANALOG(TEMP_CHAMBER) + REPORT_NAME_ANALOG(__LINE__, TEMP_CHAMBER_PIN) #endif -#if PIN_EXISTS(TEMP_4) && TEMP_4_PIN < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(TEMP_4_PIN, __LINE__ ) +#if PIN_EXISTS_ANALOG(TEMP_X) + REPORT_NAME_ANALOG(__LINE__, TEMP_X_PIN) #endif -#if PIN_EXISTS(TEMP_BED) && TEMP_BED_PIN < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(TEMP_BED_PIN, __LINE__ ) +#if PIN_EXISTS_ANALOG(ADC_KEYPAD) + REPORT_NAME_ANALOG(__LINE__, ADC_KEYPAD_PIN) #endif -#if PIN_EXISTS(TEMP_CHAMBER) && TEMP_CHAMBER_PIN < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(TEMP_CHAMBER_PIN, __LINE__ ) +#if _EXISTS(__FD) + REPORT_NAME_DIGITAL(__LINE__, __FD) #endif -#if PIN_EXISTS(TEMP_X) && TEMP_X_PIN < NUM_ANALOG_INPUTS - REPORT_NAME_ANALOG(TEMP_X_PIN, __LINE__ ) +#if _EXISTS(__FS) + REPORT_NAME_DIGITAL(__LINE__, __FS) #endif -#if defined(__FD) && __FD >= 0 - REPORT_NAME_DIGITAL(__FD, __LINE__ ) +#if _EXISTS(__GD) + REPORT_NAME_DIGITAL(__LINE__, __GD) #endif -#if defined(__FS) && __FS >= 0 - REPORT_NAME_DIGITAL(__FS, __LINE__ ) +#if _EXISTS(__GS) + REPORT_NAME_DIGITAL(__LINE__, __GS) #endif -#if defined(__GD) && __GD >= 0 - REPORT_NAME_DIGITAL(__GD, __LINE__ ) +#if PIN_EXISTS(AVR_MISO) + REPORT_NAME_DIGITAL(__LINE__, AVR_MISO_PIN) #endif -#if defined(__GS) && __GS >= 0 - REPORT_NAME_DIGITAL(__GS, __LINE__ ) +#if PIN_EXISTS(AVR_MOSI) + REPORT_NAME_DIGITAL(__LINE__, AVR_MOSI_PIN) #endif -#if PIN_EXISTS(ADC_KEYPAD) - REPORT_NAME_DIGITAL(ADC_KEYPAD_PIN, __LINE__ ) +#if PIN_EXISTS(AVR_SCK) + REPORT_NAME_DIGITAL(__LINE__, AVR_SCK_PIN) #endif #if PIN_EXISTS(ALARM) - REPORT_NAME_DIGITAL(ALARM_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, ALARM_PIN) +#endif +#if PIN_EXISTS(AVR_SS) + REPORT_NAME_DIGITAL(__LINE__, AVR_SS_PIN) #endif #if PIN_EXISTS(BEEPER) - REPORT_NAME_DIGITAL(BEEPER_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, BEEPER_PIN) #endif -#if defined(BTN_BACK) && BTN_BACK >= 0 - REPORT_NAME_DIGITAL(BTN_BACK, __LINE__ ) +#if _EXISTS(BTN_BACK) + REPORT_NAME_DIGITAL(__LINE__, BTN_BACK) #endif -#if defined(BTN_CENTER) && BTN_CENTER >= 0 - REPORT_NAME_DIGITAL(BTN_CENTER, __LINE__ ) +#if _EXISTS(BTN_CENTER) + REPORT_NAME_DIGITAL(__LINE__, BTN_CENTER) #endif -#if defined(BTN_DOWN) && BTN_DOWN >= 0 - REPORT_NAME_DIGITAL(BTN_DOWN, __LINE__ ) +#if _EXISTS(BTN_DOWN) + REPORT_NAME_DIGITAL(__LINE__, BTN_DOWN) #endif -#if defined(BTN_DWN) && BTN_DWN >= 0 - REPORT_NAME_DIGITAL(BTN_DWN, __LINE__ ) +#if _EXISTS(BTN_DWN) + REPORT_NAME_DIGITAL(__LINE__, BTN_DWN) #endif -#if defined(BTN_EN1) && BTN_EN1 >= 0 - REPORT_NAME_DIGITAL(BTN_EN1, __LINE__ ) +#if _EXISTS(BTN_EN1) + REPORT_NAME_DIGITAL(__LINE__, BTN_EN1) #endif -#if defined(BTN_EN2) && BTN_EN2 >= 0 - REPORT_NAME_DIGITAL(BTN_EN2, __LINE__ ) +#if _EXISTS(BTN_EN2) + REPORT_NAME_DIGITAL(__LINE__, BTN_EN2) #endif -#if defined(BTN_ENC) && BTN_ENC >= 0 - REPORT_NAME_DIGITAL(BTN_ENC, __LINE__ ) +#if _EXISTS(BTN_ENC) + REPORT_NAME_DIGITAL(__LINE__, BTN_ENC) #endif -#if defined(BTN_HOME) && BTN_HOME >= 0 - REPORT_NAME_DIGITAL(BTN_HOME, __LINE__ ) +#if _EXISTS(BTN_HOME) + REPORT_NAME_DIGITAL(__LINE__, BTN_HOME) #endif -#if defined(BTN_LEFT) && BTN_LEFT >= 0 - REPORT_NAME_DIGITAL(BTN_LEFT, __LINE__ ) +#if _EXISTS(BTN_LEFT) + REPORT_NAME_DIGITAL(__LINE__, BTN_LEFT) #endif -#if defined(BTN_LFT) && BTN_LFT >= 0 - REPORT_NAME_DIGITAL(BTN_LFT, __LINE__ ) +#if _EXISTS(BTN_LFT) + REPORT_NAME_DIGITAL(__LINE__, BTN_LFT) #endif -#if defined(BTN_RIGHT) && BTN_RIGHT >= 0 - REPORT_NAME_DIGITAL(BTN_RIGHT, __LINE__ ) +#if _EXISTS(BTN_RIGHT) + REPORT_NAME_DIGITAL(__LINE__, BTN_RIGHT) #endif -#if defined(BTN_RT) && BTN_RT >= 0 - REPORT_NAME_DIGITAL(BTN_RT, __LINE__ ) +#if _EXISTS(BTN_RT) + REPORT_NAME_DIGITAL(__LINE__, BTN_RT) #endif -#if defined(BTN_UP) && BTN_UP >= 0 - REPORT_NAME_DIGITAL(BTN_UP, __LINE__ ) +#if _EXISTS(BTN_UP) + REPORT_NAME_DIGITAL(__LINE__, BTN_UP) #endif #if PIN_EXISTS(CASE_LIGHT) - REPORT_NAME_DIGITAL(CASE_LIGHT_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, CASE_LIGHT_PIN) #endif #if PIN_EXISTS(CONTROLLER_FAN) - REPORT_NAME_DIGITAL(CONTROLLER_FAN_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, CONTROLLER_FAN_PIN) #endif #if PIN_EXISTS(CUTOFF_RESET) - REPORT_NAME_DIGITAL(CUTOFF_RESET_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, CUTOFF_RESET_PIN) #endif #if PIN_EXISTS(CUTOFF_TEST) - REPORT_NAME_DIGITAL(CUTOFF_TEST_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, CUTOFF_TEST_PIN) #endif -#if defined(D57) && D57 >= 0 - REPORT_NAME_DIGITAL(D57, __LINE__ ) +#if _EXISTS(D57) + REPORT_NAME_DIGITAL(__LINE__, D57) #endif -#if defined(D58) && D58 >= 0 - REPORT_NAME_DIGITAL(D58, __LINE__ ) +#if _EXISTS(D58) + REPORT_NAME_DIGITAL(__LINE__, D58) #endif #if PIN_EXISTS(DAC_DISABLE) - REPORT_NAME_DIGITAL(DAC_DISABLE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, DAC_DISABLE_PIN) #endif -#if defined(DAC0_SYNC) && DAC0_SYNC >= 0 - REPORT_NAME_DIGITAL(DAC0_SYNC, __LINE__ ) +#if _EXISTS(DAC0_SYNC) + REPORT_NAME_DIGITAL(__LINE__, DAC0_SYNC) #endif -#if defined(DAC1_SYNC) && DAC1_SYNC >= 0 - REPORT_NAME_DIGITAL(DAC1_SYNC, __LINE__ ) +#if _EXISTS(DAC1_SYNC) + REPORT_NAME_DIGITAL(__LINE__, DAC1_SYNC) #endif #if PIN_EXISTS(DEBUG) - REPORT_NAME_DIGITAL(DEBUG_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, DEBUG_PIN) #endif -#if defined(DIGIPOTS_I2C_SCL) && DIGIPOTS_I2C_SCL >= 0 - REPORT_NAME_DIGITAL(DIGIPOTS_I2C_SCL, __LINE__ ) +#if _EXISTS(DIGIPOTS_I2C_SCL) + REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SCL) #endif -#if defined(DIGIPOTS_I2C_SDA_E0) && DIGIPOTS_I2C_SDA_E0 >= 0 - REPORT_NAME_DIGITAL(DIGIPOTS_I2C_SDA_E0, __LINE__ ) +#if _EXISTS(DIGIPOTS_I2C_SDA_E0) + REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_E0) #endif -#if defined(DIGIPOTS_I2C_SDA_E1) && DIGIPOTS_I2C_SDA_E1 >= 0 - REPORT_NAME_DIGITAL(DIGIPOTS_I2C_SDA_E1, __LINE__ ) +#if _EXISTS(DIGIPOTS_I2C_SDA_E1) + REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_E1) #endif -#if defined(DIGIPOTS_I2C_SDA_X) && DIGIPOTS_I2C_SDA_X >= 0 - REPORT_NAME_DIGITAL(DIGIPOTS_I2C_SDA_X, __LINE__ ) +#if _EXISTS(DIGIPOTS_I2C_SDA_X) + REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_X) #endif -#if defined(DIGIPOTS_I2C_SDA_Y) && DIGIPOTS_I2C_SDA_Y >= 0 - REPORT_NAME_DIGITAL(DIGIPOTS_I2C_SDA_Y, __LINE__ ) +#if _EXISTS(DIGIPOTS_I2C_SDA_Y) + REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_Y) #endif -#if defined(DIGIPOTS_I2C_SDA_Z) && DIGIPOTS_I2C_SDA_Z >= 0 - REPORT_NAME_DIGITAL(DIGIPOTS_I2C_SDA_Z, __LINE__ ) +#if _EXISTS(DIGIPOTS_I2C_SDA_Z) + REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_Z) #endif #if PIN_EXISTS(DIGIPOTSS) - REPORT_NAME_DIGITAL(DIGIPOTSS_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, DIGIPOTSS_PIN) #endif -#if defined(DOGLCD_A0) && DOGLCD_A0 >= 0 - REPORT_NAME_DIGITAL(DOGLCD_A0, __LINE__ ) +#if _EXISTS(DOGLCD_A0) + REPORT_NAME_DIGITAL(__LINE__, DOGLCD_A0) #endif -#if defined(DOGLCD_CS) && DOGLCD_CS >= 0 - REPORT_NAME_DIGITAL(DOGLCD_CS, __LINE__ ) +#if _EXISTS(DOGLCD_CS) + REPORT_NAME_DIGITAL(__LINE__, DOGLCD_CS) #endif -#if defined(DOGLCD_MOSI) && DOGLCD_MOSI >= 0 - REPORT_NAME_DIGITAL(DOGLCD_MOSI, __LINE__ ) +#if _EXISTS(DOGLCD_MOSI) + REPORT_NAME_DIGITAL(__LINE__, DOGLCD_MOSI) #endif -#if defined(DOGLCD_SCK) && DOGLCD_SCK >= 0 - REPORT_NAME_DIGITAL(DOGLCD_SCK, __LINE__ ) +#if _EXISTS(DOGLCD_SCK) + REPORT_NAME_DIGITAL(__LINE__, DOGLCD_SCK) #endif #if PIN_EXISTS(E_MUX0) - REPORT_NAME_DIGITAL(E_MUX0_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E_MUX0_PIN) #endif #if PIN_EXISTS(E_MUX1) - REPORT_NAME_DIGITAL(E_MUX1_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E_MUX1_PIN) #endif #if PIN_EXISTS(E_MUX2) - REPORT_NAME_DIGITAL(E_MUX2_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E_MUX2_PIN) #endif #if PIN_EXISTS(E_STOP) - REPORT_NAME_DIGITAL(E_STOP_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E_STOP_PIN) #endif #if PIN_EXISTS(E0_ATT) - REPORT_NAME_DIGITAL(E0_ATT_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E0_ATT_PIN) +#endif +#if PIN_EXISTS(E0_AUTO_FAN) + REPORT_NAME_DIGITAL(__LINE__, E0_AUTO_FAN_PIN) #endif #if PIN_EXISTS(E0_CS) - REPORT_NAME_DIGITAL(E0_CS_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E0_CS_PIN) #endif #if PIN_EXISTS(E0_DIR) - REPORT_NAME_DIGITAL(E0_DIR_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E0_DIR_PIN) #endif #if PIN_EXISTS(E0_ENABLE) - REPORT_NAME_DIGITAL(E0_ENABLE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E0_ENABLE_PIN) #endif #if PIN_EXISTS(E0_MS1) - REPORT_NAME_DIGITAL(E0_MS1_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E0_MS1_PIN) #endif #if PIN_EXISTS(E0_MS2) - REPORT_NAME_DIGITAL(E0_MS2_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E0_MS2_PIN) #endif #if PIN_EXISTS(E0_STEP) - REPORT_NAME_DIGITAL(E0_STEP_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E0_STEP_PIN) +#endif +#if PIN_EXISTS(E1_AUTO_FAN) + REPORT_NAME_DIGITAL(__LINE__, E1_AUTO_FAN_PIN) #endif #if PIN_EXISTS(E1_CS) - REPORT_NAME_DIGITAL(E1_CS_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E1_CS_PIN) #endif #if PIN_EXISTS(E1_DIR) - REPORT_NAME_DIGITAL(E1_DIR_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E1_DIR_PIN) #endif #if PIN_EXISTS(E1_ENABLE) - REPORT_NAME_DIGITAL(E1_ENABLE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E1_ENABLE_PIN) #endif #if PIN_EXISTS(E1_MS1) - REPORT_NAME_DIGITAL(E1_MS1_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E1_MS1_PIN) #endif #if PIN_EXISTS(E1_MS2) - REPORT_NAME_DIGITAL(E1_MS2_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E1_MS2_PIN) #endif #if PIN_EXISTS(E1_STEP) - REPORT_NAME_DIGITAL(E1_STEP_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E1_STEP_PIN) +#endif +#if PIN_EXISTS(E2_AUTO_FAN) + REPORT_NAME_DIGITAL(__LINE__, E2_AUTO_FAN_PIN) #endif #if PIN_EXISTS(E2_CS) - REPORT_NAME_DIGITAL(E2_CS_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E2_CS_PIN) #endif #if PIN_EXISTS(E2_DIR) - REPORT_NAME_DIGITAL(E2_DIR_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E2_DIR_PIN) #endif #if PIN_EXISTS(E2_ENABLE) - REPORT_NAME_DIGITAL(E2_ENABLE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E2_ENABLE_PIN) +#endif +#if PIN_EXISTS(E2_MS1) + REPORT_NAME_DIGITAL(__LINE__, E2_MS1_PIN) +#endif +#if PIN_EXISTS(E2_MS2) + REPORT_NAME_DIGITAL(__LINE__, E2_MS2_PIN) #endif #if PIN_EXISTS(E2_STEP) - REPORT_NAME_DIGITAL(E2_STEP_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E2_STEP_PIN) +#endif +#if PIN_EXISTS(E3_AUTO_FAN) + REPORT_NAME_DIGITAL(__LINE__, E3_AUTO_FAN_PIN) #endif #if PIN_EXISTS(E3_CS) - REPORT_NAME_DIGITAL(E3_CS_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E3_CS_PIN) #endif #if PIN_EXISTS(E3_DIR) - REPORT_NAME_DIGITAL(E3_DIR_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E3_DIR_PIN) #endif #if PIN_EXISTS(E3_ENABLE) - REPORT_NAME_DIGITAL(E3_ENABLE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E3_ENABLE_PIN) #endif #if PIN_EXISTS(E3_MS1) - REPORT_NAME_DIGITAL(E3_MS1_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E3_MS1_PIN) #endif #if PIN_EXISTS(E3_MS2) - REPORT_NAME_DIGITAL(E3_MS2_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E3_MS2_PIN) #endif #if PIN_EXISTS(E3_MS3) - REPORT_NAME_DIGITAL(E3_MS3_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E3_MS3_PIN) #endif #if PIN_EXISTS(E3_STEP) - REPORT_NAME_DIGITAL(E3_STEP_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E3_STEP_PIN) +#endif +#if PIN_EXISTS(E4_AUTO_FAN) + REPORT_NAME_DIGITAL(__LINE__, E4_AUTO_FAN_PIN) #endif #if PIN_EXISTS(E4_CS) - REPORT_NAME_DIGITAL(E4_CS_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E4_CS_PIN) #endif #if PIN_EXISTS(E4_DIR) - REPORT_NAME_DIGITAL(E4_DIR_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E4_DIR_PIN) #endif #if PIN_EXISTS(E4_ENABLE) - REPORT_NAME_DIGITAL(E4_ENABLE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E4_ENABLE_PIN) #endif #if PIN_EXISTS(E4_MS1) - REPORT_NAME_DIGITAL(E4_MS1_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E4_MS1_PIN) #endif #if PIN_EXISTS(E4_MS2) - REPORT_NAME_DIGITAL(E4_MS2_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E4_MS2_PIN) #endif #if PIN_EXISTS(E4_MS3) - REPORT_NAME_DIGITAL(E4_MS3_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E4_MS3_PIN) #endif #if PIN_EXISTS(E4_STEP) - REPORT_NAME_DIGITAL(E4_STEP_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E4_STEP_PIN) #endif -#if defined(ENET_CRS) && ENET_CRS >= 0 - REPORT_NAME_DIGITAL(ENET_CRS, __LINE__ ) +#if _EXISTS(ENET_CRS) + REPORT_NAME_DIGITAL(__LINE__, ENET_CRS) #endif -#if defined(ENET_MDIO) && ENET_MDIO >= 0 - REPORT_NAME_DIGITAL(ENET_MDIO, __LINE__ ) +#if _EXISTS(ENET_MDIO) + REPORT_NAME_DIGITAL(__LINE__, ENET_MDIO) #endif -#if defined(ENET_MOC) && ENET_MOC >= 0 - REPORT_NAME_DIGITAL(ENET_MOC, __LINE__ ) +#if _EXISTS(ENET_MOC) + REPORT_NAME_DIGITAL(__LINE__, ENET_MOC) #endif -#if defined(ENET_RX_ER) && ENET_RX_ER >= 0 - REPORT_NAME_DIGITAL(ENET_RX_ER, __LINE__ ) +#if _EXISTS(ENET_RX_ER) + REPORT_NAME_DIGITAL(__LINE__, ENET_RX_ER) #endif -#if defined(ENET_RXD0) && ENET_RXD0 >= 0 - REPORT_NAME_DIGITAL(ENET_RXD0, __LINE__ ) +#if _EXISTS(ENET_RXD0) + REPORT_NAME_DIGITAL(__LINE__, ENET_RXD0) #endif -#if defined(ENET_RXD1) && ENET_RXD1 >= 0 - REPORT_NAME_DIGITAL(ENET_RXD1, __LINE__ ) +#if _EXISTS(ENET_RXD1) + REPORT_NAME_DIGITAL(__LINE__, ENET_RXD1) #endif -#if defined(ENET_TX_EN) && ENET_TX_EN >= 0 - REPORT_NAME_DIGITAL(ENET_TX_EN, __LINE__ ) +#if _EXISTS(ENET_TX_EN) + REPORT_NAME_DIGITAL(__LINE__, ENET_TX_EN) #endif -#if defined(ENET_TXD0) && ENET_TXD0 >= 0 - REPORT_NAME_DIGITAL(ENET_TXD0, __LINE__ ) +#if _EXISTS(ENET_TXD0) + REPORT_NAME_DIGITAL(__LINE__, ENET_TXD0) #endif -#if defined(ENET_TXD1) && ENET_TXD1 >= 0 - REPORT_NAME_DIGITAL(ENET_TXD1, __LINE__ ) +#if _EXISTS(ENET_TXD1) + REPORT_NAME_DIGITAL(__LINE__, ENET_TXD1) #endif #if PIN_EXISTS(EXP_VOLTAGE_LEVEL) - REPORT_NAME_DIGITAL(EXP_VOLTAGE_LEVEL_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, EXP_VOLTAGE_LEVEL_PIN) +#endif +#if _EXISTS_ANALOG(EXT_AUX_A0) + REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0) +#endif +#if _EXISTS(EXT_AUX_A0) && EXT_AUX_A0 >= NUM_ANALOG_INPUTS + REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A0) +#endif +#if _EXISTS(EXT_AUX_A0_IO) + REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A0_IO) +#endif +#if _EXISTS_ANALOG(EXT_AUX_A1) + REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A1) #endif -#if defined(EXT_AUX_A0_IO) && EXT_AUX_A0_IO >= 0 - REPORT_NAME_DIGITAL(EXT_AUX_A0_IO, __LINE__ ) +#if _EXISTS(EXT_AUX_A1) && EXT_AUX_A1 >= NUM_ANALOG_INPUTS + REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A1) #endif -#if defined(EXT_AUX_A1_IO) && EXT_AUX_A1_IO >= 0 - REPORT_NAME_DIGITAL(EXT_AUX_A1_IO, __LINE__ ) +#if _EXISTS(EXT_AUX_A1_IO) + REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A1_IO) #endif -#if defined(EXT_AUX_A2_IO) && EXT_AUX_A2_IO >= 0 - REPORT_NAME_DIGITAL(EXT_AUX_A2_IO, __LINE__ ) +#if _EXISTS_ANALOG(EXT_AUX_A2) + REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A2) #endif -#if defined(EXT_AUX_A3_IO) && EXT_AUX_A3_IO >= 0 - REPORT_NAME_DIGITAL(EXT_AUX_A3_IO, __LINE__ ) +#if _EXISTS(EXT_AUX_A2) && EXT_AUX_A2 >= NUM_ANALOG_INPUTS + REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A2) #endif -#if defined(EXT_AUX_A4_IO) && EXT_AUX_A4_IO >= 0 - REPORT_NAME_DIGITAL(EXT_AUX_A4_IO, __LINE__ ) +#if _EXISTS(EXT_AUX_A2_IO) + REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A2_IO) #endif -#if defined(EXT_AUX_PWM_D24) && EXT_AUX_PWM_D24 >= 0 - REPORT_NAME_DIGITAL(EXT_AUX_PWM_D24, __LINE__ ) +#if _EXISTS_ANALOG(EXT_AUX_A3) + REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A3) #endif -#if defined(EXT_AUX_RX1_D2) && EXT_AUX_RX1_D2 >= 0 - REPORT_NAME_DIGITAL(EXT_AUX_RX1_D2, __LINE__ ) +#if _EXISTS(EXT_AUX_A3) && EXT_AUX_A3 >= NUM_ANALOG_INPUTS + REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A3) #endif -#if defined(EXT_AUX_SCL_D0) && EXT_AUX_SCL_D0 >= 0 - REPORT_NAME_DIGITAL(EXT_AUX_SCL_D0, __LINE__ ) +#if _EXISTS(EXT_AUX_A3_IO) + REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A3_IO) #endif -#if defined(EXT_AUX_SDA_D1) && EXT_AUX_SDA_D1 >= 0 - REPORT_NAME_DIGITAL(EXT_AUX_SDA_D1, __LINE__ ) +#if _EXISTS_ANALOG(EXT_AUX_A4) + REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A4) #endif -#if defined(EXT_AUX_TX1_D3) && EXT_AUX_TX1_D3 >= 0 - REPORT_NAME_DIGITAL(EXT_AUX_TX1_D3, __LINE__ ) +#if _EXISTS(EXT_AUX_A4) && EXT_AUX_A4 >= NUM_ANALOG_INPUTS + REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A4) +#endif +#if _EXISTS(EXT_AUX_A4_IO) + REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A4_IO) +#endif +#if _EXISTS(EXT_AUX_PWM_D24) + REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_PWM_D24) +#endif +#if _EXISTS(EXT_AUX_RX1_D2) + REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_RX1_D2) +#endif +#if _EXISTS(EXT_AUX_SCL_D0) + REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_SCL_D0) +#endif +#if _EXISTS(EXT_AUX_SDA_D1) + REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_SDA_D1) +#endif +#if _EXISTS(EXT_AUX_TX1_D3) + REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_TX1_D3) +#endif +#if _EXISTS(EXTRUDER_0_AUTO_FAN) + REPORT_NAME_DIGITAL(__LINE__, EXTRUDER_0_AUTO_FAN) +#endif +#if _EXISTS(EXTRUDER_1_AUTO_FAN) + REPORT_NAME_DIGITAL(__LINE__, EXTRUDER_1_AUTO_FAN) #endif #if PIN_EXISTS(FAN) - REPORT_NAME_DIGITAL(FAN_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, FAN_PIN) #endif #if PIN_EXISTS(FAN1) - REPORT_NAME_DIGITAL(FAN1_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, FAN1_PIN) #endif #if PIN_EXISTS(FAN2) - REPORT_NAME_DIGITAL(FAN2_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, FAN2_PIN) #endif #if PIN_EXISTS(FAN3) - REPORT_NAME_DIGITAL(FAN3_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, FAN3_PIN) #endif #if PIN_EXISTS(FIL_RUNOUT) - REPORT_NAME_DIGITAL(FIL_RUNOUT_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, FIL_RUNOUT_PIN) #endif -#if defined(GEN7_VERSION) && GEN7_VERSION >= 0 - REPORT_NAME_DIGITAL(GEN7_VERSION, __LINE__ ) +#if PIN_EXISTS_ANALOG(FILWIDTH) + REPORT_NAME_ANALOG(__LINE__, FILWIDTH_PIN) #endif #if PIN_EXISTS(HEATER_0) - REPORT_NAME_DIGITAL(HEATER_0_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, HEATER_0_PIN) #endif #if PIN_EXISTS(HEATER_1) - REPORT_NAME_DIGITAL(HEATER_1_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, HEATER_1_PIN) #endif #if PIN_EXISTS(HEATER_2) - REPORT_NAME_DIGITAL(HEATER_2_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, HEATER_2_PIN) #endif #if PIN_EXISTS(HEATER_3) - REPORT_NAME_DIGITAL(HEATER_3_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, HEATER_3_PIN) #endif #if PIN_EXISTS(HEATER_4) - REPORT_NAME_DIGITAL(HEATER_4_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, HEATER_4_PIN) #endif #if PIN_EXISTS(HEATER_5) - REPORT_NAME_DIGITAL(HEATER_5_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, HEATER_5_PIN) #endif #if PIN_EXISTS(HEATER_6) - REPORT_NAME_DIGITAL(HEATER_6_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, HEATER_6_PIN) #endif #if PIN_EXISTS(HEATER_7) - REPORT_NAME_DIGITAL(HEATER_7_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, HEATER_7_PIN) #endif #if PIN_EXISTS(HEATER_BED) - REPORT_NAME_DIGITAL(HEATER_BED_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, HEATER_BED_PIN) #endif #if PIN_EXISTS(HOME) - REPORT_NAME_DIGITAL(HOME_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, HOME_PIN) #endif #if PIN_EXISTS(I2C_SCL) - REPORT_NAME_DIGITAL(I2C_SCL_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, I2C_SCL_PIN) #endif #if PIN_EXISTS(I2C_SDA) - REPORT_NAME_DIGITAL(I2C_SDA_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, I2C_SDA_PIN) #endif #if PIN_EXISTS(KILL) - REPORT_NAME_DIGITAL(KILL_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, KILL_PIN) #endif #if PIN_EXISTS(LCD_BACKLIGHT) - REPORT_NAME_DIGITAL(LCD_BACKLIGHT_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, LCD_BACKLIGHT_PIN) #endif -#if defined(LCD_PINS_D4) && LCD_PINS_D4 >= 0 - REPORT_NAME_DIGITAL(LCD_PINS_D4, __LINE__ ) +#if _EXISTS(LCD_PINS_D4) + REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_D4) #endif -#if defined(LCD_PINS_D5) && LCD_PINS_D5 >= 0 - REPORT_NAME_DIGITAL(LCD_PINS_D5, __LINE__ ) +#if _EXISTS(LCD_PINS_D5) + REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_D5) #endif -#if defined(LCD_PINS_D6) && LCD_PINS_D6 >= 0 - REPORT_NAME_DIGITAL(LCD_PINS_D6, __LINE__ ) +#if _EXISTS(LCD_PINS_D6) + REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_D6) #endif -#if defined(LCD_PINS_D7) && LCD_PINS_D7 >= 0 - REPORT_NAME_DIGITAL(LCD_PINS_D7, __LINE__ ) +#if _EXISTS(LCD_PINS_D7) + REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_D7) #endif -#if defined(LCD_PINS_ENABLE) && LCD_PINS_ENABLE >= 0 - REPORT_NAME_DIGITAL(LCD_PINS_ENABLE, __LINE__ ) +#if _EXISTS(LCD_PINS_ENABLE) + REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_ENABLE) #endif -#if defined(LCD_PINS_RS) && LCD_PINS_RS >= 0 - REPORT_NAME_DIGITAL(LCD_PINS_RS, __LINE__ ) +#if _EXISTS(LCD_PINS_RS) + REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_RS) #endif -#if defined(LCD_SDSS) && LCD_SDSS >= 0 - REPORT_NAME_DIGITAL(LCD_SDSS, __LINE__ ) +#if _EXISTS(LCD_SDSS) + REPORT_NAME_DIGITAL(__LINE__, LCD_SDSS) #endif #if PIN_EXISTS(LED_GREEN) - REPORT_NAME_DIGITAL(LED_GREEN_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, LED_GREEN_PIN) #endif #if PIN_EXISTS(LED) - REPORT_NAME_DIGITAL(LED_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, LED_PIN) #endif #if PIN_EXISTS(LED_RED) - REPORT_NAME_DIGITAL(LED_RED_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, LED_RED_PIN) #endif #if PIN_EXISTS(MAX) - REPORT_NAME_DIGITAL(MAX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, MAX_PIN) #endif #if PIN_EXISTS(MAX6675_DO) - REPORT_NAME_DIGITAL(MAX6675_DO_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, MAX6675_DO_PIN) #endif #if PIN_EXISTS(MAX6675_SCK) - REPORT_NAME_DIGITAL(MAX6675_SCK_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, MAX6675_SCK_PIN) #endif -#if defined(MAX6675_SS) && MAX6675_SS >= 0 - REPORT_NAME_DIGITAL(MAX6675_SS, __LINE__ ) +#if PIN_EXISTS_ANALOG(MAIN_VOLTAGE_MEASURE) + REPORT_NAME_ANALOG(__LINE__, MAIN_VOLTAGE_MEASURE_PIN) #endif -// #if defined(MISO) && MISO >= 0 -// REPORT_NAME_DIGITAL(MISO, __LINE__ ) +#if _EXISTS(MAX6675_SS) + REPORT_NAME_DIGITAL(__LINE__, MAX6675_SS) +#endif +// #if _EXISTS(MISO) +// REPORT_NAME_DIGITAL(__LINE__, MISO) // #endif #if PIN_EXISTS(MISO) - REPORT_NAME_DIGITAL(MISO_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, MISO_PIN) +#endif +#if PIN_EXISTS(MOSFET_A) + REPORT_NAME_DIGITAL(__LINE__, MOSFET_A_PIN) +#endif +#if PIN_EXISTS(MOSFET_B) + REPORT_NAME_DIGITAL(__LINE__, MOSFET_B_PIN) +#endif +#if PIN_EXISTS(MOSFET_C) + REPORT_NAME_DIGITAL(__LINE__, MOSFET_C_PIN) #endif -// #if defined(MOSI) && MOSI >= 0 -// REPORT_NAME_DIGITAL(MOSI, __LINE__ ) +#if PIN_EXISTS(MOSFET_D) + REPORT_NAME_DIGITAL(__LINE__, MOSFET_D_PIN) +#endif +// #if _EXISTS(MOSI) +// REPORT_NAME_DIGITAL(__LINE__, MOSI) // #endif #if PIN_EXISTS(MOSI) - REPORT_NAME_DIGITAL(MOSI_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, MOSI_PIN) #endif #if PIN_EXISTS(MOTOR_CURRENT_PWM_E) - REPORT_NAME_DIGITAL(MOTOR_CURRENT_PWM_E_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, MOTOR_CURRENT_PWM_E_PIN) #endif #if PIN_EXISTS(MOTOR_CURRENT_PWM_XY) - REPORT_NAME_DIGITAL(MOTOR_CURRENT_PWM_XY_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, MOTOR_CURRENT_PWM_XY_PIN) #endif #if PIN_EXISTS(MOTOR_CURRENT_PWM_Z) - REPORT_NAME_DIGITAL(MOTOR_CURRENT_PWM_Z_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, MOTOR_CURRENT_PWM_Z_PIN) #endif #if PIN_EXISTS(MOTOR_FAULT) - REPORT_NAME_DIGITAL(MOTOR_FAULT_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, MOTOR_FAULT_PIN) #endif #if PIN_EXISTS(NUM_DIGITAL) - REPORT_NAME_DIGITAL(NUM_DIGITAL_PINS, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, NUM_DIGITAL_PINS) #endif #if PIN_EXISTS(ORIG_E0_AUTO_FAN) - REPORT_NAME_DIGITAL(ORIG_E0_AUTO_FAN_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, ORIG_E0_AUTO_FAN_PIN) #endif #if PIN_EXISTS(ORIG_E1_AUTO_FAN) - REPORT_NAME_DIGITAL(ORIG_E1_AUTO_FAN_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, ORIG_E1_AUTO_FAN_PIN) #endif #if PIN_EXISTS(ORIG_E2_AUTO_FAN) - REPORT_NAME_DIGITAL(ORIG_E2_AUTO_FAN_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, ORIG_E2_AUTO_FAN_PIN) #endif #if PIN_EXISTS(ORIG_E3_AUTO_FAN) - REPORT_NAME_DIGITAL(ORIG_E3_AUTO_FAN_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, ORIG_E3_AUTO_FAN_PIN) +#endif +#if PIN_EXISTS(ORIG_E4_AUTO_FAN) + REPORT_NAME_DIGITAL(__LINE__, ORIG_E4_AUTO_FAN_PIN) #endif #if PIN_EXISTS(PHOTOGRAPH) - REPORT_NAME_DIGITAL(PHOTOGRAPH_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, PHOTOGRAPH_PIN) #endif #if PIN_EXISTS(PS_ON) - REPORT_NAME_DIGITAL(PS_ON_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, PS_ON_PIN) #endif #if PIN_EXISTS(PWM_1) - REPORT_NAME_DIGITAL(PWM_1_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, PWM_1_PIN) #endif #if PIN_EXISTS(PWM_2) - REPORT_NAME_DIGITAL(PWM_2_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, PWM_2_PIN) +#endif +#if _EXISTS(REF_CLK) + REPORT_NAME_DIGITAL(__LINE__, REF_CLK) +#endif +#if PIN_EXISTS(RAMPS_D10) + REPORT_NAME_DIGITAL(__LINE__, RAMPS_D10_PIN) #endif -#if defined(REF_CLK) && REF_CLK >= 0 - REPORT_NAME_DIGITAL(REF_CLK, __LINE__ ) +#if PIN_EXISTS(RAMPS_D8) + REPORT_NAME_DIGITAL(__LINE__, RAMPS_D8_PIN) +#endif +#if PIN_EXISTS(RAMPS_D9) + REPORT_NAME_DIGITAL(__LINE__, RAMPS_D9_PIN) +#endif +#if PIN_EXISTS(RGB_LED_R) + REPORT_NAME_DIGITAL(__LINE__, RGB_LED_R_PIN) +#endif +#if PIN_EXISTS(RGB_LED_G) + REPORT_NAME_DIGITAL(__LINE__, RGB_LED_G_PIN) +#endif +#if PIN_EXISTS(RGB_LED_B) + REPORT_NAME_DIGITAL(__LINE__, RGB_LED_B_PIN) +#endif +#if PIN_EXISTS(RGB_LED_W) + REPORT_NAME_DIGITAL(__LINE__, RGB_LED_W_PIN) #endif #if PIN_EXISTS(RX_ENABLE) - REPORT_NAME_DIGITAL(RX_ENABLE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, RX_ENABLE_PIN) #endif #if PIN_EXISTS(SAFETY_TRIGGERED) - REPORT_NAME_DIGITAL(SAFETY_TRIGGERED_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SAFETY_TRIGGERED_PIN) #endif -// #if defined(SCK) && SCK >= 0 -// REPORT_NAME_DIGITAL(SCK, __LINE__ ) +// #if _EXISTS(SCK) +// REPORT_NAME_DIGITAL(__LINE__, SCK) // #endif #if PIN_EXISTS(SCK) - REPORT_NAME_DIGITAL(SCK_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SCK_PIN) +#endif +#if _EXISTS(SCL) + REPORT_NAME_DIGITAL(__LINE__, SCL) #endif #if PIN_EXISTS(SD_DETECT) - REPORT_NAME_DIGITAL(SD_DETECT_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SD_DETECT_PIN) #endif -#if defined(SDPOWER) && SDPOWER >= 0 - REPORT_NAME_DIGITAL(SDPOWER, __LINE__ ) +#if _EXISTS(SDA) + REPORT_NAME_DIGITAL(__LINE__, SDA) #endif -#if defined(SDSS) && SDSS >= 0 - REPORT_NAME_DIGITAL(SDSS, __LINE__ ) +#if _EXISTS(SDPOWER) + REPORT_NAME_DIGITAL(__LINE__, SDPOWER) #endif -#if defined(SERVO0) && SERVO0 >= 0 - REPORT_NAME_DIGITAL(SERVO0, __LINE__ ) +#if _EXISTS(SDSS) + REPORT_NAME_DIGITAL(__LINE__, SDSS) +#endif +#if _EXISTS(SERVO0) + REPORT_NAME_DIGITAL(__LINE__, SERVO0) #endif #if PIN_EXISTS(SERVO0) - REPORT_NAME_DIGITAL(SERVO0_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SERVO0_PIN) #endif #if PIN_EXISTS(SERVO1) - REPORT_NAME_DIGITAL(SERVO1_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SERVO1_PIN) #endif #if PIN_EXISTS(SERVO2) - REPORT_NAME_DIGITAL(SERVO2_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SERVO2_PIN) #endif #if PIN_EXISTS(SERVO3) - REPORT_NAME_DIGITAL(SERVO3_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SERVO3_PIN) +#endif +#if _EXISTS(SHIFT_CLK) + REPORT_NAME_DIGITAL(__LINE__, SHIFT_CLK) #endif -#if defined(SHIFT_CLK) && SHIFT_CLK >= 0 - REPORT_NAME_DIGITAL(SHIFT_CLK, __LINE__ ) +#if _EXISTS(SHIFT_EN) + REPORT_NAME_DIGITAL(__LINE__, SHIFT_EN) #endif -#if defined(SHIFT_EN) && SHIFT_EN >= 0 - REPORT_NAME_DIGITAL(SHIFT_EN, __LINE__ ) +#if _EXISTS(SHIFT_LD) + REPORT_NAME_DIGITAL(__LINE__, SHIFT_LD) #endif -#if defined(SHIFT_LD) && SHIFT_LD >= 0 - REPORT_NAME_DIGITAL(SHIFT_LD, __LINE__ ) +#if _EXISTS(SHIFT_OUT) + REPORT_NAME_DIGITAL(__LINE__, SHIFT_OUT) #endif -#if defined(SHIFT_OUT) && SHIFT_OUT >= 0 - REPORT_NAME_DIGITAL(SHIFT_OUT, __LINE__ ) +#if PIN_EXISTS(SLED) + REPORT_NAME_DIGITAL(__LINE__, SLED_PIN) #endif #if PIN_EXISTS(SLEEP_WAKE) - REPORT_NAME_DIGITAL(SLEEP_WAKE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SLEEP_WAKE_PIN) +#endif +#if PIN_EXISTS(SOL0) + REPORT_NAME_DIGITAL(__LINE__, SOL0_PIN) #endif #if PIN_EXISTS(SOL1) - REPORT_NAME_DIGITAL(SOL1_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SOL1_PIN) #endif #if PIN_EXISTS(SOL2) - REPORT_NAME_DIGITAL(SOL2_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SOL2_PIN) +#endif +#if PIN_EXISTS(SOL3) + REPORT_NAME_DIGITAL(__LINE__, SOL3_PIN) #endif -#if defined(SPARE_IO) && SPARE_IO >= 0 - REPORT_NAME_DIGITAL(SPARE_IO, __LINE__ ) +#if PIN_EXISTS(SOL4) + REPORT_NAME_DIGITAL(__LINE__, SOL4_PIN) #endif -#if defined(SPI_CHAN_DAC) && SPI_CHAN_DAC >= 0 - REPORT_NAME_DIGITAL(SPI_CHAN_DAC, __LINE__ ) +#if _EXISTS(SPARE_IO) + REPORT_NAME_DIGITAL(__LINE__, SPARE_IO) #endif -#if defined(SPI_CHAN_EEPROM1) && SPI_CHAN_EEPROM1 >= 0 - REPORT_NAME_DIGITAL(SPI_CHAN_EEPROM1, __LINE__ ) +#if _EXISTS(SPI_CHAN_DAC) + REPORT_NAME_DIGITAL(__LINE__, SPI_CHAN_DAC) #endif -#if defined(SPI_EEPROM) && SPI_EEPROM >= 0 - REPORT_NAME_DIGITAL(SPI_EEPROM, __LINE__ ) +#if _EXISTS(SPI_CHAN_EEPROM1) + REPORT_NAME_DIGITAL(__LINE__, SPI_CHAN_EEPROM1) #endif -#if defined(SPI_EEPROM1_CS) && SPI_EEPROM1_CS >= 0 - REPORT_NAME_DIGITAL(SPI_EEPROM1_CS, __LINE__ ) +#if _EXISTS(SPI_EEPROM) + REPORT_NAME_DIGITAL(__LINE__, SPI_EEPROM) #endif -#if defined(SPI_EEPROM2_CS) && SPI_EEPROM2_CS >= 0 - REPORT_NAME_DIGITAL(SPI_EEPROM2_CS, __LINE__ ) +#if _EXISTS(SPI_EEPROM1_CS) + REPORT_NAME_DIGITAL(__LINE__, SPI_EEPROM1_CS) #endif -#if defined(SPI_FLASH_CS) && SPI_FLASH_CS >= 0 - REPORT_NAME_DIGITAL(SPI_FLASH_CS, __LINE__ ) +#if _EXISTS(SPI_EEPROM2_CS) + REPORT_NAME_DIGITAL(__LINE__, SPI_EEPROM2_CS) +#endif +#if _EXISTS(SPI_FLASH_CS) + REPORT_NAME_DIGITAL(__LINE__, SPI_FLASH_CS) #endif #if PIN_EXISTS(SPINDLE_DIR) - REPORT_NAME_DIGITAL(SPINDLE_DIR_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SPINDLE_DIR_PIN) #endif #if PIN_EXISTS(SPINDLE_ENABLE) - REPORT_NAME_DIGITAL(SPINDLE_ENABLE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SPINDLE_ENABLE_PIN) #endif #if PIN_EXISTS(SPINDLE_LASER_ENABLE) - REPORT_NAME_DIGITAL(SPINDLE_LASER_ENABLE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SPINDLE_LASER_ENABLE_PIN) #endif #if PIN_EXISTS(SPINDLE_LASER_PWM) - REPORT_NAME_DIGITAL(SPINDLE_LASER_PWM_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SPINDLE_LASER_PWM_PIN) #endif #if PIN_EXISTS(SR_CLK) - REPORT_NAME_DIGITAL(SR_CLK_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SR_CLK_PIN) #endif #if PIN_EXISTS(SR_DATA) - REPORT_NAME_DIGITAL(SR_DATA_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SR_DATA_PIN) #endif #if PIN_EXISTS(SR_STROBE) - REPORT_NAME_DIGITAL(SR_STROBE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SR_STROBE_PIN) +#endif +#if PIN_EXISTS(SS) + REPORT_NAME_DIGITAL(__LINE__, SS_PIN) #endif #if PIN_EXISTS(STAT_LED_BLUE) - REPORT_NAME_DIGITAL(STAT_LED_BLUE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, STAT_LED_BLUE_PIN) #endif -#if defined(STAT_LED_RED_LED) && STAT_LED_RED_LED >= 0 - REPORT_NAME_DIGITAL(STAT_LED_RED_LED, __LINE__ ) +#if _EXISTS(STAT_LED_RED_LED) + REPORT_NAME_DIGITAL(__LINE__, STAT_LED_RED_LED) #endif #if PIN_EXISTS(STAT_LED_RED) - REPORT_NAME_DIGITAL(STAT_LED_RED_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, STAT_LED_RED_PIN) #endif #if PIN_EXISTS(STEPPER_RESET) - REPORT_NAME_DIGITAL(STEPPER_RESET_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, STEPPER_RESET_PIN) #endif #if PIN_EXISTS(SUICIDE) - REPORT_NAME_DIGITAL(SUICIDE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, SUICIDE_PIN) #endif -#if defined(THERMO_CS1) && THERMO_CS1 >= 0 - REPORT_NAME_DIGITAL(THERMO_CS1, __LINE__ ) +#if _EXISTS(THERMO_CS1) + REPORT_NAME_DIGITAL(__LINE__, THERMO_CS1) #endif -#if defined(THERMO_CS2) && THERMO_CS2 >= 0 - REPORT_NAME_DIGITAL(THERMO_CS2, __LINE__ ) +#if _EXISTS(THERMO_CS2) + REPORT_NAME_DIGITAL(__LINE__, THERMO_CS2) #endif -#if PIN_EXISTS(THERMO_DO) - REPORT_NAME_DIGITAL(THERMO_DO_PIN, __LINE__ ) +#if _EXISTS_ANALOG(TC1) + REPORT_NAME_ANALOG(__LINE__, TC1) #endif -#if PIN_EXISTS(THERMO_SCK) - REPORT_NAME_DIGITAL(THERMO_SCK_PIN, __LINE__ ) +#if _EXISTS_ANALOG(TC2) + REPORT_NAME_ANALOG(__LINE__, TC2) #endif -#if defined(TLC_BLANK_BIT) && TLC_BLANK_BIT >= 0 - REPORT_NAME_DIGITAL(TLC_BLANK_BIT, __LINE__ ) +#if PIN_EXISTS_ANALOG(TEMP_0) + REPORT_NAME_ANALOG(__LINE__, TEMP_0_PIN) #endif -#if PIN_EXISTS(TLC_BLANK) - REPORT_NAME_DIGITAL(TLC_BLANK_PIN, __LINE__ ) +#if PIN_EXISTS_ANALOG(TEMP_1) + REPORT_NAME_ANALOG(__LINE__, TEMP_1_PIN) #endif -#if defined(TLC_BLANK_PORT) && TLC_BLANK_PORT >= 0 - REPORT_NAME_DIGITAL(TLC_BLANK_PORT, __LINE__ ) +#if PIN_EXISTS_ANALOG(TEMP_2) + REPORT_NAME_ANALOG(__LINE__, TEMP_2_PIN) #endif -#if defined(TLC_CLOCK_BIT) && TLC_CLOCK_BIT >= 0 - REPORT_NAME_DIGITAL(TLC_CLOCK_BIT, __LINE__ ) +#if PIN_EXISTS_ANALOG(TEMP_3) + REPORT_NAME_ANALOG(__LINE__, TEMP_3_PIN) #endif -#if PIN_EXISTS(TLC_CLOCK) - REPORT_NAME_DIGITAL(TLC_CLOCK_PIN, __LINE__ ) +#if PIN_EXISTS_ANALOG(TEMP_4) + REPORT_NAME_ANALOG(__LINE__, TEMP_4_PIN) #endif -#if defined(TLC_CLOCK_PORT) && TLC_CLOCK_PORT >= 0 - REPORT_NAME_DIGITAL(TLC_CLOCK_PORT, __LINE__ ) +#if PIN_EXISTS_ANALOG(TEMP_BED) + REPORT_NAME_ANALOG(__LINE__, TEMP_BED_PIN) #endif -#if defined(TLC_DATA_BIT) && TLC_DATA_BIT >= 0 - REPORT_NAME_DIGITAL(TLC_DATA_BIT, __LINE__ ) +#if PIN_EXISTS_ANALOG(TEMP_CHAMBER) + REPORT_NAME_ANALOG(__LINE__, TEMP_CHAMBER_PIN) #endif -#if PIN_EXISTS(TLC_DATA) - REPORT_NAME_DIGITAL(TLC_DATA_PIN, __LINE__ ) +#if PIN_EXISTS_ANALOG(TEMP_X) + REPORT_NAME_ANALOG(__LINE__, TEMP_X_PIN) #endif -#if defined(TLC_DATA_PORT) && TLC_DATA_PORT >= 0 - REPORT_NAME_DIGITAL(TLC_DATA_PORT, __LINE__ ) +#if PIN_EXISTS(THERMO_DO) + REPORT_NAME_DIGITAL(__LINE__, THERMO_DO_PIN) #endif -#if defined(TLC_XLAT_BIT) && TLC_XLAT_BIT >= 0 - REPORT_NAME_DIGITAL(TLC_XLAT_BIT, __LINE__ ) +#if PIN_EXISTS(THERMO_SCK) + REPORT_NAME_DIGITAL(__LINE__, THERMO_SCK_PIN) #endif -#if PIN_EXISTS(TLC_XLAT) - REPORT_NAME_DIGITAL(TLC_XLAT_PIN, __LINE__ ) +#if PIN_EXISTS(TLC_BLANK) + REPORT_NAME_DIGITAL(__LINE__, TLC_BLANK_PIN) +#endif +#if PIN_EXISTS(TLC_CLOCK) + REPORT_NAME_DIGITAL(__LINE__, TLC_CLOCK_PIN) +#endif +#if PIN_EXISTS(TLC_DATA) + REPORT_NAME_DIGITAL(__LINE__, TLC_DATA_PIN) #endif -#if defined(TLC_XLAT_PORT) && TLC_XLAT_PORT >= 0 - REPORT_NAME_DIGITAL(TLC_XLAT_PORT, __LINE__ ) +#if PIN_EXISTS(TLC_XLAT) + REPORT_NAME_DIGITAL(__LINE__, TLC_XLAT_PIN) #endif #if PIN_EXISTS(TOOL_0) - REPORT_NAME_DIGITAL(TOOL_0_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, TOOL_0_PIN) #endif #if PIN_EXISTS(TOOL_0_PWM) - REPORT_NAME_DIGITAL(TOOL_0_PWM_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, TOOL_0_PWM_PIN) #endif #if PIN_EXISTS(TOOL_1) - REPORT_NAME_DIGITAL(TOOL_1_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, TOOL_1_PIN) #endif #if PIN_EXISTS(TOOL_1_PWM) - REPORT_NAME_DIGITAL(TOOL_1_PWM_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, TOOL_1_PWM_PIN) #endif #if PIN_EXISTS(TOOL_2) - REPORT_NAME_DIGITAL(TOOL_2_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, TOOL_2_PIN) #endif #if PIN_EXISTS(TOOL_2_PWM) - REPORT_NAME_DIGITAL(TOOL_2_PWM_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, TOOL_2_PWM_PIN) #endif #if PIN_EXISTS(TOOL_3) - REPORT_NAME_DIGITAL(TOOL_3_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, TOOL_3_PIN) #endif #if PIN_EXISTS(TOOL_3_PWM) - REPORT_NAME_DIGITAL(TOOL_3_PWM_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, TOOL_3_PWM_PIN) #endif #if PIN_EXISTS(TOOL_PWM) - REPORT_NAME_DIGITAL(TOOL_PWM_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, TOOL_PWM_PIN) #endif #if PIN_EXISTS(TX_ENABLE) - REPORT_NAME_DIGITAL(TX_ENABLE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, TX_ENABLE_PIN) #endif -#if defined(UI1) && UI1 >= 0 - REPORT_NAME_DIGITAL(UI1, __LINE__ ) +#if _EXISTS(UI1) + REPORT_NAME_DIGITAL(__LINE__, UI1) #endif -#if defined(UI2) && UI2 >= 0 - REPORT_NAME_DIGITAL(UI2, __LINE__ ) +#if _EXISTS(UI2) + REPORT_NAME_DIGITAL(__LINE__, UI2) #endif -#if defined(UNUSED_PWM) && UNUSED_PWM >= 0 - REPORT_NAME_DIGITAL(UNUSED_PWM, __LINE__ ) +#if _EXISTS(UNUSED_PWM) + REPORT_NAME_DIGITAL(__LINE__, UNUSED_PWM) #endif #if PIN_EXISTS(X_ATT) - REPORT_NAME_DIGITAL(X_ATT_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, X_ATT_PIN) #endif #if PIN_EXISTS(X_CS) - REPORT_NAME_DIGITAL(X_CS_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, X_CS_PIN) #endif #if PIN_EXISTS(X_DIR) - REPORT_NAME_DIGITAL(X_DIR_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, X_DIR_PIN) #endif #if PIN_EXISTS(X_ENABLE) - REPORT_NAME_DIGITAL(X_ENABLE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, X_ENABLE_PIN) #endif #if PIN_EXISTS(X_MAX) - REPORT_NAME_DIGITAL(X_MAX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, X_MAX_PIN) #endif #if PIN_EXISTS(X_MIN) - REPORT_NAME_DIGITAL(X_MIN_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, X_MIN_PIN) #endif #if PIN_EXISTS(X_MS1) - REPORT_NAME_DIGITAL(X_MS1_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, X_MS1_PIN) #endif #if PIN_EXISTS(X_MS2) - REPORT_NAME_DIGITAL(X_MS2_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, X_MS2_PIN) #endif #if PIN_EXISTS(X_STEP) - REPORT_NAME_DIGITAL(X_STEP_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, X_STEP_PIN) #endif #if PIN_EXISTS(X_STOP) - REPORT_NAME_DIGITAL(X_STOP_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, X_STOP_PIN) +#endif +#if PIN_EXISTS(X2_DIR) + REPORT_NAME_DIGITAL(__LINE__, X2_DIR_PIN) +#endif +#if PIN_EXISTS(X2_ENABLE) + REPORT_NAME_DIGITAL(__LINE__, X2_ENABLE_PIN) +#endif +#if PIN_EXISTS(X2_STEP) + REPORT_NAME_DIGITAL(__LINE__, X2_STEP_PIN) #endif #if PIN_EXISTS(Y_ATT) - REPORT_NAME_DIGITAL(Y_ATT_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Y_ATT_PIN) #endif #if PIN_EXISTS(Y_CS) - REPORT_NAME_DIGITAL(Y_CS_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Y_CS_PIN) #endif #if PIN_EXISTS(Y_DIR) - REPORT_NAME_DIGITAL(Y_DIR_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Y_DIR_PIN) #endif #if PIN_EXISTS(Y_ENABLE) - REPORT_NAME_DIGITAL(Y_ENABLE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Y_ENABLE_PIN) #endif #if PIN_EXISTS(Y_MAX) - REPORT_NAME_DIGITAL(Y_MAX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Y_MAX_PIN) #endif #if PIN_EXISTS(Y_MIN) - REPORT_NAME_DIGITAL(Y_MIN_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Y_MIN_PIN) #endif #if PIN_EXISTS(Y_MS1) - REPORT_NAME_DIGITAL(Y_MS1_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Y_MS1_PIN) #endif #if PIN_EXISTS(Y_MS2) - REPORT_NAME_DIGITAL(Y_MS2_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Y_MS2_PIN) #endif #if PIN_EXISTS(Y_STEP) - REPORT_NAME_DIGITAL(Y_STEP_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Y_STEP_PIN) #endif #if PIN_EXISTS(Y_STOP) - REPORT_NAME_DIGITAL(Y_STOP_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Y_STOP_PIN) +#endif +#if PIN_EXISTS(Y2_DIR) + REPORT_NAME_DIGITAL(__LINE__, Y2_DIR_PIN) +#endif +#if PIN_EXISTS(Y2_ENABLE) + REPORT_NAME_DIGITAL(__LINE__, Y2_ENABLE_PIN) +#endif +#if PIN_EXISTS(Y2_STEP) + REPORT_NAME_DIGITAL(__LINE__, Y2_STEP_PIN) #endif #if PIN_EXISTS(Z_ATT) - REPORT_NAME_DIGITAL(Z_ATT_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z_ATT_PIN) #endif #if PIN_EXISTS(Z_CS) - REPORT_NAME_DIGITAL(Z_CS_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z_CS_PIN) #endif #if PIN_EXISTS(Z_DIR) - REPORT_NAME_DIGITAL(Z_DIR_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z_DIR_PIN) #endif #if PIN_EXISTS(Z_ENABLE) - REPORT_NAME_DIGITAL(Z_ENABLE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z_ENABLE_PIN) #endif #if PIN_EXISTS(Z_MAX) - REPORT_NAME_DIGITAL(Z_MAX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z_MAX_PIN) #endif #if PIN_EXISTS(Z_MIN) - REPORT_NAME_DIGITAL(Z_MIN_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z_MIN_PIN) #endif #if PIN_EXISTS(Z_MIN_PROBE) - REPORT_NAME_DIGITAL(Z_MIN_PROBE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z_MIN_PROBE_PIN) #endif #if PIN_EXISTS(Z_MS1) - REPORT_NAME_DIGITAL(Z_MS1_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z_MS1_PIN) #endif #if PIN_EXISTS(Z_MS2) - REPORT_NAME_DIGITAL(Z_MS2_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z_MS2_PIN) #endif -#if defined(Z_probe_pin) && Z_probe_pin >= 0 - REPORT_NAME_DIGITAL(Z_probe_pin, __LINE__ ) +#if PIN_EXISTS(Z_PROBE) + REPORT_NAME_DIGITAL(__LINE__, Z_PROBE_PIN) #endif #if PIN_EXISTS(Z_STEP) - REPORT_NAME_DIGITAL(Z_STEP_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z_STEP_PIN) #endif #if PIN_EXISTS(Z_STOP) - REPORT_NAME_DIGITAL(Z_STOP_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z_STOP_PIN) #endif #if PIN_EXISTS(Z2_CS) - REPORT_NAME_DIGITAL(Z2_CS_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z2_CS_PIN) #endif #if PIN_EXISTS(Z2_DIR) - REPORT_NAME_DIGITAL(Z2_DIR_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z2_DIR_PIN) #endif #if PIN_EXISTS(Z2_ENABLE) - REPORT_NAME_DIGITAL(Z2_ENABLE_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z2_ENABLE_PIN) #endif #if PIN_EXISTS(Z2_MS1) - REPORT_NAME_DIGITAL(Z2_MS1_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z2_MS1_PIN) #endif #if PIN_EXISTS(Z2_MS2) - REPORT_NAME_DIGITAL(Z2_MS2_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z2_MS2_PIN) #endif #if PIN_EXISTS(Z2_MS3) - REPORT_NAME_DIGITAL(Z2_MS3_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z2_MS3_PIN) #endif #if PIN_EXISTS(Z2_STEP) - REPORT_NAME_DIGITAL(Z2_STEP_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z2_STEP_PIN) #endif #if PIN_EXISTS(ZRIB_V20_D6) - REPORT_NAME_DIGITAL(ZRIB_V20_D6_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, ZRIB_V20_D6_PIN) #endif #if PIN_EXISTS(ZRIB_V20_D9) - REPORT_NAME_DIGITAL(ZRIB_V20_D9_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, ZRIB_V20_D9_PIN) #endif #if PIN_EXISTS(X_SERIAL_TX) - REPORT_NAME_DIGITAL(X_SERIAL_TX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, X_SERIAL_TX_PIN) #endif #if PIN_EXISTS(X_SERIAL_RX) - REPORT_NAME_DIGITAL(X_SERIAL_RX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, X_SERIAL_RX_PIN) #endif #if PIN_EXISTS(X2_SERIAL_TX) - REPORT_NAME_DIGITAL(X2_SERIAL_TX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, X2_SERIAL_TX_PIN) #endif #if PIN_EXISTS(X2_SERIAL_RX) - REPORT_NAME_DIGITAL(X2_SERIAL_RX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, X2_SERIAL_RX_PIN) #endif #if PIN_EXISTS(Y_SERIAL_TX) - REPORT_NAME_DIGITAL(Y_SERIAL_TX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Y_SERIAL_TX_PIN) #endif #if PIN_EXISTS(Y_SERIAL_RX) - REPORT_NAME_DIGITAL(Y_SERIAL_RX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Y_SERIAL_RX_PIN) #endif #if PIN_EXISTS(Y2_SERIAL_TX) - REPORT_NAME_DIGITAL(Y2_SERIAL_TX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Y2_SERIAL_TX_PIN) #endif #if PIN_EXISTS(Y2_SERIAL_RX) - REPORT_NAME_DIGITAL(Y2_SERIAL_RX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Y2_SERIAL_RX_PIN) #endif #if PIN_EXISTS(Z_SERIAL_TX) - REPORT_NAME_DIGITAL(Z_SERIAL_TX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z_SERIAL_TX_PIN) #endif #if PIN_EXISTS(Z_SERIAL_RX) - REPORT_NAME_DIGITAL(Z_SERIAL_RX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z_SERIAL_RX_PIN) #endif #if PIN_EXISTS(Z2_SERIAL_TX) - REPORT_NAME_DIGITAL(Z2_SERIAL_TX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z2_SERIAL_TX_PIN) #endif #if PIN_EXISTS(Z2_SERIAL_RX) - REPORT_NAME_DIGITAL(Z2_SERIAL_RX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, Z2_SERIAL_RX_PIN) #endif #if PIN_EXISTS(E0_SERIAL_TX) - REPORT_NAME_DIGITAL(E0_SERIAL_TX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E0_SERIAL_TX_PIN) #endif #if PIN_EXISTS(E0_SERIAL_RX) - REPORT_NAME_DIGITAL(E0_SERIAL_RX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E0_SERIAL_RX_PIN) #endif #if PIN_EXISTS(E1_SERIAL_TX) - REPORT_NAME_DIGITAL(E1_SERIAL_TX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E1_SERIAL_TX_PIN) #endif #if PIN_EXISTS(E1_SERIAL_RX) - REPORT_NAME_DIGITAL(E1_SERIAL_RX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E1_SERIAL_RX_PIN) #endif #if PIN_EXISTS(E2_SERIAL_TX) - REPORT_NAME_DIGITAL(E2_SERIAL_TX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E2_SERIAL_TX_PIN) #endif #if PIN_EXISTS(E2_SERIAL_RX) - REPORT_NAME_DIGITAL(E2_SERIAL_RX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E2_SERIAL_RX_PIN) #endif #if PIN_EXISTS(E3_SERIAL_TX) - REPORT_NAME_DIGITAL(E3_SERIAL_TX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E3_SERIAL_TX_PIN) #endif #if PIN_EXISTS(E3_SERIAL_RX) - REPORT_NAME_DIGITAL(E3_SERIAL_RX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E3_SERIAL_RX_PIN) #endif #if PIN_EXISTS(E4_SERIAL_TX) - REPORT_NAME_DIGITAL(E4_SERIAL_TX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E4_SERIAL_TX_PIN) #endif #if PIN_EXISTS(E4_SERIAL_RX) - REPORT_NAME_DIGITAL(E4_SERIAL_RX_PIN, __LINE__ ) + REPORT_NAME_DIGITAL(__LINE__, E4_SERIAL_RX_PIN) #endif From 24eb275b99bf8d31c2ae5d89c9e0cc7d0f0c5edb Mon Sep 17 00:00:00 2001 From: Marcio Teixeira Date: Wed, 14 Feb 2018 14:43:54 -0700 Subject: [PATCH 45/46] Added a light-weight status screen for the ST7920 - The status screen uses the ST7920 character generator to greatly reduce SPI traffic and MCU load when updating the status screen. - Has been tested with the RepRapDiscount Full Graphics Smart Controller but should work with any LCD that uses an ST7920 or fully compatible controller. --- Marlin/Configuration.h | 11 + Marlin/src/config/default/Configuration.h | 11 + .../AliExpress/CL-260/Configuration.h | 11 + .../config/examples/Anet/A6/Configuration.h | 11 +- .../config/examples/Anet/A8/Configuration.h | 13 + .../BIBO/TouchX/cyclops/Configuration.h | 11 + .../BIBO/TouchX/default/Configuration.h | 11 + .../FolgerTech/i3-2020/Configuration.h | 11 + .../examples/Infitary/i3-M508/Configuration.h | 11 + .../examples/JGAurora/A5/Configuration.h | 11 + .../config/examples/RigidBot/Configuration.h | 12 + .../config/examples/STM32F10/Configuration.h | 11 + .../examples/Sanguinololu/Configuration.h | 11 + .../config/examples/Tronxy/X1/Configuration.h | 11 + .../examples/Tronxy/X5S/Configuration.h | 11 + .../examples/Velleman/K8200/Configuration.h | 11 + .../examples/Velleman/K8400/Configuration.h | 11 + .../Velleman/K8400/Dual-head/Configuration.h | 11 + .../delta/kossel_mini/Configuration.h | 11 + .../examples/gCreate/gMax1.5+/Configuration.h | 11 + .../config/examples/makibox/Configuration.h | 11 + .../ultralcd_impl_st7920_lite_status_screen.h | 247 ++++++ ...alcd_impl_st7920_lite_status_screen_impl.h | 757 ++++++++++++++++++ ..._impl_st7920_lite_status_screen_impl_spi.h | 39 + .../dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp | 16 +- Marlin/src/lcd/ultralcd.cpp | 46 +- Marlin/src/lcd/ultralcd_impl_DOGM.h | 10 + 27 files changed, 1331 insertions(+), 18 deletions(-) create mode 100644 Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen.h create mode 100644 Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen_impl.h create mode 100644 Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen_impl_spi.h diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 906765503..126fdc089 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1513,7 +1513,18 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h index 906765503..126fdc089 100644 --- a/Marlin/src/config/default/Configuration.h +++ b/Marlin/src/config/default/Configuration.h @@ -1513,7 +1513,18 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h index 629a2373a..56ae68867 100644 --- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h +++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h @@ -1513,7 +1513,18 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h index 2a4365b24..e1c3ac694 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration.h @@ -1661,9 +1661,18 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// Note: Details on connecting to the Anet V1.0 controller are in the file pins_ANET_10.h +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. // +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h index 21f94a4ae..b303b158f 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration.h @@ -1516,6 +1516,7 @@ // //#define G3D_PANEL + // // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller @@ -1524,6 +1525,18 @@ // //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 + // // MakerLab Mini Panel with graphic // controller and SD support - http://reprap.org/wiki/Mini_panel diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h index b8712d93e..0df628236 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h @@ -1513,7 +1513,18 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h index 0c3da3940..ca6c4ca7c 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h @@ -1513,7 +1513,18 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h index 35f1f8585..2848e71fe 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h @@ -1519,7 +1519,18 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h index 555e22fe1..77bd20aa6 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h @@ -1517,7 +1517,18 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration.h b/Marlin/src/config/examples/JGAurora/A5/Configuration.h index 077733ca9..ce0d3e69b 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration.h @@ -1524,7 +1524,18 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h index 376c94977..09d4837c5 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration.h +++ b/Marlin/src/config/examples/RigidBot/Configuration.h @@ -1515,6 +1515,18 @@ // //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 + // // MakerLab Mini Panel with graphic // controller and SD support - http://reprap.org/wiki/Mini_panel diff --git a/Marlin/src/config/examples/STM32F10/Configuration.h b/Marlin/src/config/examples/STM32F10/Configuration.h index affc79667..04282211b 100644 --- a/Marlin/src/config/examples/STM32F10/Configuration.h +++ b/Marlin/src/config/examples/STM32F10/Configuration.h @@ -1516,7 +1516,18 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h index 239cf8d65..40d6d4c9f 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h @@ -1544,7 +1544,18 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/Tronxy/X1/Configuration.h b/Marlin/src/config/examples/Tronxy/X1/Configuration.h index e74543b69..3e6554299 100644 --- a/Marlin/src/config/examples/Tronxy/X1/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X1/Configuration.h @@ -1498,7 +1498,18 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h index 38a6a31d1..aa562a5a5 100644 --- a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h @@ -1513,7 +1513,18 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h index ecc36d717..108ee285e 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h @@ -1546,7 +1546,18 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h index 5e6092b26..7d5038c78 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h @@ -1513,7 +1513,18 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic 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 2e0c436c2..662b1ba1c 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -1507,7 +1507,18 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h index 6ebfebf86..976a2bac4 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -1637,7 +1637,18 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h index 9053afb07..d52ab8a2f 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h @@ -1527,7 +1527,18 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h index d063628ea..6ec77ec43 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -1516,7 +1516,18 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // +// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative +// light-weight status screen will be used that takes advantage of +// the ST7920 character-generator to conserve MCU resources. +// +// Since the lightweight status screen can only show a status +// message or the position, but not both, set DELAY_TO_SHOW_POSITION +// to the number of seconds until the position is revealed after a new +// status message is drawn. + //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +//#define USE_ST7920_LIGHTWEIGHT_UI +//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen.h b/Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen.h new file mode 100644 index 000000000..dd3c71a1e --- /dev/null +++ b/Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen.h @@ -0,0 +1,247 @@ +/* + * Lightweight Status Screen for the RepRapDiscount Full + * Graphics Smart Controller (ST7920-based 128x64 LCD) + * + * (c) 2017 Aleph Objects, Inc. + * + * The code in this page is free software: you can + * redistribute it and/or modify it under the terms of the GNU + * General Public License (GNU GPL) as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) + * any later version. The code is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. + * + */ + +#ifndef ULTRALCD_ST7920_LITE_STATUS_H +#define ULTRALCD_ST7920_LITE_STATUS_H + +class ST7920_Lite_Status_Screen { + private: + static struct st7920_state_t { + uint8_t synced : 1; // Whether a sync has been sent + uint8_t cmd : 1; // Whether the sync was cmd or data + uint8_t extended : 1; + uint8_t graphics : 1; + uint8_t sa : 1; + } current_bits; + + static void cs(); + static void ncs(); + static void sync_cmd(); + static void sync_dat(); + static void write_byte(uint8_t w); + + static void cmd(uint8_t cmd); + static void begin_data(); + static void write_word(uint16_t w); + static void write_str(const char *str); + static void write_str(const char *str, uint8_t len); + static void write_str_P(const char *str); + static void write_str(progmem_str str); + static void write_number(uint8_t value, uint8_t digits=3); + + static void _extended_function_set(bool extended, bool graphics); + static void _scroll_or_addr_select(bool sa); + static void reset_state_from_unknown(); + + static void home(); + static void display_status(bool display_on, bool cursor_on, bool blink_on); + static void extended_function_set(bool extended); + static void graphics(bool graphics); + static void entry_mode_select(bool ac_increase, bool shift); + static void scroll_or_addr_select(bool sa); + static void set_ddram_address(uint8_t addr); + static void set_cgram_address(uint8_t addr); + static void set_gdram_address(uint8_t x, uint8_t y); + + static void clear(); + static void clear_ddram(); + static void clear_gdram(); + + static void load_cgram_icon(uint16_t addr, const void *data); + static void draw_gdram_icon(uint8_t x, uint8_t y, const void *data); + + static uint8_t string_checksum(const char *str); + + protected: + static void draw_static_elements(); + static void draw_progress_bar(uint8_t value); + static void draw_fan_icon(bool whichIcon); + static void draw_heat_icon(bool whichIcon, bool heating); + static void draw_extruder_1_temp(uint8_t temp, uint8_t target); + static void draw_extruder_2_temp(uint8_t temp, uint8_t target); + static void draw_bed_temp(uint8_t temp, uint8_t target); + static void draw_fan_speed(uint8_t value); + static void draw_print_time(uint32_t elapsed); + static void draw_feedrate_percentage(uint8_t percentage); + static void draw_status_message(const char *str); + static void draw_position(const float x, const float y, const float z, bool position_known = true); + + static bool indicators_changed(); + static bool position_changed(); + static bool blink_changed(); + static bool status_changed(); + + static void update_indicators(bool forceUpdate); + static void update_position(bool forceUpdate, bool resetChecksum); + static void update_status_or_position(bool forceUpdate); + static void update_progress(bool forceUpdate); + + public: + static void update(bool forceUpdate); + static void on_entry(); + static void on_exit(); + static void clear_text_buffer(); +}; + +/************************** ICON DEFINITIONS *************************************/ + +#define CGRAM_ICON_1_ADDR 0x00 +#define CGRAM_ICON_2_ADDR 0x10 +#define CGRAM_ICON_3_ADDR 0x20 +#define CGRAM_ICON_4_ADDR 0x30 + +#define CGRAM_ICON_1_WORD 0x00 +#define CGRAM_ICON_2_WORD 0x02 +#define CGRAM_ICON_3_WORD 0x04 +#define CGRAM_ICON_4_WORD 0x06 + +PROGMEM const uint16_t nozzle_icon[] = { + 0b0000000000000000, + 0b0000000000000000, + 0b0000111111110000, + 0b0001111111111000, + 0b0001111111111000, + 0b0001111111111000, + 0b0000111111110000, + 0b0000111111110000, + 0b0001111111111000, + 0b0001111111111000, + 0b0001111111111000, + 0b0000011111100000, + 0b0000001111000000, + 0b0000000110000000, + 0b0000000000000000, + 0b0000000000000000 +}; + +PROGMEM const uint16_t bed_icon[] = { + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0111111111111110, + 0b0111111111111110, + 0b0000000000000000, + 0b0000000000000000 +}; + +PROGMEM const uint16_t heat1_icon[] = { + 0b0000000000000000, + 0b0000000000000000, + 0b0010001000100000, + 0b0001000100010000, + 0b0000100010001000, + 0b0000100010001000, + 0b0001000100010000, + 0b0010001000100000, + 0b0010001000100000, + 0b0001000100010000, + 0b0000100010001000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000 +}; + +PROGMEM const uint16_t heat2_icon[] = { + 0b0000000000000000, + 0b0000000000000000, + 0b0000100010001000, + 0b0000100010001000, + 0b0001000100010000, + 0b0010001000100000, + 0b0010001000100000, + 0b0001000100010000, + 0b0000100010001000, + 0b0000100010001000, + 0b0001000100010000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000 +}; + +PROGMEM const uint16_t fan1_icon[] = { + 0b0000000000000000, + 0b0111111111111110, + 0b0111000000001110, + 0b0110001111000110, + 0b0100001111000010, + 0b0100000110000010, + 0b0101100000011010, + 0b0101110110111010, + 0b0101100000011010, + 0b0100000110000010, + 0b0100001111000010, + 0b0110001111000110, + 0b0111000000001110, + 0b0111111111111110, + 0b0000000000000000, + 0b0000000000000000 +}; + +PROGMEM const uint16_t fan2_icon[] = { + 0b0000000000000000, + 0b0111111111111110, + 0b0111000000001110, + 0b0110010000100110, + 0b0100111001110010, + 0b0101111001111010, + 0b0100110000110010, + 0b0100000110000010, + 0b0100110000110010, + 0b0101111001111010, + 0b0100111001110010, + 0b0110010000100110, + 0b0111000000001110, + 0b0111111111111110, + 0b0000000000000000, + 0b0000000000000000 +}; + +PROGMEM const uint16_t feedrate_icon[] = { + 0b0000000000000000, + 0b0111111000000000, + 0b0100000000000000, + 0b0100000000000000, + 0b0100000000000000, + 0b0111111011111000, + 0b0100000010000100, + 0b0100000010000100, + 0b0100000010000100, + 0b0100000011111000, + 0b0000000010001000, + 0b0000000010000100, + 0b0000000010000100, + 0b0000000010000010, + 0b0000000000000000, + 0b0000000000000000 +}; + +static void lcd_implementation_status_screen(); +static void lcd_in_status(bool inStatus); + +#endif // ULTRALCD_ST7920_LITE_STATUS_H \ No newline at end of file diff --git a/Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen_impl.h b/Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen_impl.h new file mode 100644 index 000000000..db66fc12f --- /dev/null +++ b/Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen_impl.h @@ -0,0 +1,757 @@ +/* + * Lightweight Status Screen for the RepRapDiscount Full + * Graphics Smart Controller (ST7920-based 128x64 LCD) + * + * (c) 2017 Aleph Objects, Inc. + * + * The code in this page is free software: you can + * redistribute it and/or modify it under the terms of the GNU + * General Public License (GNU GPL) as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) + * any later version. The code is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. + * + */ + + /* This is an implementation of a status screen for the RepRapDiscount + * Full Graphics Smart Controller using native ST7920 commands rather + * than using U8Glib. + * + * This alternative status screen makes use of the built-in character + * generation capabilities of the ST7920 to update the status screen + * with less SPI traffic and CPU use. In particular: + * + * - The fan and bed animations are handled using custom characters + * that are stored in CGRAM. This allows for the animation to be + * updated by writing a single character to the text-buffer (DDRAM). + * + * - All the information in the status screen is text that is written + * to DDRAM, so the work of generating the bitmaps is offloaded to + * the ST7920 rather than being render by U8Glib on the MCU. + * + * - The graphics buffer (GDRAM) is only used for static graphics + * elements (nozzle and feedrate bitmaps) and for the progress + * bar, so updates are sporadic. + */ + +#include "../../libs/duration_t.h" + +typedef const __FlashStringHelper *progmem_str; + +#include "ultralcd_impl_st7920_lite_status_screen.h" + +#define BUFFER_WIDTH 256 +#define BUFFER_HEIGHT 32 + +#define DDRAM_LINE_1 0x00 +#define DDRAM_LINE_2 0x10 +#define DDRAM_LINE_3 0x08 +#define DDRAM_LINE_4 0x18 + +ST7920_Lite_Status_Screen::st7920_state_t ST7920_Lite_Status_Screen::current_bits; + +void ST7920_Lite_Status_Screen::cmd(uint8_t cmd) { + if(!current_bits.synced || !current_bits.cmd) { + current_bits.synced = true; + current_bits.cmd = true; + sync_cmd(); + } + write_byte(cmd); +} + +void ST7920_Lite_Status_Screen::begin_data() { + extended_function_set(false); + if(!current_bits.synced || current_bits.cmd) { + current_bits.synced = true; + current_bits.cmd = false; + sync_dat(); + } +} + +void ST7920_Lite_Status_Screen::write_word(uint16_t w) { + write_byte((w >> 8) & 0xFF); + write_byte((w >> 0) & 0xFF); +} + +void ST7920_Lite_Status_Screen::write_str(const char *str) { + while(*str) { + write_byte(*str++); + } +} + +void ST7920_Lite_Status_Screen::write_str(const char *str, uint8_t len) { + while(*str && len--) { + write_byte(*str++); + } +} + +void ST7920_Lite_Status_Screen::write_str_P(const char *str) { + const char *p_str = (const char *)str; + char c = pgm_read_byte_near(p_str++); + while(c) { + write_byte(c); + c = pgm_read_byte_near(p_str++); + } +} + +void ST7920_Lite_Status_Screen::write_str(progmem_str str) { + write_str_P((const char*)str); +} + +void ST7920_Lite_Status_Screen::write_number(uint8_t value, uint8_t digits) { + char str[7]; + const char *fmt; + switch(digits) { + case 6: fmt = PSTR("%6d"); break; + case 5: fmt = PSTR("%5d"); break; + case 4: fmt = PSTR("%4d"); break; + case 3: fmt = PSTR("%3d"); break; + case 2: fmt = PSTR("%2d"); break; + case 1: fmt = PSTR("%1d"); break; + } + sprintf_P(str,fmt,value); + write_str(str); +} + +void ST7920_Lite_Status_Screen::display_status(bool display_on, bool cursor_on, bool blink_on) { + extended_function_set(false); + cmd(0b00001000 | + (display_on ? 0b0100 : 0) | + (cursor_on ? 0b0010 : 0) | + (blink_on ? 0b0001 : 0) + ); +} + +// Sets the extended and graphics bits simultaneously, regardless of +// the current state. This is a helper function for extended_function_set() +// and graphics() +void ST7920_Lite_Status_Screen::_extended_function_set(bool extended, bool graphics) { + cmd( 0b00100000 | + (extended ? 0b00000100 : 0) | + (graphics ? 0b00000010 : 0) + ); + current_bits.extended = extended; + current_bits.graphics = graphics; +} + +void ST7920_Lite_Status_Screen::extended_function_set(bool extended) { + if(extended != current_bits.extended) { + _extended_function_set(extended, current_bits.graphics); + } +} + +void ST7920_Lite_Status_Screen::graphics(bool graphics) { + if(graphics != current_bits.graphics) { + _extended_function_set(current_bits.extended, graphics); + } +} + +void ST7920_Lite_Status_Screen::entry_mode_select(bool ac_increase, bool shift) { + extended_function_set(false); + cmd(0b00000100 | + (ac_increase ? 0b00000010 : 0) | + (shift ? 0b00000001 : 0) + ); +} + +// Sets the sa bit regardless of the current state. This is a helper +// function for scroll_or_addr_select() +void ST7920_Lite_Status_Screen::_scroll_or_addr_select(bool sa) { + extended_function_set(true); + cmd(0b00100010 | + (sa ? 0b000001 : 0) + ); + current_bits.sa = sa; +} + +void ST7920_Lite_Status_Screen::scroll_or_addr_select(bool sa) { + if(sa != current_bits.sa) { + _scroll_or_addr_select(sa); + } +} + +void ST7920_Lite_Status_Screen::set_ddram_address(uint8_t addr) { + extended_function_set(false); + cmd(0b10000000 | (addr & 0b00111111)); +} + +void ST7920_Lite_Status_Screen::set_cgram_address(uint8_t addr) { + extended_function_set(false); + cmd(0b01000000 | (addr & 0b00111111)); +} + +void ST7920_Lite_Status_Screen::set_gdram_address(uint8_t x, uint8_t y) { + extended_function_set(true); + cmd(0b10000000 | (y & 0b01111111)); + cmd(0b10000000 | (x & 0b00001111)); +} + +void ST7920_Lite_Status_Screen::clear() { + extended_function_set(false); + cmd(0x00000001); + delay(15); //delay for CGRAM clear +} + +void ST7920_Lite_Status_Screen::home() { + extended_function_set(false); + cmd(0x00000010); +} + +/* This fills the entire text buffer with spaces */ +void ST7920_Lite_Status_Screen::clear_ddram() +{ + set_ddram_address(DDRAM_LINE_1); + begin_data(); + for(int i=0; i < 64;i++) { + write_byte(' '); + } +} + +/* This fills the entire graphics buffer with zeros */ +void ST7920_Lite_Status_Screen::clear_gdram() +{ + for(int y = 0; y < BUFFER_HEIGHT; y++) { + set_gdram_address(0,y); + begin_data(); + for(int i = 0; i < (BUFFER_WIDTH / 16); i++) { + write_byte(0); + write_byte(0); + } + } +} + +void ST7920_Lite_Status_Screen::load_cgram_icon(uint16_t addr, const void *data) { + const uint16_t *p_word = (const uint16_t *)data; + set_cgram_address(addr); + begin_data(); + for(int i = 0; i < 16; i++) { + uint16_t word = pgm_read_word_near(p_word++); + write_byte((word & 0xFF00) >> 8); + write_byte((word & 0x00FF) >> 0); + } +} + +/* Draws an icon in GDRAM. The position is specified in + as if they were DDRAM coordinates, i.e. the x position + is [1-8], while the y position is [1-4] */ +void ST7920_Lite_Status_Screen::draw_gdram_icon(uint8_t x, uint8_t y, const void *data) { + const uint16_t *p_word = (const uint16_t *)data; + if(y > 2) { + // Handle display folding + y -= 2; + x += 8; + } + x -= 1; + y -= 1; + for(int i = 0; i < 16; i++) { + uint16_t word = pgm_read_word_near(p_word++); + set_gdram_address(x,i+y*16); + begin_data(); + write_byte((word & 0xFF00) >> 8); + write_byte((word & 0x00FF) >> 0); + } +} + +/************************** MAIN SCREEN *************************************/ + +void ST7920_Lite_Status_Screen::draw_static_elements() { + scroll_or_addr_select(0); + + // Load the animated bed and fan icons + load_cgram_icon(CGRAM_ICON_1_ADDR, heat1_icon); + load_cgram_icon(CGRAM_ICON_2_ADDR, heat2_icon); + load_cgram_icon(CGRAM_ICON_3_ADDR, fan1_icon); + load_cgram_icon(CGRAM_ICON_4_ADDR, fan2_icon); + + // Draw the static icons in GDRAM + draw_gdram_icon(1,1,nozzle_icon); + #if EXTRUDERS == 2 + draw_gdram_icon(1,2,nozzle_icon); + #endif + draw_gdram_icon(6,2,feedrate_icon); + draw_gdram_icon(1,2,bed_icon); + + // Draw the initial fan icon + draw_fan_icon(false); +} + +/* Although this is undocumented, the ST7920 allows the character + * data buffer (DDRAM) to be used in conjunction with the graphics + * bitmap buffer (CGRAM). The contents of the graphics buffer is + * XORed with the data from the character generator. This allows + * us to make the progess bar out of graphical data (the bar) and + * text data (the percentage). + */ +void ST7920_Lite_Status_Screen::draw_progress_bar(uint8_t value) { + #if EXTRUDERS == 1 + // If we have only one extruder, draw a long progress bar on the third line + const int top = 1; // Top in pixels + const int bottom = 13; // Bottom in pixels + const int left = 8; // Left edge, in 16-bit words + const int width = 5; // Width of progress bar, in 16-bit words + #else + const int top = 16 + 1; // Top in pixels + const int bottom = 16 + 13; // Bottom in pixels + const int left = 5; // Left edge, in 16-bit words + const int width = 3; // Width of progress bar, in 16-bit words + #endif + const int char_pcnt = 100/width; // How many percent does each 16-bit word represent? + + // Draw the progress bar as a bitmap in CGRAM + + for(int y = top; y <= bottom; y++) { + set_gdram_address(left,y); + begin_data(); + for(int x = 0; x < width; x++) { + uint16_t gfx_word = 0x0000; + if((x+1)*char_pcnt <= value) { + // Draw completely filled bytes + gfx_word = 0xFFFF; + } else if((x*char_pcnt) < value) { + // Draw partially filled bytes + gfx_word = int(0x8000) >> (value % char_pcnt)*16/char_pcnt; + } + // Draw the frame around the progress bar + if(y == top || y == bottom) { + // Draw top/bottom border + gfx_word = 0xFFFF; + } else if (x == (width-1)) { + // Draw right border + gfx_word |= 0x0001; + } else if (x == 0) { + // Draw left border + gfx_word |= 0x8000; + } + write_word(gfx_word); + } + } + + // Draw the percentage as text in DDRAM + + #if EXTRUDERS == 1 + set_ddram_address(DDRAM_LINE_3 + 1); + #else + set_ddram_address(DDRAM_LINE_2 + left); + #endif + + begin_data(); + if(value > 9) { + write_number(value,4); + write_str(F("% ")); + } else { + write_number(value,3); + write_str(F("% ")); + } +} + +void ST7920_Lite_Status_Screen::draw_fan_icon(bool whichIcon) { + set_ddram_address(DDRAM_LINE_1+5); + begin_data(); + write_word(whichIcon ? CGRAM_ICON_3_WORD : CGRAM_ICON_4_WORD); +} + +void ST7920_Lite_Status_Screen::draw_heat_icon(bool whichIcon, bool heating) { + #if EXTRUDERS == 1 + set_ddram_address(DDRAM_LINE_2); + #else + set_ddram_address(DDRAM_LINE_3); + #endif + begin_data(); + if(heating) { + write_word(whichIcon ? CGRAM_ICON_1_WORD : CGRAM_ICON_2_WORD); + } else { + write_byte(' '); + write_byte(' '); + } +} + +#define FAR(a,b) (((a > b) ? (a-b) : (b-a)) > 1) + +void ST7920_Lite_Status_Screen::draw_extruder_1_temp(uint8_t temp, uint8_t target) { + set_ddram_address(DDRAM_LINE_1+1); + begin_data(); + write_number(temp); + if(target && FAR(temp, target)) { + write_str(F("\x1A")); + write_number(target); + } else { + write_str(F(" ")); + } +} + +void ST7920_Lite_Status_Screen::draw_extruder_2_temp(uint8_t temp, uint8_t target) { + set_ddram_address(DDRAM_LINE_2+1); + begin_data(); + write_number(temp); + if(target && FAR(temp, target)) { + write_str(F("\x1A")); + write_number(target); + } else { + write_str(F(" ")); + } +} + +void ST7920_Lite_Status_Screen::draw_bed_temp(uint8_t temp, uint8_t target) { + #if EXTRUDERS == 1 + set_ddram_address(DDRAM_LINE_2+1); + #else + set_ddram_address(DDRAM_LINE_3+1); + #endif + begin_data(); + write_number(temp); + if(target && FAR(temp, target)) { + write_str(F("\x1A")); + write_number(target); + } else { + write_str(F(" ")); + } +} + +void ST7920_Lite_Status_Screen::draw_fan_speed(uint8_t value) { + set_ddram_address(DDRAM_LINE_1+6); + begin_data(); + write_number(value,4); +} + +void ST7920_Lite_Status_Screen::draw_print_time(uint32_t elapsed) { + const uint8_t hrs = elapsed/3600; + const uint8_t min = (elapsed/60)%60; + char str[7]; + sprintf_P(str,hrs > 99 ? PSTR("%03d:%02d") : PSTR(" %02d:%02d"),hrs,min); + + set_ddram_address(DDRAM_LINE_3+5); + begin_data(); + write_str(str); +} + +void ST7920_Lite_Status_Screen::draw_feedrate_percentage(uint8_t percentage) { + // We only have enough room for the feedrate when + // we have one extruder + #if EXTRUDERS == 1 + set_ddram_address(DDRAM_LINE_2+6); + begin_data(); + write_number(percentage,4); + #endif +} + +void ST7920_Lite_Status_Screen::draw_status_message(const char *str) { + set_ddram_address(DDRAM_LINE_4); + begin_data(); + #if ENABLED(STATUS_MESSAGE_SCROLLING) + const uint8_t lcd_len = 16; + const uint8_t padding = 2; + uint8_t str_len = strlen(str); + + // Trim whitespace at the end of the str, as for some reason + // messages like "Card Inserted" are padded with many spaces + while(str_len > 0 && str[str_len-1] == ' ') { + str_len--; + } + + if(str_len <= lcd_len) { + // It all fits on the LCD without scrolling + write_str(str); + } else { + // Print the message repeatedly until covering the LCD + uint8_t c = status_scroll_pos; + for(uint8_t n = 0; n < lcd_len; n++) { + write_byte(c < str_len ? str[c] : ' '); + c++; + c %= str_len + padding; // Wrap around + } + + // Scroll the message + if(status_scroll_pos == str_len + padding) { + status_scroll_pos = 0; + } else { + status_scroll_pos++; + } + } + #else + write_str(str, 16); + #endif +} + +void ST7920_Lite_Status_Screen::draw_position(const float x, const float y, const float z, bool position_known) { + char str[7]; + set_ddram_address(DDRAM_LINE_4); + begin_data(); + + // If position is unknown, flash the labels. + const unsigned char alt_label = position_known ? 0 : (lcd_blink() ? ' ' : 0); + + dtostrf(x, -4, 0, str); + write_byte(alt_label ? alt_label : 'X'); + write_str(str, 4); + + dtostrf(y, -4, 0, str); + write_byte(alt_label ? alt_label : 'Y'); + write_str(str, 4); + + dtostrf(z, -5, 1, str); + write_byte(alt_label ? alt_label : 'Z'); + write_str(str, 5); +} + +bool ST7920_Lite_Status_Screen::indicators_changed() { + // We only add the target temperatures to the checksum + // because the actual temps fluctuate so by updating + // them only during blinks we gain a bit of stability. + const bool blink = lcd_blink(); + const uint8_t feedrate_perc = feedrate_percentage; + const uint8_t fan_speed = ((fanSpeeds[0] + 1) * 100) / 256; + const float extruder_1_target = thermalManager.degTargetHotend(0); + #if EXTRUDERS == 2 + const float extruder_2_target = thermalManager.degTargetHotend(1); + #endif + const float bed_target = thermalManager.degTargetBed(); + + static uint8_t last_checksum = 0; + + const uint8_t checksum = + uint8_t(blink) ^ + uint8_t(feedrate_perc) ^ + uint8_t(fan_speed) ^ + uint8_t(extruder_1_target) ^ +#if EXTRUDERS == 2 + uint8_t(extruder_2_target) ^ +#endif + uint8_t(bed_target); + + if(last_checksum == checksum) { + return false; + } else { + last_checksum = checksum; + return true; + } +} + +void ST7920_Lite_Status_Screen::update_indicators(bool forceUpdate) { + if(forceUpdate || indicators_changed()) { + const bool blink = lcd_blink(); + const duration_t elapsed = print_job_timer.duration(); + const uint32_t seconds_elapsed = elapsed.value; + const uint8_t feedrate_perc = feedrate_percentage; + const uint8_t fan_speed = ((fanSpeeds[0] + 1) * 100) / 256; + const float extruder_1_temp = thermalManager.degHotend(0); + const float extruder_1_target = thermalManager.degTargetHotend(0); + #if EXTRUDERS == 2 + const float extruder_2_temp = thermalManager.degHotend(1); + const float extruder_2_target = thermalManager.degTargetHotend(1); + #endif + const float bed_temp = thermalManager.degBed(); + const float bed_target = thermalManager.degTargetBed(); + + draw_extruder_1_temp(extruder_1_temp, extruder_1_target); + #if EXTRUDERS == 2 + draw_extruder_2_temp(extruder_2_temp, extruder_2_target); + #endif + draw_bed_temp(bed_temp, bed_target); + draw_fan_speed(fan_speed); + draw_print_time(seconds_elapsed); + draw_feedrate_percentage(feedrate_perc); + + // Update the fan and bed animations + if(fan_speed > 0) { + draw_fan_icon(blink); + } + if(bed_target > 0) { + draw_heat_icon(blink, true); + } else { + draw_heat_icon(false, false); + } + } +} + +bool ST7920_Lite_Status_Screen::position_changed() { + const float x_pos = current_position[X_AXIS]; + const float y_pos = current_position[Y_AXIS]; + const float z_pos = current_position[Z_AXIS]; + const uint8_t checksum = uint8_t(x_pos) ^ uint8_t(y_pos) ^ uint8_t(z_pos); + + static uint8_t last_checksum = 0; + if(last_checksum == checksum) { + return false; + } else { + last_checksum = checksum; + return true; + } +} + +bool ST7920_Lite_Status_Screen::status_changed() { + uint8_t checksum = 0; + for(const char *p = lcd_status_message; *p; p++) { + checksum ^= *p; + } + + static uint8_t last_checksum = 0; + if(last_checksum == checksum) { + return false; + } else { + last_checksum = checksum; + return true; + } +} + +bool ST7920_Lite_Status_Screen::blink_changed() { + static uint8_t last_blink = 0; + + const bool blink = lcd_blink(); + if(last_blink == blink) { + return false; + } else { + last_blink = blink; + return true; + } +} + +void ST7920_Lite_Status_Screen::update_status_or_position(bool forceUpdate) { + static uint8_t countdown = 0; + + /* There is only enough room in the display for either the + * status message or the position, not both, so we choose + * one or another. Whenever the status message changes, + * we show it for a number of consecutive seconds, but + * then go back to showing the position as soon as the + * head moves, i.e: + * + * countdown > 1 -- Show status + * countdown = 1 -- Show status, until movement + * countdown = 0 -- Show position + */ + if( forceUpdate || status_changed() ) { + #if ENABLED(STATUS_MESSAGE_SCROLLING) + status_scroll_pos = 0; + #endif + if(lcd_strlen(lcd_status_message)) { + countdown = DELAY_TO_SHOW_POSITION; + } else { + countdown = 0; + } + draw_status_message(lcd_status_message); + blink_changed(); // Clear changed flag + } + else if(countdown > 1 && blink_changed() ) { + countdown--; + #if ENABLED(STATUS_MESSAGE_SCROLLING) + draw_status_message(lcd_status_message); + #endif + } + else if(countdown > 0 && blink_changed() ) { + if(position_changed()) { + countdown--; + forceUpdate = true; + } + #if ENABLED(STATUS_MESSAGE_SCROLLING) + draw_status_message(lcd_status_message); + #endif + } + if(countdown == 0 && (forceUpdate || position_changed() || + #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING) + blink_changed() + #endif + )) { + draw_position( + current_position[X_AXIS], + current_position[Y_AXIS], + current_position[Z_AXIS], + #if ENABLED(DISABLE_REDUCED_ACCURACY_WARNING) + true + #else + axis_known_position[X_AXIS] && + axis_known_position[Y_AXIS] && + axis_known_position[Z_AXIS] + #endif + ); + } +} + +void ST7920_Lite_Status_Screen::update_progress(bool forceUpdate) { + #if ENABLED(SDSUPPORT) + const uint8_t percent_done = card.percentDone(); + #else + const uint8_t percent_done = 0; + #endif + + // Since the progress bar involves writing + // quite a few bytes to GDRAM, only do this + // when an update is actually necessary. + + static uint8_t last_progress = 0; + if(!forceUpdate && last_progress == percent_done) + return; + last_progress = percent_done; + + draw_progress_bar(percent_done); +} + +void ST7920_Lite_Status_Screen::update(bool forceUpdate) { + cs(); + update_indicators(forceUpdate); + update_status_or_position(forceUpdate); + update_progress(forceUpdate); + ncs(); +} + +void ST7920_Lite_Status_Screen::reset_state_from_unknown() { + _extended_function_set(true, true); // Do it twice as only one bit + _extended_function_set(true, true); // get set at a time. + _scroll_or_addr_select(false); +} + +void ST7920_Lite_Status_Screen::on_entry() { + cs(); + reset_state_from_unknown(); + clear(); + clear_gdram(); + draw_static_elements(); + update(true); + ncs(); +} + +void ST7920_Lite_Status_Screen::on_exit() { + cs(); + clear(); + _extended_function_set(true, true); // Restore state to what u8g expects. + ncs(); +} + +// This is called prior to the KILL screen to +// clear the screen so we don't end up with a +// garbled display. +void ST7920_Lite_Status_Screen::clear_text_buffer() { + cs(); + reset_state_from_unknown(); + clear(); + _extended_function_set(true, true); // Restore state to what u8g expects. + ncs(); +} + +static void lcd_implementation_status_screen() { + ST7920_Lite_Status_Screen::update(false); +} + +/* In order to properly update the lite status screen, + * we must know when we have entered and left the + * status screen. Since the ultralcd code is not + * set up for doing this, we call this function before + * each update indicating whether the current screen + * is the status screen. + * + * This function keeps track of whether we have left or + * entered the status screen and calls the on_entry() + * and on_exit() methods for cleanup. + */ + +static void lcd_in_status(bool inStatus) { + static bool lastInStatus = false; + if(!lastInStatus && inStatus) { + ST7920_Lite_Status_Screen::on_entry(); + lastInStatus = true; + } + if(lastInStatus && !inStatus) { + ST7920_Lite_Status_Screen::on_exit(); + lastInStatus = false; + } +} \ No newline at end of file diff --git a/Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen_impl_spi.h b/Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen_impl_spi.h new file mode 100644 index 000000000..1a0a33be4 --- /dev/null +++ b/Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen_impl_spi.h @@ -0,0 +1,39 @@ +/* + * Lightweight Status Screen for the RepRapDiscount Full + * Graphics Smart Controller (ST7920-based 128x64 LCD) + * + * (c) 2017 Aleph Objects, Inc. + * + * The code in this page is free software: you can + * redistribute it and/or modify it under the terms of the GNU + * General Public License (GNU GPL) as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) + * any later version. The code is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. + * + */ + +#include "ultralcd_impl_st7920_lite_status_screen.h" + +void ST7920_Lite_Status_Screen::cs() { + ST7920_CS(); + current_bits.synced = false; +} + +void ST7920_Lite_Status_Screen::ncs() { + ST7920_NCS(); + current_bits.synced = false; +} + +void ST7920_Lite_Status_Screen::sync_cmd() { + ST7920_SET_CMD(); +} + +void ST7920_Lite_Status_Screen::sync_dat() { + ST7920_SET_DAT(); +} + +void ST7920_Lite_Status_Screen::write_byte(uint8_t data) { + ST7920_WRITE_NIBBLES(data); +} \ No newline at end of file diff --git a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp index bc1e8bc16..39a3cc17a 100644 --- a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp +++ b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp @@ -124,10 +124,12 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo ST7920_CS(); u8g_Delay(120); //initial delay for boot up ST7920_SET_CMD(); + ST7920_WRITE_BYTE(0x20); //non-extended mode ST7920_WRITE_BYTE(0x08); //display off, cursor+blink off - ST7920_WRITE_BYTE(0x01); //clear CGRAM ram - u8g_Delay(15); //delay for CGRAM clear - ST7920_WRITE_BYTE(0x3E); //extended mode + GDRAM active + ST7920_WRITE_BYTE(0x01); //clear DDRAM ram + u8g_Delay(15); //delay for DDRAM clear + ST7920_WRITE_BYTE(0x24); //extended mode + ST7920_WRITE_BYTE(0x26); //extended mode + GDRAM active for (y = 0; y < (LCD_PIXEL_HEIGHT) / 2; y++) { //clear GDRAM ST7920_WRITE_BYTE(0x80 | y); //set y ST7920_WRITE_BYTE(0x80); //set x = 0 @@ -181,6 +183,14 @@ uint8_t u8g_dev_st7920_128x64_rrd_buf[(LCD_PIXEL_WIDTH) * (PAGE_HEIGHT) / 8] U u8g_pb_t u8g_dev_st7920_128x64_rrd_pb = {{PAGE_HEIGHT, LCD_PIXEL_HEIGHT, 0, 0, 0}, LCD_PIXEL_WIDTH, u8g_dev_st7920_128x64_rrd_buf}; u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn, &u8g_dev_st7920_128x64_rrd_pb, &u8g_com_null_fn}; +#if ENABLED(USE_ST7920_LIGHTWEIGHT_UI) + typedef const __FlashStringHelper *progmem_str; + + // We have to include the code for the lightweight UI here + // as it relies on macros that are only defined in this file. + #include "ultralcd_impl_st7920_lite_status_screen_impl_spi.h" +#endif + #pragma GCC reset_options #endif // U8G_HAL_LINKS diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index c4b6756d0..b7a66e894 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -5116,20 +5116,38 @@ void lcd_update() { #endif #if ENABLED(DOGLCD) - if (!drawing_screen) { // If not already drawing pages - u8g.firstPage(); // Start the first page - drawing_screen = 1; // Flag as drawing pages - } - lcd_setFont(FONT_MENU); // Setup font for every page draw - u8g.setColorIndex(1); // And reset the color - CURRENTSCREEN(); // Draw and process the current screen - - // The screen handler can clear drawing_screen for an action that changes the screen. - // If still drawing and there's another page, update max-time and return now. - // The nextPage will already be set up on the next call. - if (drawing_screen && (drawing_screen = u8g.nextPage())) { - NOLESS(max_display_update_time, millis() - ms); - return; + #if defined(USE_ST7920_LIGHTWEIGHT_UI) + #if ENABLED(ULTIPANEL) + bool do_U8G_loop = true; + lcd_in_status(currentScreen == lcd_status_screen); + if(currentScreen == lcd_status_screen) { + lcd_status_screen(); + do_U8G_loop = false; + } + #else + const bool do_U8G_loop = false; + lcd_in_status(true); + lcd_status_screen(); + #endif + #else + const bool do_U8G_loop = true; + #endif + if(do_U8G_loop) { + if (!drawing_screen) { // If not already drawing pages + u8g.firstPage(); // Start the first page + drawing_screen = 1; // Flag as drawing pages + } + lcd_setFont(FONT_MENU); // Setup font for every page draw + u8g.setColorIndex(1); // And reset the color + CURRENTSCREEN(); // Draw and process the current screen + + // The screen handler can clear drawing_screen for an action that changes the screen. + // If still drawing and there's another page, update max-time and return now. + // The nextPage will already be set up on the next call. + if (drawing_screen && (drawing_screen = u8g.nextPage())) { + NOLESS(max_display_update_time, millis() - ms); + return; + } } #else CURRENTSCREEN(); diff --git a/Marlin/src/lcd/ultralcd_impl_DOGM.h b/Marlin/src/lcd/ultralcd_impl_DOGM.h index 0b7b4badf..2ec7432c5 100644 --- a/Marlin/src/lcd/ultralcd_impl_DOGM.h +++ b/Marlin/src/lcd/ultralcd_impl_DOGM.h @@ -54,6 +54,11 @@ #include "dogm/dogm_bitmaps.h" +#if ENABLED(USE_ST7920_LIGHTWEIGHT_UI) + typedef const __FlashStringHelper *progmem_str; + #include "dogm/ultralcd_impl_st7920_lite_status_screen_impl.h" +#endif + #if ENABLED(SDSUPPORT) #include "../libs/duration_t.h" #endif @@ -373,6 +378,9 @@ static void lcd_implementation_init() { // The kill screen is displayed for unrecoverable conditions void lcd_kill_screen() { + #if ENABLED(USE_ST7920_LIGHTWEIGHT_UI) + ST7920_Lite_Status_Screen::clear_text_buffer(); + #endif const uint8_t h4 = u8g.getHeight() / 4; u8g.firstPage(); do { @@ -498,6 +506,7 @@ inline void lcd_implementation_status_message(const bool blink) { #endif } +#if !ENABLED(USE_ST7920_LIGHTWEIGHT_UI) static void lcd_implementation_status_screen() { const bool blink = lcd_blink(); @@ -801,6 +810,7 @@ static void lcd_implementation_status_screen() { #endif } } +#endif #if ENABLED(ULTIPANEL) From 79272f98fce43c9559d136101c5b4e5e617d0676 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 16 Feb 2018 01:04:15 -0600 Subject: [PATCH 46/46] Proposed changes to ST7920 lightweight status screen --- .travis.yml | 2 +- Marlin/Configuration.h | 11 - Marlin/Configuration_adv.h | 16 + Marlin/src/config/default/Configuration.h | 11 - Marlin/src/config/default/Configuration_adv.h | 16 + .../AlephObjects/TAZ4/Configuration_adv.h | 16 + .../AliExpress/CL-260/Configuration.h | 11 - .../config/examples/Anet/A6/Configuration.h | 11 +- .../examples/Anet/A6/Configuration_adv.h | 16 + .../config/examples/Anet/A8/Configuration.h | 13 - .../examples/Anet/A8/Configuration_adv.h | 16 + .../examples/Azteeg/X5GT/Configuration_adv.h | 16 + .../examples/BIBO/TouchX/Configuration_adv.h | 16 + .../BIBO/TouchX/cyclops/Configuration.h | 11 - .../BIBO/TouchX/default/Configuration.h | 11 - .../examples/BQ/Hephestos/Configuration_adv.h | 16 + .../BQ/Hephestos_2/Configuration_adv.h | 16 + .../examples/BQ/WITBOX/Configuration_adv.h | 16 + .../examples/Cartesio/Configuration_adv.h | 16 + .../Creality/CR-10/Configuration_adv.h | 16 + .../Creality/CR-10S/Configuration_adv.h | 16 + .../Creality/Ender/Configuration_adv.h | 16 + .../config/examples/Felix/Configuration_adv.h | 16 + .../FolgerTech/i3-2020/Configuration.h | 11 - .../FolgerTech/i3-2020/Configuration_adv.h | 16 + .../examples/Infitary/i3-M508/Configuration.h | 11 - .../Infitary/i3-M508/Configuration_adv.h | 16 + .../examples/JGAurora/A5/Configuration.h | 11 - .../examples/JGAurora/A5/Configuration_adv.h | 16 + .../examples/MakerParts/Configuration_adv.h | 16 + .../examples/Malyan/M150/Configuration_adv.h | 16 + .../examples/Malyan/M200/Configuration_adv.h | 16 + .../Micromake/C1/enhanced/Configuration_adv.h | 16 + .../examples/Mks/Sbase/Configuration_adv.h | 16 + .../config/examples/RigidBot/Configuration.h | 12 - .../examples/RigidBot/Configuration_adv.h | 16 + .../config/examples/SCARA/Configuration_adv.h | 16 + .../config/examples/STM32F10/Configuration.h | 11 - .../examples/Sanguinololu/Configuration.h | 11 - .../examples/Sanguinololu/Configuration_adv.h | 16 + .../examples/TheBorg/Configuration_adv.h | 16 + .../examples/TinyBoy2/Configuration_adv.h | 16 + .../config/examples/Tronxy/X1/Configuration.h | 11 - .../examples/Tronxy/X5S/Configuration.h | 11 - .../UltiMachine/Archim2/Configuration_adv.h | 16 + .../examples/Velleman/K8200/Configuration.h | 11 - .../Velleman/K8200/Configuration_adv.h | 16 + .../examples/Velleman/K8400/Configuration.h | 11 - .../Velleman/K8400/Configuration_adv.h | 16 + .../Velleman/K8400/Dual-head/Configuration.h | 11 - .../Wanhao/Duplicator 6/Configuration_adv.h | 16 + .../FLSUN/auto_calibrate/Configuration_adv.h | 16 + .../delta/FLSUN/kossel/Configuration_adv.h | 16 + .../FLSUN/kossel_mini/Configuration_adv.h | 16 + .../delta/generic/Configuration_adv.h | 16 + .../delta/kossel_mini/Configuration.h | 11 - .../delta/kossel_mini/Configuration_adv.h | 16 + .../delta/kossel_pro/Configuration_adv.h | 16 + .../delta/kossel_xl/Configuration_adv.h | 16 + .../examples/gCreate/gMax1.5+/Configuration.h | 11 - .../gCreate/gMax1.5+/Configuration_adv.h | 16 + .../config/examples/makibox/Configuration.h | 11 - .../examples/makibox/Configuration_adv.h | 16 + .../tvrrug/Round2/Configuration_adv.h | 16 + .../config/examples/wt150/Configuration_adv.h | 16 + Marlin/src/lcd/dogm/status_screen_DOGM.h | 442 ++++++++++++ ...een_impl.h => status_screen_lite_ST7920.h} | 647 ++++++++++-------- .../dogm/status_screen_lite_ST7920_class.h | 108 +++ ..._spi.h => status_screen_lite_ST7920_spi.h} | 10 +- .../ultralcd_impl_st7920_lite_status_screen.h | 247 ------- .../dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp | 6 +- Marlin/src/lcd/ultralcd.cpp | 20 +- Marlin/src/lcd/ultralcd_impl_DOGM.h | 429 +----------- 73 files changed, 1633 insertions(+), 1200 deletions(-) create mode 100644 Marlin/src/lcd/dogm/status_screen_DOGM.h rename Marlin/src/lcd/dogm/{ultralcd_impl_st7920_lite_status_screen_impl.h => status_screen_lite_ST7920.h} (50%) create mode 100644 Marlin/src/lcd/dogm/status_screen_lite_ST7920_class.h rename Marlin/src/lcd/dogm/{ultralcd_impl_st7920_lite_status_screen_impl_spi.h => status_screen_lite_ST7920_spi.h} (86%) delete mode 100644 Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen.h diff --git a/.travis.yml b/.travis.yml index fd0a767e3..e81f0f4cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -236,7 +236,7 @@ script: # - restore_configs - opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT - - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES + - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES LIGHTWEIGHT_UI - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM} # # REPRAPWORLD_KEYPAD diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 126fdc089..906765503 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1513,18 +1513,7 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 243ad3297..1ab6214bb 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h index 126fdc089..906765503 100644 --- a/Marlin/src/config/default/Configuration.h +++ b/Marlin/src/config/default/Configuration.h @@ -1513,18 +1513,7 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index 243ad3297..1ab6214bb 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index 00c700343..927288cfa 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h index 56ae68867..629a2373a 100644 --- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h +++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h @@ -1513,18 +1513,7 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h index e1c3ac694..2a4365b24 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration.h @@ -1661,18 +1661,9 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. +// Note: Details on connecting to the Anet V1.0 controller are in the file pins_ANET_10.h // -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index c3520aee1..84f2c0a7d 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h index b303b158f..21f94a4ae 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration.h @@ -1516,7 +1516,6 @@ // //#define G3D_PANEL - // // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller @@ -1525,18 +1524,6 @@ // //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 - // // MakerLab Mini Panel with graphic // controller and SD support - http://reprap.org/wiki/Mini_panel diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 912b64d6a..1379230a4 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h index d3bd3b2ed..90935abff 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h @@ -646,6 +646,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h index bb8eb5dec..06a42b3a4 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h index 0df628236..b8712d93e 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h @@ -1513,18 +1513,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h index ca6c4ca7c..0c3da3940 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h @@ -1513,18 +1513,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index 06994aae2..f332cd5a1 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety 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 5eb03d180..30fdc7fc9 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index 06994aae2..f332cd5a1 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index 9be79050b..979681706 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety 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 b3e8b8c55..ceaf22f75 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h index fcc9afd7e..860085868 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h index f16433f92..18ae13b91 100644 --- a/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index a3dae02c6..7d85152c5 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h index 2848e71fe..35f1f8585 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h @@ -1519,18 +1519,7 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h index 8e490f853..3850fd08d 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h index 77bd20aa6..555e22fe1 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h @@ -1517,18 +1517,7 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic 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 bdb8798bd..46bd9efcc 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration.h b/Marlin/src/config/examples/JGAurora/A5/Configuration.h index ce0d3e69b..077733ca9 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration.h @@ -1524,18 +1524,7 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h index 5f7bd9dc9..658c8957d 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h index 37aa8bf65..2b948f11c 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h +++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index 04a8f7b0e..dcbeb42e8 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h index d5fa7ef2d..48defd391 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h index b406b99d8..2af049577 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index 750336556..0c65886be 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -653,6 +653,22 @@ #define DOGLCD_MOSI MOSI_PIN #endif + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h index 09d4837c5..376c94977 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration.h +++ b/Marlin/src/config/examples/RigidBot/Configuration.h @@ -1515,18 +1515,6 @@ // //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 - // // MakerLab Mini Panel with graphic // controller and SD support - http://reprap.org/wiki/Mini_panel diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index f7aabe342..b0518f809 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index f6dea0622..8f4924336 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/STM32F10/Configuration.h b/Marlin/src/config/examples/STM32F10/Configuration.h index 04282211b..affc79667 100644 --- a/Marlin/src/config/examples/STM32F10/Configuration.h +++ b/Marlin/src/config/examples/STM32F10/Configuration.h @@ -1516,18 +1516,7 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h index 40d6d4c9f..239cf8d65 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h @@ -1544,18 +1544,7 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index 82fad3d16..0bd42f352 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h index 51f416d03..4edeea36c 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h +++ b/Marlin/src/config/examples/TheBorg/Configuration_adv.h @@ -642,6 +642,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index cf1be79b7..d9a05677f 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/Tronxy/X1/Configuration.h b/Marlin/src/config/examples/Tronxy/X1/Configuration.h index 3e6554299..e74543b69 100644 --- a/Marlin/src/config/examples/Tronxy/X1/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X1/Configuration.h @@ -1498,18 +1498,7 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h index aa562a5a5..38a6a31d1 100644 --- a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h @@ -1513,18 +1513,7 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h index 756dada7b..669fcbcb4 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h index 108ee285e..ecc36d717 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h @@ -1546,18 +1546,7 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index bcd42279b..30a2f2907 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -658,6 +658,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h index 7d5038c78..5e6092b26 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h @@ -1513,18 +1513,7 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index af6773c93..fa6f23485 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety 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 662b1ba1c..2e0c436c2 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -1507,18 +1507,7 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index 28ae6c3a9..cd507f206 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -647,6 +647,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety 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 3aac73b8f..af0badc32 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 @@ -647,6 +647,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h index 7b10f7e1e..bd46e9ebf 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -647,6 +647,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety 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 daadd5efd..9528ec9b4 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 @@ -647,6 +647,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index daadd5efd..9528ec9b4 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -647,6 +647,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h index 976a2bac4..6ebfebf86 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -1637,18 +1637,7 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic 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 daadd5efd..9528ec9b4 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -647,6 +647,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety 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 a9f5d4fa8..a04bb552a 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -652,6 +652,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety 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 232b8d6e5..11d29b9c5 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -647,6 +647,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h index d52ab8a2f..9053afb07 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h @@ -1527,18 +1527,7 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic 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 01afd6b77..eb7ba293c 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h index 6ec77ec43..d063628ea 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -1516,18 +1516,7 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -// If USE_ST7920_LIGHTWEIGHT_UI is uncommented, then an alternative -// light-weight status screen will be used that takes advantage of -// the ST7920 character-generator to conserve MCU resources. -// -// Since the lightweight status screen can only show a status -// message or the position, but not both, set DELAY_TO_SHOW_POSITION -// to the number of seconds until the position is revealed after a new -// status message is drawn. - //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -//#define USE_ST7920_LIGHTWEIGHT_UI -//#define DELAY_TO_SHOW_POSITION 20 // // MakerLab Mini Panel with graphic diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index a5b15b437..c5d4bc089 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index 5b1ae96d9..c957dad00 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -645,6 +645,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index 9c7ea6d35..70c37335b 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -646,6 +646,22 @@ // Swap the CW/CCW indicators in the graphics overlay //#define OVERLAY_GFX_REVERSE + #if ENABLED(U8GLIB_ST7920) + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + */ + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + #endif // DOGLCD // @section safety diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.h b/Marlin/src/lcd/dogm/status_screen_DOGM.h new file mode 100644 index 000000000..3d9fa0123 --- /dev/null +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.h @@ -0,0 +1,442 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * status_screen_DOGM.h + * + * Standard Status Screen for Graphical Display + */ + +#ifndef ULTRALCD_IMPL_STATUS_SCREEN_DOGM_H +#define ULTRALCD_IMPL_STATUS_SCREEN_DOGM_H + +FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t x, const uint8_t y) { + const char * const str = itostr3(temp); + u8g.setPrintPos(x - (str[0] != ' ' ? 0 : str[1] != ' ' ? 1 : 2) * DOG_CHAR_WIDTH / 2, y); + lcd_print(str); + lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); +} + +#ifndef HEAT_INDICATOR_X + #define HEAT_INDICATOR_X 8 +#endif + +FORCE_INLINE void _draw_heater_status(const uint8_t x, const int8_t heater, const bool blink) { + #if !HEATER_IDLE_HANDLER + UNUSED(blink); + #endif + + #if HAS_TEMP_BED + const bool isBed = heater < 0; + #else + constexpr bool isBed = false; + #endif + + if (PAGE_UNDER(7)) { + #if HEATER_IDLE_HANDLER + const bool is_idle = (!isBed ? thermalManager.is_heater_idle(heater) : + #if HAS_TEMP_BED + thermalManager.is_bed_idle() + #else + false + #endif + ); + + if (blink || !is_idle) + #endif + _draw_centered_temp((isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater)) + 0.5, x, 7); } + + if (PAGE_CONTAINS(21, 28)) + _draw_centered_temp((isBed ? thermalManager.degBed() : thermalManager.degHotend(heater)) + 0.5, x, 28); + + if (PAGE_CONTAINS(17, 20)) { + const uint8_t h = isBed ? 7 : HEAT_INDICATOR_X, + y = isBed ? 18 : 17; + if (isBed ? thermalManager.isHeatingBed() : thermalManager.isHeatingHotend(heater)) { + u8g.setColorIndex(0); // white on black + u8g.drawBox(x + h, y, 2, 2); + u8g.setColorIndex(1); // black on white + } + else { + u8g.drawBox(x + h, y, 2, 2); + } + } +} + +FORCE_INLINE void _draw_axis_label(const AxisEnum axis, const char* const pstr, const bool blink) { + if (blink) + lcd_printPGM(pstr); + else { + if (!axis_homed[axis]) + u8g.print('?'); + else { + #if DISABLED(HOME_AFTER_DEACTIVATE) && DISABLED(DISABLE_REDUCED_ACCURACY_WARNING) + if (!axis_known_position[axis]) + u8g.print(' '); + else + #endif + lcd_printPGM(pstr); + } + } +} + +inline void lcd_implementation_status_message(const bool blink) { + #if ENABLED(STATUS_MESSAGE_SCROLLING) + static bool last_blink = false; + const uint8_t slen = lcd_strlen(lcd_status_message); + const char *stat = lcd_status_message + status_scroll_pos; + if (slen <= LCD_WIDTH) + lcd_print_utf(stat); // The string isn't scrolling + else { + if (status_scroll_pos <= slen - LCD_WIDTH) + lcd_print_utf(stat); // The string fills the screen + else { + uint8_t chars = LCD_WIDTH; + if (status_scroll_pos < slen) { // First string still visible + lcd_print_utf(stat); // The string leaves space + chars -= slen - status_scroll_pos; // Amount of space left + } + u8g.print('.'); // Always at 1+ spaces left, draw a dot + if (--chars) { + if (status_scroll_pos < slen + 1) // Draw a second dot if there's space + --chars, u8g.print('.'); + if (chars) lcd_print_utf(lcd_status_message, chars); // Print a second copy of the message + } + } + if (last_blink != blink) { + last_blink = blink; + // Skip any non-printing bytes + if (status_scroll_pos < slen) while (!PRINTABLE(lcd_status_message[status_scroll_pos])) status_scroll_pos++; + if (++status_scroll_pos >= slen + 2) status_scroll_pos = 0; + } + } + #else + UNUSED(blink); + lcd_print_utf(lcd_status_message); + #endif +} + +static void lcd_implementation_status_screen() { + + const bool blink = lcd_blink(); + + #if FAN_ANIM_FRAMES > 2 + static bool old_blink; + static uint8_t fan_frame; + if (old_blink != blink) { + old_blink = blink; + if (!fanSpeeds[0] || ++fan_frame >= FAN_ANIM_FRAMES) fan_frame = 0; + } + #endif + + // Status Menu Font + lcd_setFont(FONT_STATUSMENU); + + // + // Fan Animation + // + // Draws the whole heading image as a B/W bitmap rather than + // drawing the elements separately. + // This was done as an optimization, as it was slower to draw + // multiple parts compared to a single bitmap. + // + // The bitmap: + // - May be offset in X + // - Includes all nozzle(s), bed(s), and the fan. + // + // TODO: + // + // - Only draw the whole header on the first + // entry to the status screen. Nozzle, bed, and + // fan outline bits don't change. + // + if (PAGE_UNDER(STATUS_SCREENHEIGHT + 1)) { + + u8g.drawBitmapP( + STATUS_SCREEN_X, STATUS_SCREEN_Y, + (STATUS_SCREENWIDTH + 7) / 8, STATUS_SCREENHEIGHT, + #if HAS_FAN0 + #if FAN_ANIM_FRAMES > 2 + fan_frame == 1 ? status_screen1_bmp : + fan_frame == 2 ? status_screen2_bmp : + #if FAN_ANIM_FRAMES > 3 + fan_frame == 3 ? status_screen3_bmp : + #endif + #else + blink && fanSpeeds[0] ? status_screen1_bmp : + #endif + #endif + status_screen0_bmp + ); + + } + + // + // Temperature Graphics and Info + // + + if (PAGE_UNDER(28)) { + // Extruders + HOTEND_LOOP() _draw_heater_status(STATUS_SCREEN_HOTEND_TEXT_X(e), e, blink); + + // Heated bed + #if HOTENDS < 4 && HAS_TEMP_BED + _draw_heater_status(STATUS_SCREEN_BED_TEXT_X, -1, blink); + #endif + + #if HAS_FAN0 + if (PAGE_CONTAINS(20, 27)) { + // Fan + const int16_t per = ((fanSpeeds[0] + 1) * 100) / 256; + if (per) { + u8g.setPrintPos(STATUS_SCREEN_FAN_TEXT_X, STATUS_SCREEN_FAN_TEXT_Y); + lcd_print(itostr3(per)); + u8g.print('%'); + } + } + #endif + } + + #if ENABLED(SDSUPPORT) + // + // SD Card Symbol + // + if (card.isFileOpen() && PAGE_CONTAINS(42 - (TALL_FONT_CORRECTION), 51 - (TALL_FONT_CORRECTION))) { + // Upper box + u8g.drawBox(42, 42 - (TALL_FONT_CORRECTION), 8, 7); // 42-48 (or 41-47) + // Right edge + u8g.drawBox(50, 44 - (TALL_FONT_CORRECTION), 2, 5); // 44-48 (or 43-47) + // Bottom hollow box + u8g.drawFrame(42, 49 - (TALL_FONT_CORRECTION), 10, 4); // 49-52 (or 48-51) + // Corner pixel + u8g.drawPixel(50, 43 - (TALL_FONT_CORRECTION)); // 43 (or 42) + } + #endif // SDSUPPORT + + #if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY) + // + // Progress bar frame + // + #define PROGRESS_BAR_X 54 + #define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X) + + if (PAGE_CONTAINS(49, 52 - (TALL_FONT_CORRECTION))) // 49-52 (or 49-51) + u8g.drawFrame( + PROGRESS_BAR_X, 49, + PROGRESS_BAR_WIDTH, 4 - (TALL_FONT_CORRECTION) + ); + + #if DISABLED(LCD_SET_PROGRESS_MANUALLY) + const uint8_t progress_bar_percent = card.percentDone(); + #endif + + if (progress_bar_percent > 1) { + + // + // Progress bar solid part + // + + if (PAGE_CONTAINS(50, 51 - (TALL_FONT_CORRECTION))) // 50-51 (or just 50) + u8g.drawBox( + PROGRESS_BAR_X + 1, 50, + (uint16_t)((PROGRESS_BAR_WIDTH - 2) * progress_bar_percent * 0.01), 2 - (TALL_FONT_CORRECTION) + ); + + // + // SD Percent Complete + // + + #if ENABLED(DOGM_SD_PERCENT) + if (PAGE_CONTAINS(41, 48)) { + // Percent complete + u8g.setPrintPos(55, 48); + u8g.print(itostr3(progress_bar_percent)); + u8g.print('%'); + } + #endif + } + + // + // Elapsed Time + // + + #if DISABLED(DOGM_SD_PERCENT) + #define SD_DURATION_X (PROGRESS_BAR_X + (PROGRESS_BAR_WIDTH / 2) - len * (DOG_CHAR_WIDTH / 2)) + #else + #define SD_DURATION_X (LCD_PIXEL_WIDTH - len * DOG_CHAR_WIDTH) + #endif + + if (PAGE_CONTAINS(41, 48)) { + char buffer[10]; + duration_t elapsed = print_job_timer.duration(); + bool has_days = (elapsed.value >= 60*60*24L); + uint8_t len = elapsed.toDigital(buffer, has_days); + u8g.setPrintPos(SD_DURATION_X, 48); + lcd_print(buffer); + } + + #endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY + + // + // XYZ Coordinates + // + + #if ENABLED(USE_SMALL_INFOFONT) + #define INFO_FONT_HEIGHT 7 + #else + #define INFO_FONT_HEIGHT 8 + #endif + + #define XYZ_BASELINE (30 + INFO_FONT_HEIGHT) + + #define X_LABEL_POS 3 + #define X_VALUE_POS 11 + #define XYZ_SPACING 40 + + #if ENABLED(XYZ_HOLLOW_FRAME) + #define XYZ_FRAME_TOP 29 + #define XYZ_FRAME_HEIGHT INFO_FONT_HEIGHT + 3 + #else + #define XYZ_FRAME_TOP 30 + #define XYZ_FRAME_HEIGHT INFO_FONT_HEIGHT + 1 + #endif + + // Before homing the axis letters are blinking 'X' <-> '?'. + // When axis is homed but axis_known_position is false the axis letters are blinking 'X' <-> ' '. + // When everything is ok you see a constant 'X'. + + static char xstring[5], ystring[5], zstring[7]; + #if ENABLED(FILAMENT_LCD_DISPLAY) + static char wstring[5], mstring[4]; + #endif + + // At the first page, regenerate the XYZ strings + if (page.page == 0) { + strcpy(xstring, ftostr4sign(LOGICAL_X_POSITION(current_position[X_AXIS]))); + strcpy(ystring, ftostr4sign(LOGICAL_Y_POSITION(current_position[Y_AXIS]))); + strcpy(zstring, ftostr52sp(FIXFLOAT(LOGICAL_Z_POSITION(current_position[Z_AXIS])))); + #if ENABLED(FILAMENT_LCD_DISPLAY) + strcpy(wstring, ftostr12ns(filament_width_meas)); + strcpy(mstring, itostr3(100.0 * ( + parser.volumetric_enabled + ? planner.volumetric_area_nominal / planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] + : planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] + ) + )); + #endif + } + + if (PAGE_CONTAINS(XYZ_FRAME_TOP, XYZ_FRAME_TOP + XYZ_FRAME_HEIGHT - 1)) { + + #if ENABLED(XYZ_HOLLOW_FRAME) + u8g.drawFrame(0, XYZ_FRAME_TOP, LCD_PIXEL_WIDTH, XYZ_FRAME_HEIGHT); // 8: 29-40 7: 29-39 + #else + u8g.drawBox(0, XYZ_FRAME_TOP, LCD_PIXEL_WIDTH, XYZ_FRAME_HEIGHT); // 8: 30-39 7: 30-37 + #endif + + if (PAGE_CONTAINS(XYZ_BASELINE - (INFO_FONT_HEIGHT - 1), XYZ_BASELINE)) { + + #if DISABLED(XYZ_HOLLOW_FRAME) + u8g.setColorIndex(0); // white on black + #endif + + u8g.setPrintPos(0 * XYZ_SPACING + X_LABEL_POS, XYZ_BASELINE); + _draw_axis_label(X_AXIS, PSTR(MSG_X), blink); + u8g.setPrintPos(0 * XYZ_SPACING + X_VALUE_POS, XYZ_BASELINE); + lcd_print(xstring); + + u8g.setPrintPos(1 * XYZ_SPACING + X_LABEL_POS, XYZ_BASELINE); + _draw_axis_label(Y_AXIS, PSTR(MSG_Y), blink); + u8g.setPrintPos(1 * XYZ_SPACING + X_VALUE_POS, XYZ_BASELINE); + lcd_print(ystring); + + u8g.setPrintPos(2 * XYZ_SPACING + X_LABEL_POS, XYZ_BASELINE); + _draw_axis_label(Z_AXIS, PSTR(MSG_Z), blink); + u8g.setPrintPos(2 * XYZ_SPACING + X_VALUE_POS, XYZ_BASELINE); + lcd_print(zstring); + + #if DISABLED(XYZ_HOLLOW_FRAME) + u8g.setColorIndex(1); // black on white + #endif + } + } + + // + // Feedrate + // + + if (PAGE_CONTAINS(51 - INFO_FONT_HEIGHT, 49)) { + lcd_setFont(FONT_MENU); + u8g.setPrintPos(3, 50); + lcd_print(LCD_STR_FEEDRATE[0]); + + lcd_setFont(FONT_STATUSMENU); + u8g.setPrintPos(12, 50); + lcd_print(itostr3(feedrate_percentage)); + u8g.print('%'); + + // + // Filament sensor display if SD is disabled + // + #if ENABLED(FILAMENT_LCD_DISPLAY) && DISABLED(SDSUPPORT) + u8g.setPrintPos(56, 50); + lcd_print(wstring); + u8g.setPrintPos(102, 50); + lcd_print(mstring); + u8g.print('%'); + lcd_setFont(FONT_MENU); + u8g.setPrintPos(47, 50); + lcd_print(LCD_STR_FILAM_DIA); + u8g.setPrintPos(93, 50); + lcd_print(LCD_STR_FILAM_MUL); + #endif + } + + // + // Status line + // + + #define STATUS_BASELINE (55 + INFO_FONT_HEIGHT) + + if (PAGE_CONTAINS(STATUS_BASELINE - (INFO_FONT_HEIGHT - 1), STATUS_BASELINE)) { + u8g.setPrintPos(0, STATUS_BASELINE); + + #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT) + if (PENDING(millis(), previous_lcd_status_ms + 5000UL)) { //Display both Status message line and Filament display on the last line + lcd_implementation_status_message(blink); + } + else { + lcd_printPGM(PSTR(LCD_STR_FILAM_DIA)); + u8g.print(':'); + lcd_print(wstring); + lcd_printPGM(PSTR(" " LCD_STR_FILAM_MUL)); + u8g.print(':'); + lcd_print(mstring); + u8g.print('%'); + } + #else + lcd_implementation_status_message(blink); + #endif + } +} + +#endif // ULTRALCD_IMPL_STATUS_SCREEN_DOGM_H \ No newline at end of file diff --git a/Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen_impl.h b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.h similarity index 50% rename from Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen_impl.h rename to Marlin/src/lcd/dogm/status_screen_lite_ST7920.h index db66fc12f..cb38585ed 100644 --- a/Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen_impl.h +++ b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.h @@ -1,4 +1,4 @@ -/* +/** * Lightweight Status Screen for the RepRapDiscount Full * Graphics Smart Controller (ST7920-based 128x64 LCD) * @@ -14,32 +14,31 @@ * */ - /* This is an implementation of a status screen for the RepRapDiscount - * Full Graphics Smart Controller using native ST7920 commands rather - * than using U8Glib. - * - * This alternative status screen makes use of the built-in character - * generation capabilities of the ST7920 to update the status screen - * with less SPI traffic and CPU use. In particular: - * - * - The fan and bed animations are handled using custom characters - * that are stored in CGRAM. This allows for the animation to be - * updated by writing a single character to the text-buffer (DDRAM). - * - * - All the information in the status screen is text that is written - * to DDRAM, so the work of generating the bitmaps is offloaded to - * the ST7920 rather than being render by U8Glib on the MCU. - * - * - The graphics buffer (GDRAM) is only used for static graphics - * elements (nozzle and feedrate bitmaps) and for the progress - * bar, so updates are sporadic. - */ - -#include "../../libs/duration_t.h" +/** + * Implementation of a Status Screen for the RepRapDiscount + * Full Graphics Smart Controller using native ST7920 commands + * instead of U8Glib. + * + * This alternative Status Screen makes use of the built-in character + * generation capabilities of the ST7920 to update the Status Screen + * with less SPI traffic and CPU use. In particular: + * + * - The fan and bed animations are handled using custom characters + * that are stored in CGRAM. This allows for the animation to be + * updated by writing a single character to the text-buffer (DDRAM). + * + * - All the information in the Status Screen is text that is written + * to DDRAM, so the work of generating the bitmaps is offloaded to + * the ST7920 rather than being render by U8Glib on the MCU. + * + * - The graphics buffer (GDRAM) is only used for static graphics + * elements (nozzle and feedrate bitmaps) and for the progress + * bar, so updates are sporadic. + */ -typedef const __FlashStringHelper *progmem_str; +#include "status_screen_lite_ST7920_class.h" -#include "ultralcd_impl_st7920_lite_status_screen.h" +#include "../../libs/duration_t.h" #define BUFFER_WIDTH 256 #define BUFFER_HEIGHT 32 @@ -51,8 +50,8 @@ typedef const __FlashStringHelper *progmem_str; ST7920_Lite_Status_Screen::st7920_state_t ST7920_Lite_Status_Screen::current_bits; -void ST7920_Lite_Status_Screen::cmd(uint8_t cmd) { - if(!current_bits.synced || !current_bits.cmd) { +void ST7920_Lite_Status_Screen::cmd(const uint8_t cmd) { + if (!current_bits.synced || !current_bits.cmd) { current_bits.synced = true; current_bits.cmd = true; sync_cmd(); @@ -62,47 +61,34 @@ void ST7920_Lite_Status_Screen::cmd(uint8_t cmd) { void ST7920_Lite_Status_Screen::begin_data() { extended_function_set(false); - if(!current_bits.synced || current_bits.cmd) { + if (!current_bits.synced || current_bits.cmd) { current_bits.synced = true; current_bits.cmd = false; sync_dat(); } } -void ST7920_Lite_Status_Screen::write_word(uint16_t w) { - write_byte((w >> 8) & 0xFF); - write_byte((w >> 0) & 0xFF); -} - void ST7920_Lite_Status_Screen::write_str(const char *str) { - while(*str) { - write_byte(*str++); - } + while (*str) write_byte(*str++); } void ST7920_Lite_Status_Screen::write_str(const char *str, uint8_t len) { - while(*str && len--) { - write_byte(*str++); - } + while (*str && len--) write_byte(*str++); } -void ST7920_Lite_Status_Screen::write_str_P(const char *str) { +void ST7920_Lite_Status_Screen::write_str_P(const char * const str) { const char *p_str = (const char *)str; - char c = pgm_read_byte_near(p_str++); - while(c) { - write_byte(c); - c = pgm_read_byte_near(p_str++); - } + while (char c = pgm_read_byte_near(p_str++)) write_byte(c); } void ST7920_Lite_Status_Screen::write_str(progmem_str str) { write_str_P((const char*)str); } -void ST7920_Lite_Status_Screen::write_number(uint8_t value, uint8_t digits) { - char str[7]; +void ST7920_Lite_Status_Screen::write_number(const uint8_t value, const uint8_t digits/*=3*/) { + char str[7]; const char *fmt; - switch(digits) { + switch (digits) { case 6: fmt = PSTR("%6d"); break; case 5: fmt = PSTR("%5d"); break; case 4: fmt = PSTR("%4d"); break; @@ -110,11 +96,11 @@ void ST7920_Lite_Status_Screen::write_number(uint8_t value, uint8_t digits) { case 2: fmt = PSTR("%2d"); break; case 1: fmt = PSTR("%1d"); break; } - sprintf_P(str,fmt,value); + sprintf_P(str, fmt, value); write_str(str); } -void ST7920_Lite_Status_Screen::display_status(bool display_on, bool cursor_on, bool blink_on) { +void ST7920_Lite_Status_Screen::display_status(const bool display_on, const bool cursor_on, const bool blink_on) { extended_function_set(false); cmd(0b00001000 | (display_on ? 0b0100 : 0) | @@ -126,7 +112,7 @@ void ST7920_Lite_Status_Screen::display_status(bool display_on, bool cursor_on, // Sets the extended and graphics bits simultaneously, regardless of // the current state. This is a helper function for extended_function_set() // and graphics() -void ST7920_Lite_Status_Screen::_extended_function_set(bool extended, bool graphics) { +void ST7920_Lite_Status_Screen::_extended_function_set(const bool extended, const bool graphics) { cmd( 0b00100000 | (extended ? 0b00000100 : 0) | (graphics ? 0b00000010 : 0) @@ -135,19 +121,17 @@ void ST7920_Lite_Status_Screen::_extended_function_set(bool extended, bool graph current_bits.graphics = graphics; } -void ST7920_Lite_Status_Screen::extended_function_set(bool extended) { - if(extended != current_bits.extended) { +void ST7920_Lite_Status_Screen::extended_function_set(const bool extended) { + if (extended != current_bits.extended) _extended_function_set(extended, current_bits.graphics); - } } -void ST7920_Lite_Status_Screen::graphics(bool graphics) { - if(graphics != current_bits.graphics) { +void ST7920_Lite_Status_Screen::graphics(const bool graphics) { + if (graphics != current_bits.graphics) _extended_function_set(current_bits.extended, graphics); - } } -void ST7920_Lite_Status_Screen::entry_mode_select(bool ac_increase, bool shift) { +void ST7920_Lite_Status_Screen::entry_mode_select(const bool ac_increase, const bool shift) { extended_function_set(false); cmd(0b00000100 | (ac_increase ? 0b00000010 : 0) | @@ -157,7 +141,7 @@ void ST7920_Lite_Status_Screen::entry_mode_select(bool ac_increase, bool shift) // Sets the sa bit regardless of the current state. This is a helper // function for scroll_or_addr_select() -void ST7920_Lite_Status_Screen::_scroll_or_addr_select(bool sa) { +void ST7920_Lite_Status_Screen::_scroll_or_addr_select(const bool sa) { extended_function_set(true); cmd(0b00100010 | (sa ? 0b000001 : 0) @@ -165,23 +149,22 @@ void ST7920_Lite_Status_Screen::_scroll_or_addr_select(bool sa) { current_bits.sa = sa; } -void ST7920_Lite_Status_Screen::scroll_or_addr_select(bool sa) { - if(sa != current_bits.sa) { +void ST7920_Lite_Status_Screen::scroll_or_addr_select(const bool sa) { + if (sa != current_bits.sa) _scroll_or_addr_select(sa); - } } -void ST7920_Lite_Status_Screen::set_ddram_address(uint8_t addr) { +void ST7920_Lite_Status_Screen::set_ddram_address(const uint8_t addr) { extended_function_set(false); cmd(0b10000000 | (addr & 0b00111111)); } -void ST7920_Lite_Status_Screen::set_cgram_address(uint8_t addr) { +void ST7920_Lite_Status_Screen::set_cgram_address(const uint8_t addr) { extended_function_set(false); cmd(0b01000000 | (addr & 0b00111111)); } -void ST7920_Lite_Status_Screen::set_gdram_address(uint8_t x, uint8_t y) { +void ST7920_Lite_Status_Screen::set_gdram_address(const uint8_t x, const uint8_t y) { extended_function_set(true); cmd(0b10000000 | (y & 0b01111111)); cmd(0b10000000 | (x & 0b00001111)); @@ -199,59 +182,192 @@ void ST7920_Lite_Status_Screen::home() { } /* This fills the entire text buffer with spaces */ -void ST7920_Lite_Status_Screen::clear_ddram() -{ +void ST7920_Lite_Status_Screen::clear_ddram() { set_ddram_address(DDRAM_LINE_1); begin_data(); - for(int i=0; i < 64;i++) { - write_byte(' '); - } + for (uint8_t i = 64; i--;) write_byte(' '); } /* This fills the entire graphics buffer with zeros */ -void ST7920_Lite_Status_Screen::clear_gdram() -{ - for(int y = 0; y < BUFFER_HEIGHT; y++) { - set_gdram_address(0,y); +void ST7920_Lite_Status_Screen::clear_gdram() { + for (uint8_t y = 0; y < BUFFER_HEIGHT; y++) { + set_gdram_address(0, y); begin_data(); - for(int i = 0; i < (BUFFER_WIDTH / 16); i++) { - write_byte(0); - write_byte(0); - } + for (uint8_t i = (BUFFER_WIDTH) / 16; i--;) write_word(0); } } -void ST7920_Lite_Status_Screen::load_cgram_icon(uint16_t addr, const void *data) { +void ST7920_Lite_Status_Screen::load_cgram_icon(const uint16_t addr, const void *data) { const uint16_t *p_word = (const uint16_t *)data; set_cgram_address(addr); begin_data(); - for(int i = 0; i < 16; i++) { - uint16_t word = pgm_read_word_near(p_word++); - write_byte((word & 0xFF00) >> 8); - write_byte((word & 0x00FF) >> 0); - } + for (uint8_t i = 16; i--;) + write_word(pgm_read_word_near(p_word++)); } -/* Draws an icon in GDRAM. The position is specified in - as if they were DDRAM coordinates, i.e. the x position - is [1-8], while the y position is [1-4] */ +/** + * Draw an icon in GDRAM. Position specified in DDRAM + * coordinates. i.e., X from 1 to 8, Y from 1 to 4. + */ void ST7920_Lite_Status_Screen::draw_gdram_icon(uint8_t x, uint8_t y, const void *data) { const uint16_t *p_word = (const uint16_t *)data; - if(y > 2) { - // Handle display folding + if (y > 2) { // Handle display folding y -= 2; x += 8; } - x -= 1; - y -= 1; - for(int i = 0; i < 16; i++) { - uint16_t word = pgm_read_word_near(p_word++); - set_gdram_address(x,i+y*16); + --x; + --y; + for (int i = 0; i < 16; i++) { + set_gdram_address(x, i + y * 16); begin_data(); - write_byte((word & 0xFF00) >> 8); - write_byte((word & 0x00FF) >> 0); - } -} + write_word(pgm_read_word_near(p_word++)); + } +} + +/************************** ICON DEFINITIONS *************************************/ + +#define CGRAM_ICON_1_ADDR 0x00 +#define CGRAM_ICON_2_ADDR 0x10 +#define CGRAM_ICON_3_ADDR 0x20 +#define CGRAM_ICON_4_ADDR 0x30 + +#define CGRAM_ICON_1_WORD 0x00 +#define CGRAM_ICON_2_WORD 0x02 +#define CGRAM_ICON_3_WORD 0x04 +#define CGRAM_ICON_4_WORD 0x06 + +const uint16_t nozzle_icon[] PROGMEM = { + 0b0000000000000000, + 0b0000000000000000, + 0b0000111111110000, + 0b0001111111111000, + 0b0001111111111000, + 0b0001111111111000, + 0b0000111111110000, + 0b0000111111110000, + 0b0001111111111000, + 0b0001111111111000, + 0b0001111111111000, + 0b0000011111100000, + 0b0000001111000000, + 0b0000000110000000, + 0b0000000000000000, + 0b0000000000000000 +}; + +const uint16_t bed_icon[] PROGMEM = { + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0111111111111110, + 0b0111111111111110, + 0b0000000000000000, + 0b0000000000000000 +}; + +const uint16_t heat1_icon[] PROGMEM = { + 0b0000000000000000, + 0b0000000000000000, + 0b0010001000100000, + 0b0001000100010000, + 0b0000100010001000, + 0b0000100010001000, + 0b0001000100010000, + 0b0010001000100000, + 0b0010001000100000, + 0b0001000100010000, + 0b0000100010001000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000 +}; + +const uint16_t heat2_icon[] PROGMEM = { + 0b0000000000000000, + 0b0000000000000000, + 0b0000100010001000, + 0b0000100010001000, + 0b0001000100010000, + 0b0010001000100000, + 0b0010001000100000, + 0b0001000100010000, + 0b0000100010001000, + 0b0000100010001000, + 0b0001000100010000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000 +}; + +const uint16_t fan1_icon[] PROGMEM = { + 0b0000000000000000, + 0b0111111111111110, + 0b0111000000001110, + 0b0110001111000110, + 0b0100001111000010, + 0b0100000110000010, + 0b0101100000011010, + 0b0101110110111010, + 0b0101100000011010, + 0b0100000110000010, + 0b0100001111000010, + 0b0110001111000110, + 0b0111000000001110, + 0b0111111111111110, + 0b0000000000000000, + 0b0000000000000000 +}; + +const uint16_t fan2_icon[] PROGMEM = { + 0b0000000000000000, + 0b0111111111111110, + 0b0111000000001110, + 0b0110010000100110, + 0b0100111001110010, + 0b0101111001111010, + 0b0100110000110010, + 0b0100000110000010, + 0b0100110000110010, + 0b0101111001111010, + 0b0100111001110010, + 0b0110010000100110, + 0b0111000000001110, + 0b0111111111111110, + 0b0000000000000000, + 0b0000000000000000 +}; + +const uint16_t feedrate_icon[] PROGMEM = { + 0b0000000000000000, + 0b0111111000000000, + 0b0100000000000000, + 0b0100000000000000, + 0b0100000000000000, + 0b0111111011111000, + 0b0100000010000100, + 0b0100000010000100, + 0b0100000010000100, + 0b0100000011111000, + 0b0000000010001000, + 0b0000000010000100, + 0b0000000010000100, + 0b0000000010000010, + 0b0000000000000000, + 0b0000000000000000 +}; /************************** MAIN SCREEN *************************************/ @@ -265,102 +381,100 @@ void ST7920_Lite_Status_Screen::draw_static_elements() { load_cgram_icon(CGRAM_ICON_4_ADDR, fan2_icon); // Draw the static icons in GDRAM - draw_gdram_icon(1,1,nozzle_icon); + draw_gdram_icon(1, 1, nozzle_icon); #if EXTRUDERS == 2 - draw_gdram_icon(1,2,nozzle_icon); + draw_gdram_icon(1, 2, nozzle_icon); #endif - draw_gdram_icon(6,2,feedrate_icon); - draw_gdram_icon(1,2,bed_icon); + draw_gdram_icon(6, 2, feedrate_icon); + draw_gdram_icon(1, 2, bed_icon); // Draw the initial fan icon draw_fan_icon(false); } -/* Although this is undocumented, the ST7920 allows the character +/** + * Although this is undocumented, the ST7920 allows the character * data buffer (DDRAM) to be used in conjunction with the graphics * bitmap buffer (CGRAM). The contents of the graphics buffer is * XORed with the data from the character generator. This allows * us to make the progess bar out of graphical data (the bar) and * text data (the percentage). */ -void ST7920_Lite_Status_Screen::draw_progress_bar(uint8_t value) { +void ST7920_Lite_Status_Screen::draw_progress_bar(const uint8_t value) { #if EXTRUDERS == 1 // If we have only one extruder, draw a long progress bar on the third line - const int top = 1; // Top in pixels - const int bottom = 13; // Bottom in pixels - const int left = 8; // Left edge, in 16-bit words - const int width = 5; // Width of progress bar, in 16-bit words + const uint8_t top = 1, // Top in pixels + bottom = 13, // Bottom in pixels + left = 8, // Left edge, in 16-bit words + width = 5; // Width of progress bar, in 16-bit words #else - const int top = 16 + 1; // Top in pixels - const int bottom = 16 + 13; // Bottom in pixels - const int left = 5; // Left edge, in 16-bit words - const int width = 3; // Width of progress bar, in 16-bit words + const uint8_t top = 16 + 1, // Top in pixels + bottom = 16 + 13, // Bottom in pixels + left = 5, // Left edge, in 16-bit words + width = 3; // Width of progress bar, in 16-bit words #endif - const int char_pcnt = 100/width; // How many percent does each 16-bit word represent? + const uint8_t char_pcnt = 100 / width; // How many percent does each 16-bit word represent? // Draw the progress bar as a bitmap in CGRAM - - for(int y = top; y <= bottom; y++) { - set_gdram_address(left,y); + for (uint8_t y = top; y <= bottom; y++) { + set_gdram_address(left, y); begin_data(); - for(int x = 0; x < width; x++) { + for (uint8_t x = 0; x < width; x++) { uint16_t gfx_word = 0x0000; - if((x+1)*char_pcnt <= value) { - // Draw completely filled bytes - gfx_word = 0xFFFF; - } else if((x*char_pcnt) < value) { - // Draw partially filled bytes - gfx_word = int(0x8000) >> (value % char_pcnt)*16/char_pcnt; - } + if ((x + 1) * char_pcnt <= value) + gfx_word = 0xFFFF; // Draw completely filled bytes + else if ((x * char_pcnt) < value) + gfx_word = int(0x8000) >> (value % char_pcnt) * 16 / char_pcnt; // Draw partially filled bytes + // Draw the frame around the progress bar - if(y == top || y == bottom) { - // Draw top/bottom border - gfx_word = 0xFFFF; - } else if (x == (width-1)) { - // Draw right border - gfx_word |= 0x0001; - } else if (x == 0) { - // Draw left border - gfx_word |= 0x8000; - } + if (y == top || y == bottom) + gfx_word = 0xFFFF; // Draw top/bottom border + else if (x == width - 1) + gfx_word |= 0x0001; // Draw right border + else if (x == 0) + gfx_word |= 0x8000; // Draw left border write_word(gfx_word); } } // Draw the percentage as text in DDRAM - - #if EXTRUDERS == 1 - set_ddram_address(DDRAM_LINE_3 + 1); - #else - set_ddram_address(DDRAM_LINE_2 + left); - #endif + set_ddram_address( + #if EXTRUDERS == 1 + DDRAM_LINE_3 + 1 + #else + DDRAM_LINE_2 + left + #endif + ); begin_data(); - if(value > 9) { - write_number(value,4); + if (value > 9) { + write_number(value, 4); write_str(F("% ")); - } else { - write_number(value,3); + } + else { + write_number(value, 3); write_str(F("% ")); } } -void ST7920_Lite_Status_Screen::draw_fan_icon(bool whichIcon) { - set_ddram_address(DDRAM_LINE_1+5); +void ST7920_Lite_Status_Screen::draw_fan_icon(const bool whichIcon) { + set_ddram_address(DDRAM_LINE_1 + 5); begin_data(); write_word(whichIcon ? CGRAM_ICON_3_WORD : CGRAM_ICON_4_WORD); } -void ST7920_Lite_Status_Screen::draw_heat_icon(bool whichIcon, bool heating) { - #if EXTRUDERS == 1 - set_ddram_address(DDRAM_LINE_2); - #else - set_ddram_address(DDRAM_LINE_3); - #endif +void ST7920_Lite_Status_Screen::draw_heat_icon(const bool whichIcon, const bool heating) { + set_ddram_address( + #if EXTRUDERS == 1 + DDRAM_LINE_2 + #else + DDRAM_LINE_3 + #endif + ); begin_data(); - if(heating) { + if (heating) write_word(whichIcon ? CGRAM_ICON_1_WORD : CGRAM_ICON_2_WORD); - } else { + else { write_byte(' '); write_byte(' '); } @@ -368,70 +482,72 @@ void ST7920_Lite_Status_Screen::draw_heat_icon(bool whichIcon, bool heating) { #define FAR(a,b) (((a > b) ? (a-b) : (b-a)) > 1) -void ST7920_Lite_Status_Screen::draw_extruder_1_temp(uint8_t temp, uint8_t target) { - set_ddram_address(DDRAM_LINE_1+1); +void ST7920_Lite_Status_Screen::draw_extruder_1_temp(const uint8_t temp, const uint8_t target) { + set_ddram_address(DDRAM_LINE_1 + 1); begin_data(); write_number(temp); - if(target && FAR(temp, target)) { + if (target && FAR(temp, target)) { write_str(F("\x1A")); write_number(target); - } else { - write_str(F(" ")); } + else + write_str(F(" ")); } -void ST7920_Lite_Status_Screen::draw_extruder_2_temp(uint8_t temp, uint8_t target) { - set_ddram_address(DDRAM_LINE_2+1); +void ST7920_Lite_Status_Screen::draw_extruder_2_temp(const uint8_t temp, const uint8_t target) { + set_ddram_address(DDRAM_LINE_2 + 1); begin_data(); write_number(temp); - if(target && FAR(temp, target)) { + if (target && FAR(temp, target)) { write_str(F("\x1A")); write_number(target); - } else { - write_str(F(" ")); } + else + write_str(F(" ")); } -void ST7920_Lite_Status_Screen::draw_bed_temp(uint8_t temp, uint8_t target) { - #if EXTRUDERS == 1 - set_ddram_address(DDRAM_LINE_2+1); - #else - set_ddram_address(DDRAM_LINE_3+1); - #endif +void ST7920_Lite_Status_Screen::draw_bed_temp(const uint8_t temp, const uint8_t target) { + set_ddram_address( + #if EXTRUDERS == 1 + DDRAM_LINE_2 + 1 + #else + DDRAM_LINE_3 + 1 + #endif + ); begin_data(); write_number(temp); - if(target && FAR(temp, target)) { + if (target && FAR(temp, target)) { write_str(F("\x1A")); write_number(target); - } else { - write_str(F(" ")); } + else + write_str(F(" ")); } -void ST7920_Lite_Status_Screen::draw_fan_speed(uint8_t value) { - set_ddram_address(DDRAM_LINE_1+6); +void ST7920_Lite_Status_Screen::draw_fan_speed(const uint8_t value) { + set_ddram_address(DDRAM_LINE_1 + 6); begin_data(); - write_number(value,4); + write_number(value, 4); } -void ST7920_Lite_Status_Screen::draw_print_time(uint32_t elapsed) { - const uint8_t hrs = elapsed/3600; - const uint8_t min = (elapsed/60)%60; - char str[7]; - sprintf_P(str,hrs > 99 ? PSTR("%03d:%02d") : PSTR(" %02d:%02d"),hrs,min); +void ST7920_Lite_Status_Screen::draw_print_time(const uint32_t elapsed) { + const uint8_t hrs = elapsed / 3600, + min = (elapsed / 60) % 60; + char str[7]; + sprintf_P(str, hrs > 99 ? PSTR("%03d:%02d") : PSTR(" %02d:%02d"), hrs, min); - set_ddram_address(DDRAM_LINE_3+5); + set_ddram_address(DDRAM_LINE_3 + 5); begin_data(); write_str(str); } -void ST7920_Lite_Status_Screen::draw_feedrate_percentage(uint8_t percentage) { +void ST7920_Lite_Status_Screen::draw_feedrate_percentage(const uint8_t percentage) { // We only have enough room for the feedrate when // we have one extruder #if EXTRUDERS == 1 - set_ddram_address(DDRAM_LINE_2+6); + set_ddram_address(DDRAM_LINE_2 + 6); begin_data(); - write_number(percentage,4); + write_number(percentage, 4); #endif } @@ -445,28 +561,26 @@ void ST7920_Lite_Status_Screen::draw_status_message(const char *str) { // Trim whitespace at the end of the str, as for some reason // messages like "Card Inserted" are padded with many spaces - while(str_len > 0 && str[str_len-1] == ' ') { - str_len--; - } + while (str_len > 0 && str[str_len - 1] == ' ') str_len--; - if(str_len <= lcd_len) { + if (str_len <= lcd_len) { // It all fits on the LCD without scrolling write_str(str); - } else { + } + else { // Print the message repeatedly until covering the LCD uint8_t c = status_scroll_pos; - for(uint8_t n = 0; n < lcd_len; n++) { + for (uint8_t n = 0; n < lcd_len; n++) { write_byte(c < str_len ? str[c] : ' '); c++; c %= str_len + padding; // Wrap around } // Scroll the message - if(status_scroll_pos == str_len + padding) { + if (status_scroll_pos == str_len + padding) status_scroll_pos = 0; - } else { + else status_scroll_pos++; - } } #else write_str(str, 16); @@ -503,7 +617,7 @@ bool ST7920_Lite_Status_Screen::indicators_changed() { const uint8_t fan_speed = ((fanSpeeds[0] + 1) * 100) / 256; const float extruder_1_target = thermalManager.degTargetHotend(0); #if EXTRUDERS == 2 - const float extruder_2_target = thermalManager.degTargetHotend(1); + const float extruder_2_target = thermalManager.degTargetHotend(1); #endif const float bed_target = thermalManager.degTargetBed(); @@ -514,21 +628,19 @@ bool ST7920_Lite_Status_Screen::indicators_changed() { uint8_t(feedrate_perc) ^ uint8_t(fan_speed) ^ uint8_t(extruder_1_target) ^ -#if EXTRUDERS == 2 - uint8_t(extruder_2_target) ^ -#endif + #if EXTRUDERS == 2 + uint8_t(extruder_2_target) ^ + #endif uint8_t(bed_target); - if(last_checksum == checksum) { - return false; - } else { - last_checksum = checksum; - return true; - } + if (last_checksum == checksum) return false; + + last_checksum = checksum; + return true; } -void ST7920_Lite_Status_Screen::update_indicators(bool forceUpdate) { - if(forceUpdate || indicators_changed()) { +void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) { + if (forceUpdate || indicators_changed()) { const bool blink = lcd_blink(); const duration_t elapsed = print_job_timer.duration(); const uint32_t seconds_elapsed = elapsed.value; @@ -537,15 +649,15 @@ void ST7920_Lite_Status_Screen::update_indicators(bool forceUpdate) { const float extruder_1_temp = thermalManager.degHotend(0); const float extruder_1_target = thermalManager.degTargetHotend(0); #if EXTRUDERS == 2 - const float extruder_2_temp = thermalManager.degHotend(1); - const float extruder_2_target = thermalManager.degTargetHotend(1); + const float extruder_2_temp = thermalManager.degHotend(1); + const float extruder_2_target = thermalManager.degTargetHotend(1); #endif const float bed_temp = thermalManager.degBed(); const float bed_target = thermalManager.degTargetBed(); draw_extruder_1_temp(extruder_1_temp, extruder_1_target); #if EXTRUDERS == 2 - draw_extruder_2_temp(extruder_2_temp, extruder_2_target); + draw_extruder_2_temp(extruder_2_temp, extruder_2_target); #endif draw_bed_temp(bed_temp, bed_target); draw_fan_speed(fan_speed); @@ -553,63 +665,49 @@ void ST7920_Lite_Status_Screen::update_indicators(bool forceUpdate) { draw_feedrate_percentage(feedrate_perc); // Update the fan and bed animations - if(fan_speed > 0) { - draw_fan_icon(blink); - } - if(bed_target > 0) { + if (fan_speed > 0) draw_fan_icon(blink); + if (bed_target > 0) draw_heat_icon(blink, true); - } else { + else draw_heat_icon(false, false); - } } } bool ST7920_Lite_Status_Screen::position_changed() { - const float x_pos = current_position[X_AXIS]; - const float y_pos = current_position[Y_AXIS]; - const float z_pos = current_position[Z_AXIS]; + const float x_pos = current_position[X_AXIS], + y_pos = current_position[Y_AXIS], + z_pos = current_position[Z_AXIS]; const uint8_t checksum = uint8_t(x_pos) ^ uint8_t(y_pos) ^ uint8_t(z_pos); static uint8_t last_checksum = 0; - if(last_checksum == checksum) { - return false; - } else { - last_checksum = checksum; - return true; - } + if (last_checksum == checksum) return false; + last_checksum = checksum; + return true; } bool ST7920_Lite_Status_Screen::status_changed() { uint8_t checksum = 0; - for(const char *p = lcd_status_message; *p; p++) { - checksum ^= *p; - } + for (const char *p = lcd_status_message; *p; p++) checksum ^= *p; static uint8_t last_checksum = 0; - if(last_checksum == checksum) { - return false; - } else { - last_checksum = checksum; - return true; - } + if (last_checksum == checksum) return false; + last_checksum = checksum; + return true; } bool ST7920_Lite_Status_Screen::blink_changed() { static uint8_t last_blink = 0; - const bool blink = lcd_blink(); - if(last_blink == blink) { - return false; - } else { - last_blink = blink; - return true; - } + if (last_blink == blink) return false; + last_blink = blink; + return true; } void ST7920_Lite_Status_Screen::update_status_or_position(bool forceUpdate) { static uint8_t countdown = 0; - /* There is only enough room in the display for either the + /** + * There is only enough room in the display for either the * status message or the position, not both, so we choose * one or another. Whenever the status message changes, * we show it for a number of consecutive seconds, but @@ -620,36 +718,35 @@ void ST7920_Lite_Status_Screen::update_status_or_position(bool forceUpdate) { * countdown = 1 -- Show status, until movement * countdown = 0 -- Show position */ - if( forceUpdate || status_changed() ) { + if (forceUpdate || status_changed()) { #if ENABLED(STATUS_MESSAGE_SCROLLING) status_scroll_pos = 0; #endif - if(lcd_strlen(lcd_status_message)) { - countdown = DELAY_TO_SHOW_POSITION; - } else { - countdown = 0; - } + #ifndef STATUS_EXPIRE_SECONDS + #define STATUS_EXPIRE_SECONDS 20 + #endif + countdown = lcd_strlen(lcd_status_message) ? STATUS_EXPIRE_SECONDS : 0; draw_status_message(lcd_status_message); blink_changed(); // Clear changed flag } - else if(countdown > 1 && blink_changed() ) { + else if (countdown > 1 && blink_changed()) { countdown--; #if ENABLED(STATUS_MESSAGE_SCROLLING) - draw_status_message(lcd_status_message); + draw_status_message(lcd_status_message); #endif } - else if(countdown > 0 && blink_changed() ) { - if(position_changed()) { + else if (countdown > 0 && blink_changed()) { + if (position_changed()) { countdown--; forceUpdate = true; } #if ENABLED(STATUS_MESSAGE_SCROLLING) - draw_status_message(lcd_status_message); + draw_status_message(lcd_status_message); #endif } - if(countdown == 0 && (forceUpdate || position_changed() || + if (countdown == 0 && (forceUpdate || position_changed() || #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING) - blink_changed() + blink_changed() #endif )) { draw_position( @@ -667,26 +764,27 @@ void ST7920_Lite_Status_Screen::update_status_or_position(bool forceUpdate) { } } -void ST7920_Lite_Status_Screen::update_progress(bool forceUpdate) { - #if ENABLED(SDSUPPORT) - const uint8_t percent_done = card.percentDone(); - #else - const uint8_t percent_done = 0; - #endif +void ST7920_Lite_Status_Screen::update_progress(const bool forceUpdate) { + const uint8_t percent_done = + #if ENABLED(SDSUPPORT) + card.percentDone() + #else + 0 + #endif + ; // Since the progress bar involves writing // quite a few bytes to GDRAM, only do this // when an update is actually necessary. static uint8_t last_progress = 0; - if(!forceUpdate && last_progress == percent_done) - return; + if (!forceUpdate && last_progress == percent_done) return; last_progress = percent_done; draw_progress_bar(percent_done); } -void ST7920_Lite_Status_Screen::update(bool forceUpdate) { +void ST7920_Lite_Status_Screen::update(const bool forceUpdate) { cs(); update_indicators(forceUpdate); update_status_or_position(forceUpdate); @@ -732,26 +830,23 @@ static void lcd_implementation_status_screen() { ST7920_Lite_Status_Screen::update(false); } -/* In order to properly update the lite status screen, +/** + * In order to properly update the lite Status Screen, * we must know when we have entered and left the - * status screen. Since the ultralcd code is not + * Status Screen. Since the ultralcd code is not * set up for doing this, we call this function before * each update indicating whether the current screen - * is the status screen. + * is the Status Screen. * * This function keeps track of whether we have left or - * entered the status screen and calls the on_entry() + * entered the Status Screen and calls the on_entry() * and on_exit() methods for cleanup. */ - -static void lcd_in_status(bool inStatus) { +static void lcd_in_status(const bool inStatus) { static bool lastInStatus = false; - if(!lastInStatus && inStatus) { + if (lastInStatus == inStatus) return; + if ((lastInStatus = inStatus)) ST7920_Lite_Status_Screen::on_entry(); - lastInStatus = true; - } - if(lastInStatus && !inStatus) { + else ST7920_Lite_Status_Screen::on_exit(); - lastInStatus = false; - } -} \ No newline at end of file +} diff --git a/Marlin/src/lcd/dogm/status_screen_lite_ST7920_class.h b/Marlin/src/lcd/dogm/status_screen_lite_ST7920_class.h new file mode 100644 index 000000000..464f2f635 --- /dev/null +++ b/Marlin/src/lcd/dogm/status_screen_lite_ST7920_class.h @@ -0,0 +1,108 @@ +/** + * Lightweight Status Screen for the RepRapDiscount Full + * Graphics Smart Controller (ST7920-based 128x64 LCD) + * + * (c) 2017 Aleph Objects, Inc. + * + * The code in this page is free software: you can + * redistribute it and/or modify it under the terms of the GNU + * General Public License (GNU GPL) as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) + * any later version. The code is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. + * + */ + +#ifndef STATUS_SCREEN_LITE_ST7920_CLASS_H +#define STATUS_SCREEN_LITE_ST7920_CLASS_H + +#include "../../core/macros.h" + +typedef const __FlashStringHelper *progmem_str; + +class ST7920_Lite_Status_Screen { + private: + static struct st7920_state_t { + uint8_t synced : 1; // Whether a sync has been sent + uint8_t cmd : 1; // Whether the sync was cmd or data + uint8_t extended : 1; + uint8_t graphics : 1; + uint8_t sa : 1; + } current_bits; + + static void cs(); + static void ncs(); + static void sync_cmd(); + static void sync_dat(); + static void write_byte(const uint8_t w); + + FORCE_INLINE static void write_word(const uint16_t w) { + write_byte((w >> 8) & 0xFF); + write_byte((w >> 0) & 0xFF); + } + + static void cmd(const uint8_t cmd); + static void begin_data(); + + static void write_str(const char *str); + static void write_str(const char *str, const uint8_t len); + static void write_str_P(const char * const str); + static void write_str(progmem_str str); + static void write_number(const uint8_t value, const uint8_t digits=3); + + static void _extended_function_set(const bool extended, const bool graphics); + static void _scroll_or_addr_select(const bool sa); + static void reset_state_from_unknown(); + + static void home(); + static void display_status(const bool display_on, const bool cursor_on, const bool blink_on); + static void extended_function_set(const bool extended); + static void graphics(const bool graphics); + static void entry_mode_select(const bool ac_increase, const bool shift); + static void scroll_or_addr_select(const bool sa); + static void set_ddram_address(const uint8_t addr); + static void set_cgram_address(const uint8_t addr); + static void set_gdram_address(const uint8_t x, const uint8_t y); + + static void clear(); + static void clear_ddram(); + static void clear_gdram(); + + static void load_cgram_icon(const uint16_t addr, const void *data); + static void draw_gdram_icon(uint8_t x, uint8_t y, const void *data); + + static uint8_t string_checksum(const char *str); + + protected: + static void draw_static_elements(); + static void draw_progress_bar(const uint8_t value); + static void draw_fan_icon(const bool whichIcon); + static void draw_heat_icon(const bool whichIcon, const bool heating); + static void draw_extruder_1_temp(const uint8_t temp, const uint8_t target); + static void draw_extruder_2_temp(const uint8_t temp, const uint8_t target); + static void draw_bed_temp(const uint8_t temp, const uint8_t target); + static void draw_fan_speed(const uint8_t value); + static void draw_print_time(const uint32_t elapsed); + static void draw_feedrate_percentage(const uint8_t percentage); + static void draw_status_message(const char *str); + static void draw_position(const float x, const float y, const float z, bool position_known = true); + + static bool indicators_changed(); + static bool position_changed(); + static bool blink_changed(); + static bool status_changed(); + + static void update_indicators(const bool forceUpdate); + static void update_position(const bool forceUpdate, bool resetChecksum); + static void update_status_or_position(bool forceUpdate); + static void update_progress(const bool forceUpdate); + + public: + static void update(const bool forceUpdate); + static void on_entry(); + static void on_exit(); + static void clear_text_buffer(); +}; + +#endif // STATUS_SCREEN_LITE_ST7920_CLASS_H diff --git a/Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen_impl_spi.h b/Marlin/src/lcd/dogm/status_screen_lite_ST7920_spi.h similarity index 86% rename from Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen_impl_spi.h rename to Marlin/src/lcd/dogm/status_screen_lite_ST7920_spi.h index 1a0a33be4..9c59068f4 100644 --- a/Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen_impl_spi.h +++ b/Marlin/src/lcd/dogm/status_screen_lite_ST7920_spi.h @@ -1,4 +1,4 @@ -/* +/** * Lightweight Status Screen for the RepRapDiscount Full * Graphics Smart Controller (ST7920-based 128x64 LCD) * @@ -14,7 +14,7 @@ * */ -#include "ultralcd_impl_st7920_lite_status_screen.h" +#include "status_screen_lite_ST7920_class.h" void ST7920_Lite_Status_Screen::cs() { ST7920_CS(); @@ -34,6 +34,6 @@ void ST7920_Lite_Status_Screen::sync_dat() { ST7920_SET_DAT(); } -void ST7920_Lite_Status_Screen::write_byte(uint8_t data) { - ST7920_WRITE_NIBBLES(data); -} \ No newline at end of file +void ST7920_Lite_Status_Screen::write_byte(const uint8_t data) { + ST7920_WRITE_BYTE(data); +} diff --git a/Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen.h b/Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen.h deleted file mode 100644 index dd3c71a1e..000000000 --- a/Marlin/src/lcd/dogm/ultralcd_impl_st7920_lite_status_screen.h +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Lightweight Status Screen for the RepRapDiscount Full - * Graphics Smart Controller (ST7920-based 128x64 LCD) - * - * (c) 2017 Aleph Objects, Inc. - * - * The code in this page is free software: you can - * redistribute it and/or modify it under the terms of the GNU - * General Public License (GNU GPL) as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) - * any later version. The code is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. - * - */ - -#ifndef ULTRALCD_ST7920_LITE_STATUS_H -#define ULTRALCD_ST7920_LITE_STATUS_H - -class ST7920_Lite_Status_Screen { - private: - static struct st7920_state_t { - uint8_t synced : 1; // Whether a sync has been sent - uint8_t cmd : 1; // Whether the sync was cmd or data - uint8_t extended : 1; - uint8_t graphics : 1; - uint8_t sa : 1; - } current_bits; - - static void cs(); - static void ncs(); - static void sync_cmd(); - static void sync_dat(); - static void write_byte(uint8_t w); - - static void cmd(uint8_t cmd); - static void begin_data(); - static void write_word(uint16_t w); - static void write_str(const char *str); - static void write_str(const char *str, uint8_t len); - static void write_str_P(const char *str); - static void write_str(progmem_str str); - static void write_number(uint8_t value, uint8_t digits=3); - - static void _extended_function_set(bool extended, bool graphics); - static void _scroll_or_addr_select(bool sa); - static void reset_state_from_unknown(); - - static void home(); - static void display_status(bool display_on, bool cursor_on, bool blink_on); - static void extended_function_set(bool extended); - static void graphics(bool graphics); - static void entry_mode_select(bool ac_increase, bool shift); - static void scroll_or_addr_select(bool sa); - static void set_ddram_address(uint8_t addr); - static void set_cgram_address(uint8_t addr); - static void set_gdram_address(uint8_t x, uint8_t y); - - static void clear(); - static void clear_ddram(); - static void clear_gdram(); - - static void load_cgram_icon(uint16_t addr, const void *data); - static void draw_gdram_icon(uint8_t x, uint8_t y, const void *data); - - static uint8_t string_checksum(const char *str); - - protected: - static void draw_static_elements(); - static void draw_progress_bar(uint8_t value); - static void draw_fan_icon(bool whichIcon); - static void draw_heat_icon(bool whichIcon, bool heating); - static void draw_extruder_1_temp(uint8_t temp, uint8_t target); - static void draw_extruder_2_temp(uint8_t temp, uint8_t target); - static void draw_bed_temp(uint8_t temp, uint8_t target); - static void draw_fan_speed(uint8_t value); - static void draw_print_time(uint32_t elapsed); - static void draw_feedrate_percentage(uint8_t percentage); - static void draw_status_message(const char *str); - static void draw_position(const float x, const float y, const float z, bool position_known = true); - - static bool indicators_changed(); - static bool position_changed(); - static bool blink_changed(); - static bool status_changed(); - - static void update_indicators(bool forceUpdate); - static void update_position(bool forceUpdate, bool resetChecksum); - static void update_status_or_position(bool forceUpdate); - static void update_progress(bool forceUpdate); - - public: - static void update(bool forceUpdate); - static void on_entry(); - static void on_exit(); - static void clear_text_buffer(); -}; - -/************************** ICON DEFINITIONS *************************************/ - -#define CGRAM_ICON_1_ADDR 0x00 -#define CGRAM_ICON_2_ADDR 0x10 -#define CGRAM_ICON_3_ADDR 0x20 -#define CGRAM_ICON_4_ADDR 0x30 - -#define CGRAM_ICON_1_WORD 0x00 -#define CGRAM_ICON_2_WORD 0x02 -#define CGRAM_ICON_3_WORD 0x04 -#define CGRAM_ICON_4_WORD 0x06 - -PROGMEM const uint16_t nozzle_icon[] = { - 0b0000000000000000, - 0b0000000000000000, - 0b0000111111110000, - 0b0001111111111000, - 0b0001111111111000, - 0b0001111111111000, - 0b0000111111110000, - 0b0000111111110000, - 0b0001111111111000, - 0b0001111111111000, - 0b0001111111111000, - 0b0000011111100000, - 0b0000001111000000, - 0b0000000110000000, - 0b0000000000000000, - 0b0000000000000000 -}; - -PROGMEM const uint16_t bed_icon[] = { - 0b0000000000000000, - 0b0000000000000000, - 0b0000000000000000, - 0b0000000000000000, - 0b0000000000000000, - 0b0000000000000000, - 0b0000000000000000, - 0b0000000000000000, - 0b0000000000000000, - 0b0000000000000000, - 0b0000000000000000, - 0b0000000000000000, - 0b0111111111111110, - 0b0111111111111110, - 0b0000000000000000, - 0b0000000000000000 -}; - -PROGMEM const uint16_t heat1_icon[] = { - 0b0000000000000000, - 0b0000000000000000, - 0b0010001000100000, - 0b0001000100010000, - 0b0000100010001000, - 0b0000100010001000, - 0b0001000100010000, - 0b0010001000100000, - 0b0010001000100000, - 0b0001000100010000, - 0b0000100010001000, - 0b0000000000000000, - 0b0000000000000000, - 0b0000000000000000, - 0b0000000000000000, - 0b0000000000000000 -}; - -PROGMEM const uint16_t heat2_icon[] = { - 0b0000000000000000, - 0b0000000000000000, - 0b0000100010001000, - 0b0000100010001000, - 0b0001000100010000, - 0b0010001000100000, - 0b0010001000100000, - 0b0001000100010000, - 0b0000100010001000, - 0b0000100010001000, - 0b0001000100010000, - 0b0000000000000000, - 0b0000000000000000, - 0b0000000000000000, - 0b0000000000000000, - 0b0000000000000000 -}; - -PROGMEM const uint16_t fan1_icon[] = { - 0b0000000000000000, - 0b0111111111111110, - 0b0111000000001110, - 0b0110001111000110, - 0b0100001111000010, - 0b0100000110000010, - 0b0101100000011010, - 0b0101110110111010, - 0b0101100000011010, - 0b0100000110000010, - 0b0100001111000010, - 0b0110001111000110, - 0b0111000000001110, - 0b0111111111111110, - 0b0000000000000000, - 0b0000000000000000 -}; - -PROGMEM const uint16_t fan2_icon[] = { - 0b0000000000000000, - 0b0111111111111110, - 0b0111000000001110, - 0b0110010000100110, - 0b0100111001110010, - 0b0101111001111010, - 0b0100110000110010, - 0b0100000110000010, - 0b0100110000110010, - 0b0101111001111010, - 0b0100111001110010, - 0b0110010000100110, - 0b0111000000001110, - 0b0111111111111110, - 0b0000000000000000, - 0b0000000000000000 -}; - -PROGMEM const uint16_t feedrate_icon[] = { - 0b0000000000000000, - 0b0111111000000000, - 0b0100000000000000, - 0b0100000000000000, - 0b0100000000000000, - 0b0111111011111000, - 0b0100000010000100, - 0b0100000010000100, - 0b0100000010000100, - 0b0100000011111000, - 0b0000000010001000, - 0b0000000010000100, - 0b0000000010000100, - 0b0000000010000010, - 0b0000000000000000, - 0b0000000000000000 -}; - -static void lcd_implementation_status_screen(); -static void lcd_in_status(bool inStatus); - -#endif // ULTRALCD_ST7920_LITE_STATUS_H \ No newline at end of file diff --git a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp index 39a3cc17a..c1bc4a2fc 100644 --- a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp +++ b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp @@ -183,12 +183,10 @@ uint8_t u8g_dev_st7920_128x64_rrd_buf[(LCD_PIXEL_WIDTH) * (PAGE_HEIGHT) / 8] U u8g_pb_t u8g_dev_st7920_128x64_rrd_pb = {{PAGE_HEIGHT, LCD_PIXEL_HEIGHT, 0, 0, 0}, LCD_PIXEL_WIDTH, u8g_dev_st7920_128x64_rrd_buf}; u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn, &u8g_dev_st7920_128x64_rrd_pb, &u8g_com_null_fn}; -#if ENABLED(USE_ST7920_LIGHTWEIGHT_UI) - typedef const __FlashStringHelper *progmem_str; - +#if ENABLED(LIGHTWEIGHT_UI) // We have to include the code for the lightweight UI here // as it relies on macros that are only defined in this file. - #include "ultralcd_impl_st7920_lite_status_screen_impl_spi.h" + #include "status_screen_lite_ST7920_spi.h" #endif #pragma GCC reset_options diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index b7a66e894..db13c3c3f 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -5116,23 +5116,19 @@ void lcd_update() { #endif #if ENABLED(DOGLCD) - #if defined(USE_ST7920_LIGHTWEIGHT_UI) + #if ENABLED(LIGHTWEIGHT_UI) #if ENABLED(ULTIPANEL) - bool do_U8G_loop = true; - lcd_in_status(currentScreen == lcd_status_screen); - if(currentScreen == lcd_status_screen) { - lcd_status_screen(); - do_U8G_loop = false; - } + const bool in_status = currentScreen == lcd_status_screen; #else - const bool do_U8G_loop = false; - lcd_in_status(true); - lcd_status_screen(); + constexpr bool in_status = true; #endif + const bool do_u8g_loop = !in_status; + lcd_in_status(in_status); + if (in_status) lcd_status_screen(); #else - const bool do_U8G_loop = true; + constexpr bool do_u8g_loop = true; #endif - if(do_U8G_loop) { + if (do_u8g_loop) { if (!drawing_screen) { // If not already drawing pages u8g.firstPage(); // Start the first page drawing_screen = 1; // Flag as drawing pages diff --git a/Marlin/src/lcd/ultralcd_impl_DOGM.h b/Marlin/src/lcd/ultralcd_impl_DOGM.h index 2ec7432c5..1be6084ed 100644 --- a/Marlin/src/lcd/ultralcd_impl_DOGM.h +++ b/Marlin/src/lcd/ultralcd_impl_DOGM.h @@ -54,11 +54,6 @@ #include "dogm/dogm_bitmaps.h" -#if ENABLED(USE_ST7920_LIGHTWEIGHT_UI) - typedef const __FlashStringHelper *progmem_str; - #include "dogm/ultralcd_impl_st7920_lite_status_screen_impl.h" -#endif - #if ENABLED(SDSUPPORT) #include "../libs/duration_t.h" #endif @@ -348,6 +343,12 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) { #endif // SHOW_BOOTSCREEN +#if ENABLED(LIGHTWEIGHT_UI) + #include "dogm/status_screen_lite_ST7920.h" +#else + #include "dogm/status_screen_DOGM.h" +#endif + // Initialize or re-initialize the LCD static void lcd_implementation_init() { @@ -378,7 +379,7 @@ static void lcd_implementation_init() { // The kill screen is displayed for unrecoverable conditions void lcd_kill_screen() { - #if ENABLED(USE_ST7920_LIGHTWEIGHT_UI) + #if ENABLED(LIGHTWEIGHT_UI) ST7920_Lite_Status_Screen::clear_text_buffer(); #endif const uint8_t h4 = u8g.getHeight() / 4; @@ -396,422 +397,6 @@ void lcd_kill_screen() { void lcd_implementation_clear() { } // Automatically cleared by Picture Loop -// -// Status Screen -// - -FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t x, const uint8_t y) { - const char * const str = itostr3(temp); - u8g.setPrintPos(x - (str[0] != ' ' ? 0 : str[1] != ' ' ? 1 : 2) * DOG_CHAR_WIDTH / 2, y); - lcd_print(str); - lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); -} - -#ifndef HEAT_INDICATOR_X - #define HEAT_INDICATOR_X 8 -#endif - -FORCE_INLINE void _draw_heater_status(const uint8_t x, const int8_t heater, const bool blink) { - #if !HEATER_IDLE_HANDLER - UNUSED(blink); - #endif - - #if HAS_TEMP_BED - const bool isBed = heater < 0; - #else - constexpr bool isBed = false; - #endif - - if (PAGE_UNDER(7)) { - #if HEATER_IDLE_HANDLER - const bool is_idle = (!isBed ? thermalManager.is_heater_idle(heater) : - #if HAS_TEMP_BED - thermalManager.is_bed_idle() - #else - false - #endif - ); - - if (blink || !is_idle) - #endif - _draw_centered_temp((isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater)) + 0.5, x, 7); } - - if (PAGE_CONTAINS(21, 28)) - _draw_centered_temp((isBed ? thermalManager.degBed() : thermalManager.degHotend(heater)) + 0.5, x, 28); - - if (PAGE_CONTAINS(17, 20)) { - const uint8_t h = isBed ? 7 : HEAT_INDICATOR_X, - y = isBed ? 18 : 17; - if (isBed ? thermalManager.isHeatingBed() : thermalManager.isHeatingHotend(heater)) { - u8g.setColorIndex(0); // white on black - u8g.drawBox(x + h, y, 2, 2); - u8g.setColorIndex(1); // black on white - } - else { - u8g.drawBox(x + h, y, 2, 2); - } - } -} - -FORCE_INLINE void _draw_axis_label(const AxisEnum axis, const char* const pstr, const bool blink) { - if (blink) - lcd_printPGM(pstr); - else { - if (!axis_homed[axis]) - u8g.print('?'); - else { - #if DISABLED(HOME_AFTER_DEACTIVATE) && DISABLED(DISABLE_REDUCED_ACCURACY_WARNING) - if (!axis_known_position[axis]) - u8g.print(' '); - else - #endif - lcd_printPGM(pstr); - } - } -} - -inline void lcd_implementation_status_message(const bool blink) { - #if ENABLED(STATUS_MESSAGE_SCROLLING) - static bool last_blink = false; - const uint8_t slen = lcd_strlen(lcd_status_message); - const char *stat = lcd_status_message + status_scroll_pos; - if (slen <= LCD_WIDTH) - lcd_print_utf(stat); // The string isn't scrolling - else { - if (status_scroll_pos <= slen - LCD_WIDTH) - lcd_print_utf(stat); // The string fills the screen - else { - uint8_t chars = LCD_WIDTH; - if (status_scroll_pos < slen) { // First string still visible - lcd_print_utf(stat); // The string leaves space - chars -= slen - status_scroll_pos; // Amount of space left - } - u8g.print('.'); // Always at 1+ spaces left, draw a dot - if (--chars) { - if (status_scroll_pos < slen + 1) // Draw a second dot if there's space - --chars, u8g.print('.'); - if (chars) lcd_print_utf(lcd_status_message, chars); // Print a second copy of the message - } - } - if (last_blink != blink) { - last_blink = blink; - // Skip any non-printing bytes - if (status_scroll_pos < slen) while (!PRINTABLE(lcd_status_message[status_scroll_pos])) status_scroll_pos++; - if (++status_scroll_pos >= slen + 2) status_scroll_pos = 0; - } - } - #else - UNUSED(blink); - lcd_print_utf(lcd_status_message); - #endif -} - -#if !ENABLED(USE_ST7920_LIGHTWEIGHT_UI) -static void lcd_implementation_status_screen() { - - const bool blink = lcd_blink(); - - #if FAN_ANIM_FRAMES > 2 - static bool old_blink; - static uint8_t fan_frame; - if (old_blink != blink) { - old_blink = blink; - if (!fanSpeeds[0] || ++fan_frame >= FAN_ANIM_FRAMES) fan_frame = 0; - } - #endif - - // Status Menu Font - lcd_setFont(FONT_STATUSMENU); - - // - // Fan Animation - // - // Draws the whole heading image as a B/W bitmap rather than - // drawing the elements separately. - // This was done as an optimization, as it was slower to draw - // multiple parts compared to a single bitmap. - // - // The bitmap: - // - May be offset in X - // - Includes all nozzle(s), bed(s), and the fan. - // - // TODO: - // - // - Only draw the whole header on the first - // entry to the status screen. Nozzle, bed, and - // fan outline bits don't change. - // - if (PAGE_UNDER(STATUS_SCREENHEIGHT + 1)) { - - u8g.drawBitmapP( - STATUS_SCREEN_X, STATUS_SCREEN_Y, - (STATUS_SCREENWIDTH + 7) / 8, STATUS_SCREENHEIGHT, - #if HAS_FAN0 - #if FAN_ANIM_FRAMES > 2 - fan_frame == 1 ? status_screen1_bmp : - fan_frame == 2 ? status_screen2_bmp : - #if FAN_ANIM_FRAMES > 3 - fan_frame == 3 ? status_screen3_bmp : - #endif - #else - blink && fanSpeeds[0] ? status_screen1_bmp : - #endif - #endif - status_screen0_bmp - ); - - } - - // - // Temperature Graphics and Info - // - - if (PAGE_UNDER(28)) { - // Extruders - HOTEND_LOOP() _draw_heater_status(STATUS_SCREEN_HOTEND_TEXT_X(e), e, blink); - - // Heated bed - #if HOTENDS < 4 && HAS_TEMP_BED - _draw_heater_status(STATUS_SCREEN_BED_TEXT_X, -1, blink); - #endif - - #if HAS_FAN0 - if (PAGE_CONTAINS(20, 27)) { - // Fan - const int16_t per = ((fanSpeeds[0] + 1) * 100) / 256; - if (per) { - u8g.setPrintPos(STATUS_SCREEN_FAN_TEXT_X, STATUS_SCREEN_FAN_TEXT_Y); - lcd_print(itostr3(per)); - u8g.print('%'); - } - } - #endif - } - - #if ENABLED(SDSUPPORT) - // - // SD Card Symbol - // - if (card.isFileOpen() && PAGE_CONTAINS(42 - (TALL_FONT_CORRECTION), 51 - (TALL_FONT_CORRECTION))) { - // Upper box - u8g.drawBox(42, 42 - (TALL_FONT_CORRECTION), 8, 7); // 42-48 (or 41-47) - // Right edge - u8g.drawBox(50, 44 - (TALL_FONT_CORRECTION), 2, 5); // 44-48 (or 43-47) - // Bottom hollow box - u8g.drawFrame(42, 49 - (TALL_FONT_CORRECTION), 10, 4); // 49-52 (or 48-51) - // Corner pixel - u8g.drawPixel(50, 43 - (TALL_FONT_CORRECTION)); // 43 (or 42) - } - #endif // SDSUPPORT - - #if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY) - // - // Progress bar frame - // - #define PROGRESS_BAR_X 54 - #define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X) - - if (PAGE_CONTAINS(49, 52 - (TALL_FONT_CORRECTION))) // 49-52 (or 49-51) - u8g.drawFrame( - PROGRESS_BAR_X, 49, - PROGRESS_BAR_WIDTH, 4 - (TALL_FONT_CORRECTION) - ); - - #if DISABLED(LCD_SET_PROGRESS_MANUALLY) - const uint8_t progress_bar_percent = card.percentDone(); - #endif - - if (progress_bar_percent > 1) { - - // - // Progress bar solid part - // - - if (PAGE_CONTAINS(50, 51 - (TALL_FONT_CORRECTION))) // 50-51 (or just 50) - u8g.drawBox( - PROGRESS_BAR_X + 1, 50, - (uint16_t)((PROGRESS_BAR_WIDTH - 2) * progress_bar_percent * 0.01), 2 - (TALL_FONT_CORRECTION) - ); - - // - // SD Percent Complete - // - - #if ENABLED(DOGM_SD_PERCENT) - if (PAGE_CONTAINS(41, 48)) { - // Percent complete - u8g.setPrintPos(55, 48); - u8g.print(itostr3(progress_bar_percent)); - u8g.print('%'); - } - #endif - } - - // - // Elapsed Time - // - - #if DISABLED(DOGM_SD_PERCENT) - #define SD_DURATION_X (PROGRESS_BAR_X + (PROGRESS_BAR_WIDTH / 2) - len * (DOG_CHAR_WIDTH / 2)) - #else - #define SD_DURATION_X (LCD_PIXEL_WIDTH - len * DOG_CHAR_WIDTH) - #endif - - if (PAGE_CONTAINS(41, 48)) { - char buffer[10]; - duration_t elapsed = print_job_timer.duration(); - bool has_days = (elapsed.value >= 60*60*24L); - uint8_t len = elapsed.toDigital(buffer, has_days); - u8g.setPrintPos(SD_DURATION_X, 48); - lcd_print(buffer); - } - - #endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY - - // - // XYZ Coordinates - // - - #if ENABLED(USE_SMALL_INFOFONT) - #define INFO_FONT_HEIGHT 7 - #else - #define INFO_FONT_HEIGHT 8 - #endif - - #define XYZ_BASELINE (30 + INFO_FONT_HEIGHT) - - #define X_LABEL_POS 3 - #define X_VALUE_POS 11 - #define XYZ_SPACING 40 - - #if ENABLED(XYZ_HOLLOW_FRAME) - #define XYZ_FRAME_TOP 29 - #define XYZ_FRAME_HEIGHT INFO_FONT_HEIGHT + 3 - #else - #define XYZ_FRAME_TOP 30 - #define XYZ_FRAME_HEIGHT INFO_FONT_HEIGHT + 1 - #endif - - // Before homing the axis letters are blinking 'X' <-> '?'. - // When axis is homed but axis_known_position is false the axis letters are blinking 'X' <-> ' '. - // When everything is ok you see a constant 'X'. - - static char xstring[5], ystring[5], zstring[7]; - #if ENABLED(FILAMENT_LCD_DISPLAY) - static char wstring[5], mstring[4]; - #endif - - // At the first page, regenerate the XYZ strings - if (page.page == 0) { - strcpy(xstring, ftostr4sign(LOGICAL_X_POSITION(current_position[X_AXIS]))); - strcpy(ystring, ftostr4sign(LOGICAL_Y_POSITION(current_position[Y_AXIS]))); - strcpy(zstring, ftostr52sp(FIXFLOAT(LOGICAL_Z_POSITION(current_position[Z_AXIS])))); - #if ENABLED(FILAMENT_LCD_DISPLAY) - strcpy(wstring, ftostr12ns(filament_width_meas)); - strcpy(mstring, itostr3(100.0 * ( - parser.volumetric_enabled - ? planner.volumetric_area_nominal / planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] - : planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] - ) - )); - #endif - } - - if (PAGE_CONTAINS(XYZ_FRAME_TOP, XYZ_FRAME_TOP + XYZ_FRAME_HEIGHT - 1)) { - - #if ENABLED(XYZ_HOLLOW_FRAME) - u8g.drawFrame(0, XYZ_FRAME_TOP, LCD_PIXEL_WIDTH, XYZ_FRAME_HEIGHT); // 8: 29-40 7: 29-39 - #else - u8g.drawBox(0, XYZ_FRAME_TOP, LCD_PIXEL_WIDTH, XYZ_FRAME_HEIGHT); // 8: 30-39 7: 30-37 - #endif - - if (PAGE_CONTAINS(XYZ_BASELINE - (INFO_FONT_HEIGHT - 1), XYZ_BASELINE)) { - - #if DISABLED(XYZ_HOLLOW_FRAME) - u8g.setColorIndex(0); // white on black - #endif - - u8g.setPrintPos(0 * XYZ_SPACING + X_LABEL_POS, XYZ_BASELINE); - _draw_axis_label(X_AXIS, PSTR(MSG_X), blink); - u8g.setPrintPos(0 * XYZ_SPACING + X_VALUE_POS, XYZ_BASELINE); - lcd_print(xstring); - - u8g.setPrintPos(1 * XYZ_SPACING + X_LABEL_POS, XYZ_BASELINE); - _draw_axis_label(Y_AXIS, PSTR(MSG_Y), blink); - u8g.setPrintPos(1 * XYZ_SPACING + X_VALUE_POS, XYZ_BASELINE); - lcd_print(ystring); - - u8g.setPrintPos(2 * XYZ_SPACING + X_LABEL_POS, XYZ_BASELINE); - _draw_axis_label(Z_AXIS, PSTR(MSG_Z), blink); - u8g.setPrintPos(2 * XYZ_SPACING + X_VALUE_POS, XYZ_BASELINE); - lcd_print(zstring); - - #if DISABLED(XYZ_HOLLOW_FRAME) - u8g.setColorIndex(1); // black on white - #endif - } - } - - // - // Feedrate - // - - if (PAGE_CONTAINS(51 - INFO_FONT_HEIGHT, 49)) { - lcd_setFont(FONT_MENU); - u8g.setPrintPos(3, 50); - lcd_print(LCD_STR_FEEDRATE[0]); - - lcd_setFont(FONT_STATUSMENU); - u8g.setPrintPos(12, 50); - lcd_print(itostr3(feedrate_percentage)); - u8g.print('%'); - - // - // Filament sensor display if SD is disabled - // - #if ENABLED(FILAMENT_LCD_DISPLAY) && DISABLED(SDSUPPORT) - u8g.setPrintPos(56, 50); - lcd_print(wstring); - u8g.setPrintPos(102, 50); - lcd_print(mstring); - u8g.print('%'); - lcd_setFont(FONT_MENU); - u8g.setPrintPos(47, 50); - lcd_print(LCD_STR_FILAM_DIA); - u8g.setPrintPos(93, 50); - lcd_print(LCD_STR_FILAM_MUL); - #endif - } - - // - // Status line - // - - #define STATUS_BASELINE (55 + INFO_FONT_HEIGHT) - - if (PAGE_CONTAINS(STATUS_BASELINE - (INFO_FONT_HEIGHT - 1), STATUS_BASELINE)) { - u8g.setPrintPos(0, STATUS_BASELINE); - - #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT) - if (PENDING(millis(), previous_lcd_status_ms + 5000UL)) { //Display both Status message line and Filament display on the last line - lcd_implementation_status_message(blink); - } - else { - lcd_printPGM(PSTR(LCD_STR_FILAM_DIA)); - u8g.print(':'); - lcd_print(wstring); - lcd_printPGM(PSTR(" " LCD_STR_FILAM_MUL)); - u8g.print(':'); - lcd_print(mstring); - u8g.print('%'); - } - #else - lcd_implementation_status_message(blink); - #endif - } -} -#endif - #if ENABLED(ULTIPANEL) uint8_t row_y1, row_y2;