2016-07-25 20:07:15 -05:00
|
|
|
/**
|
|
|
|
* Marlin 3D Printer Firmware
|
2020-02-03 08:00:57 -06:00
|
|
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
2016-07-25 20:07:15 -05:00
|
|
|
*
|
|
|
|
* Based on Sprinter and grbl.
|
2019-06-27 23:57:50 -05:00
|
|
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
2016-07-25 20:07:15 -05:00
|
|
|
*
|
|
|
|
* 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 <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
2018-11-03 02:13:10 -05:00
|
|
|
#pragma once
|
2016-07-25 20:07:15 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Conditionals_LCD.h
|
2016-08-22 15:02:19 -05:00
|
|
|
* Conditionals that need to be set before Configuration_adv.h or pins.h
|
2016-07-25 20:07:15 -05:00
|
|
|
*/
|
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
#if ENABLED(CARTESIO_UI)
|
2017-06-24 13:56:07 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
#define DOGLCD
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_ULTIPANEL
|
2016-07-25 20:07:15 -05:00
|
|
|
|
2017-12-15 19:05:57 -06:00
|
|
|
#elif ENABLED(ZONESTAR_LCD)
|
2017-06-10 00:12:18 -05:00
|
|
|
|
2018-11-02 22:29:32 -05:00
|
|
|
#define ADC_KEYPAD
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_RRW_KEYPAD
|
2017-10-19 00:43:07 -05:00
|
|
|
#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
|
|
|
|
#define ADC_KEY_NUM 8
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_ULTIPANEL
|
2017-06-10 00:12:18 -05:00
|
|
|
|
2019-06-18 19:34:16 -05:00
|
|
|
// This helps to implement ADC_KEYPAD menus
|
2018-11-22 06:00:00 -06:00
|
|
|
#define REVERSE_MENU_DIRECTION
|
2017-10-19 00:43:07 -05:00
|
|
|
#define ENCODER_PULSES_PER_STEP 1
|
|
|
|
#define ENCODER_STEPS_PER_MENU_ITEM 1
|
2017-11-04 21:22:53 -05:00
|
|
|
#define ENCODER_FEEDRATE_DEADZONE 2
|
2017-06-24 13:56:07 -05:00
|
|
|
|
2018-01-05 10:10:55 -06:00
|
|
|
#elif ENABLED(RADDS_DISPLAY)
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_ULTIPANEL
|
2017-12-23 14:23:05 -06:00
|
|
|
#define ENCODER_PULSES_PER_STEP 2
|
|
|
|
|
2019-07-14 09:19:29 -05:00
|
|
|
#elif EITHER(ANET_FULL_GRAPHICS_LCD, BQ_LCD_SMART_CONTROLLER)
|
2017-06-24 13:56:07 -05:00
|
|
|
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_RRD_FG_SC
|
2016-07-25 20:07:15 -05:00
|
|
|
|
2019-03-16 23:43:06 -05:00
|
|
|
#elif ANY(miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864)
|
2017-06-24 13:56:07 -05:00
|
|
|
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_ULTRA_LCD
|
2019-03-11 05:07:14 -05:00
|
|
|
#define DOGLCD
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_ULTIPANEL
|
2017-06-24 13:56:07 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
#if ENABLED(miniVIKI)
|
|
|
|
#define U8GLIB_ST7565_64128N
|
|
|
|
#elif ENABLED(VIKI2)
|
|
|
|
#define U8GLIB_ST7565_64128N
|
|
|
|
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
|
|
|
#define U8GLIB_LM6059_AF
|
|
|
|
#define SD_DETECT_INVERTED
|
|
|
|
#elif ENABLED(AZSMZ_12864)
|
|
|
|
#define U8GLIB_ST7565_64128N
|
|
|
|
#endif
|
2017-06-24 13:56:07 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
#elif ENABLED(OLED_PANEL_TINYBOY2)
|
2017-06-24 13:56:07 -05:00
|
|
|
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_U8GLIB_SSD1306
|
|
|
|
#define IS_ULTIPANEL
|
2017-06-24 13:56:07 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
#elif ENABLED(RA_CONTROL_PANEL)
|
2017-10-09 15:58:02 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
#define LCD_I2C_TYPE_PCA8574
|
|
|
|
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_ULTIPANEL
|
2017-10-09 15:58:02 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
|
2017-10-09 15:58:02 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
#define DOGLCD
|
|
|
|
#define U8GLIB_ST7920
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_ULTIPANEL
|
2017-10-09 15:58:02 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
#elif ENABLED(CR10_STOCKDISPLAY)
|
2017-10-09 15:58:02 -05:00
|
|
|
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_RRD_FG_SC
|
2017-10-19 00:43:07 -05:00
|
|
|
#ifndef ST7920_DELAY_1
|
2018-05-12 08:34:04 -05:00
|
|
|
#define ST7920_DELAY_1 DELAY_NS(125)
|
2017-10-09 15:58:02 -05:00
|
|
|
#endif
|
2017-10-19 00:43:07 -05:00
|
|
|
#ifndef ST7920_DELAY_2
|
2018-05-12 08:34:04 -05:00
|
|
|
#define ST7920_DELAY_2 DELAY_NS(125)
|
2017-03-08 19:56:01 -06:00
|
|
|
#endif
|
2017-10-19 00:43:07 -05:00
|
|
|
#ifndef ST7920_DELAY_3
|
2018-05-12 08:34:04 -05:00
|
|
|
#define ST7920_DELAY_3 DELAY_NS(125)
|
2016-07-25 20:07:15 -05:00
|
|
|
#endif
|
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
#elif ENABLED(MKS_12864OLED)
|
2017-10-09 15:58:02 -05:00
|
|
|
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_RRD_SC
|
2017-10-19 00:43:07 -05:00
|
|
|
#define U8GLIB_SH1106
|
2017-10-09 15:58:02 -05:00
|
|
|
|
2017-12-16 18:47:04 -06:00
|
|
|
#elif ENABLED(MKS_12864OLED_SSD1306)
|
|
|
|
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_RRD_SC
|
|
|
|
#define IS_U8GLIB_SSD1306
|
2017-12-16 18:47:04 -06:00
|
|
|
|
2020-01-03 20:44:16 -06:00
|
|
|
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
|
2017-10-09 15:58:02 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
#define MINIPANEL
|
2017-10-09 15:58:02 -05:00
|
|
|
|
2020-01-17 13:16:05 -06:00
|
|
|
#elif ANY(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_GENERIC_12864_1_1)
|
2019-04-09 18:34:29 -05:00
|
|
|
|
2019-05-01 20:05:29 -05:00
|
|
|
#define FYSETC_MINI_12864
|
2019-04-09 18:34:29 -05:00
|
|
|
#define DOGLCD
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_ULTIPANEL
|
2019-04-09 18:34:29 -05:00
|
|
|
#define LED_COLORS_REDUCE_GREEN
|
2019-10-22 15:43:37 -05:00
|
|
|
#if ENABLED(PSU_CONTROL) && EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1)
|
2019-06-12 21:59:39 -05:00
|
|
|
#define LED_BACKLIGHT_TIMEOUT 10000
|
|
|
|
#endif
|
2019-04-09 18:34:29 -05:00
|
|
|
|
2019-05-01 20:05:29 -05:00
|
|
|
// Require LED backlighting enabled
|
|
|
|
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
|
|
|
|
#define RGB_LED
|
|
|
|
#elif ENABLED(FYSETC_MINI_12864_2_1)
|
2019-09-30 02:11:58 -05:00
|
|
|
#define LED_CONTROL_MENU
|
2019-05-01 20:05:29 -05:00
|
|
|
#define NEOPIXEL_LED
|
2019-05-11 16:51:39 -05:00
|
|
|
#undef NEOPIXEL_TYPE
|
|
|
|
#define NEOPIXEL_TYPE NEO_RGB
|
2019-07-20 23:14:09 -05:00
|
|
|
#if NEOPIXEL_PIXELS < 3
|
|
|
|
#undef NEOPIXELS_PIXELS
|
|
|
|
#define NEOPIXEL_PIXELS 3
|
|
|
|
#endif
|
2019-05-11 16:51:39 -05:00
|
|
|
#ifndef NEOPIXEL_BRIGHTNESS
|
|
|
|
#define NEOPIXEL_BRIGHTNESS 127
|
|
|
|
#endif
|
2019-07-20 23:14:09 -05:00
|
|
|
//#define NEOPIXEL_STARTUP_TEST
|
2019-05-01 20:05:29 -05:00
|
|
|
#endif
|
|
|
|
|
2019-07-14 09:19:29 -05:00
|
|
|
#elif ENABLED(ULTI_CONTROLLER)
|
|
|
|
|
2019-08-02 06:19:45 -05:00
|
|
|
#define IS_ULTIPANEL
|
2019-07-14 09:19:29 -05:00
|
|
|
#define U8GLIB_SSD1309
|
|
|
|
#define LCD_RESET_PIN LCD_PINS_D6 // This controller need a reset pin
|
|
|
|
#define ENCODER_PULSES_PER_STEP 2
|
|
|
|
#define ENCODER_STEPS_PER_MENU_ITEM 2
|
|
|
|
|
|
|
|
#elif ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602)
|
|
|
|
|
|
|
|
#define IS_RRD_SC
|
|
|
|
#define LCD_WIDTH 16
|
|
|
|
#define LCD_HEIGHT 2
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if ENABLED(IS_RRD_FG_SC)
|
|
|
|
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
2017-10-19 00:43:07 -05:00
|
|
|
#endif
|
2016-07-25 20:07:15 -05:00
|
|
|
|
2019-03-16 23:43:06 -05:00
|
|
|
#if EITHER(MAKRPANEL, MINIPANEL)
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_ULTIPANEL
|
2017-10-19 00:43:07 -05:00
|
|
|
#define DOGLCD
|
2019-07-14 09:19:29 -05:00
|
|
|
#if ENABLED(MAKRPANEL)
|
|
|
|
#define U8GLIB_ST7565_64128N
|
|
|
|
#endif
|
2017-10-19 00:43:07 -05:00
|
|
|
#endif
|
2016-07-25 20:07:15 -05:00
|
|
|
|
2019-07-14 09:19:29 -05:00
|
|
|
#if ENABLED(IS_U8GLIB_SSD1306)
|
|
|
|
#define U8GLIB_SSD1306
|
2018-02-05 22:25:49 -06:00
|
|
|
#endif
|
|
|
|
|
2019-08-02 06:19:45 -05:00
|
|
|
#if ENABLED(OVERLORD_OLED)
|
|
|
|
#define IS_ULTIPANEL
|
|
|
|
#define U8GLIB_SH1106
|
|
|
|
/**
|
|
|
|
* PCA9632 for buzzer and LEDs via i2c
|
|
|
|
* No auto-inc, red and green leds switched, buzzer
|
|
|
|
*/
|
|
|
|
#define PCA9632
|
|
|
|
#define PCA9632_NO_AUTO_INC
|
|
|
|
#define PCA9632_GRN 0x00
|
|
|
|
#define PCA9632_RED 0x02
|
|
|
|
#define PCA9632_BUZZER
|
|
|
|
#define PCA9632_BUZZER_DATA { 0x09, 0x02 }
|
|
|
|
|
|
|
|
#define ENCODER_PULSES_PER_STEP 1 // Overlord uses buttons
|
|
|
|
#define ENCODER_STEPS_PER_MENU_ITEM 1
|
|
|
|
#endif
|
|
|
|
|
2019-02-22 19:08:36 -06:00
|
|
|
// 128x64 I2C OLED LCDs - SSD1306/SSD1309/SH1106
|
2019-03-16 23:43:06 -05:00
|
|
|
#define HAS_SSD1306_OLED_I2C ANY(U8GLIB_SSD1306, U8GLIB_SSD1309, U8GLIB_SH1106)
|
2019-02-22 19:08:36 -06:00
|
|
|
#if HAS_SSD1306_OLED_I2C
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_ULTRA_LCD
|
2019-02-22 19:08:36 -06:00
|
|
|
#define DOGLCD
|
2017-10-19 00:43:07 -05:00
|
|
|
#endif
|
2016-07-25 20:07:15 -05:00
|
|
|
|
2019-08-02 06:19:45 -05:00
|
|
|
// ST7920-based graphical displays
|
2019-03-16 23:43:06 -05:00
|
|
|
#if ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, LCD_FOR_MELZI, SILVER_GATE_GLCD_CONTROLLER)
|
2017-10-19 00:43:07 -05:00
|
|
|
#define DOGLCD
|
|
|
|
#define U8GLIB_ST7920
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_RRD_SC
|
2017-10-19 00:43:07 -05:00
|
|
|
#endif
|
2017-06-24 13:56:07 -05:00
|
|
|
|
2019-08-02 06:19:45 -05:00
|
|
|
// RepRapDiscount LCD or Graphical LCD with rotary click encoder
|
2019-07-14 09:19:29 -05:00
|
|
|
#if ENABLED(IS_RRD_SC)
|
|
|
|
#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
2017-10-19 00:43:07 -05:00
|
|
|
#endif
|
2017-06-24 13:56:07 -05:00
|
|
|
|
2019-08-02 06:19:45 -05:00
|
|
|
/**
|
|
|
|
* SPI Ultipanels
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Basic Ultipanel-like displays
|
|
|
|
#if ANY(ULTIMAKERCONTROLLER, REPRAP_DISCOUNT_SMART_CONTROLLER, G3D_PANEL, RIGIDBOT_PANEL, PANEL_ONE, U8GLIB_SH1106)
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_ULTIPANEL
|
2017-10-19 00:43:07 -05:00
|
|
|
#endif
|
2016-07-25 20:07:15 -05:00
|
|
|
|
2019-08-02 06:19:45 -05:00
|
|
|
// Einstart OLED has Cardinal nav via pins defined in pins_EINSTART-S.h
|
|
|
|
#if ENABLED(U8GLIB_SH1106_EINSTART)
|
|
|
|
#define DOGLCD
|
|
|
|
#define IS_ULTIPANEL
|
|
|
|
#endif
|
2018-07-26 05:52:22 -05:00
|
|
|
|
2019-08-02 06:19:45 -05:00
|
|
|
// FSMC/SPI TFT Panels
|
|
|
|
#if ENABLED(FSMC_GRAPHICAL_TFT)
|
|
|
|
#define DOGLCD
|
|
|
|
#define IS_ULTIPANEL
|
|
|
|
#define DELAYED_BACKLIGHT_INIT
|
|
|
|
#endif
|
2019-01-03 10:38:39 -06:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
/**
|
2019-08-02 06:19:45 -05:00
|
|
|
* I2C Panels
|
2017-10-19 00:43:07 -05:00
|
|
|
*/
|
2017-06-24 13:56:07 -05:00
|
|
|
|
2019-03-16 23:43:06 -05:00
|
|
|
#if EITHER(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004)
|
2016-08-02 17:54:33 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
#define LCD_I2C_TYPE_PCF8575
|
|
|
|
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
|
2018-02-21 00:46:25 -06:00
|
|
|
|
|
|
|
#if ENABLED(LCD_SAINSMART_I2C_2004)
|
|
|
|
#define LCD_WIDTH 20
|
|
|
|
#define LCD_HEIGHT 4
|
|
|
|
#endif
|
2017-09-26 23:34:09 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
#elif ENABLED(LCD_I2C_PANELOLU2)
|
2017-09-26 23:34:09 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
// PANELOLU2 LCD with status LEDs, separate encoder and click inputs
|
2017-09-26 23:34:09 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
#define LCD_I2C_TYPE_MCP23017
|
|
|
|
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
|
2018-02-21 00:46:25 -06:00
|
|
|
#define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (optional)
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_ULTIPANEL
|
2016-07-25 20:07:15 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
#elif ENABLED(LCD_I2C_VIKI)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
|
|
|
|
*
|
|
|
|
* This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
|
|
|
|
* Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
|
|
|
|
* Note: The pause/stop/resume LCD button pin should be connected to the Arduino
|
|
|
|
* BTN_ENC pin (or set BTN_ENC to -1 if not used)
|
|
|
|
*/
|
|
|
|
#define LCD_I2C_TYPE_MCP23017
|
|
|
|
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
|
2018-02-21 00:46:25 -06:00
|
|
|
#define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_ULTIPANEL
|
2017-10-19 00:43:07 -05:00
|
|
|
|
|
|
|
#define ENCODER_FEEDRATE_DEADZONE 4
|
|
|
|
|
|
|
|
#define STD_ENCODER_PULSES_PER_STEP 1
|
|
|
|
#define STD_ENCODER_STEPS_PER_MENU_ITEM 2
|
|
|
|
|
|
|
|
#elif ENABLED(G3D_PANEL)
|
|
|
|
|
|
|
|
#define STD_ENCODER_PULSES_PER_STEP 2
|
|
|
|
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
|
|
|
|
2019-07-14 09:19:29 -05:00
|
|
|
#elif ANY(REPRAP_DISCOUNT_SMART_CONTROLLER, miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864, OLED_PANEL_TINYBOY2, BQ_LCD_SMART_CONTROLLER, LCD_I2C_PANELOLU2)
|
2019-03-16 23:43:06 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
#define STD_ENCODER_PULSES_PER_STEP 4
|
|
|
|
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
2019-03-16 23:43:06 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef STD_ENCODER_PULSES_PER_STEP
|
2019-09-04 13:13:05 -05:00
|
|
|
#if ENABLED(TOUCH_BUTTONS)
|
2019-12-06 00:47:50 -06:00
|
|
|
#define STD_ENCODER_PULSES_PER_STEP 2
|
2019-09-04 13:13:05 -05:00
|
|
|
#else
|
|
|
|
#define STD_ENCODER_PULSES_PER_STEP 5
|
|
|
|
#endif
|
2017-10-19 00:43:07 -05:00
|
|
|
#endif
|
|
|
|
#ifndef STD_ENCODER_STEPS_PER_MENU_ITEM
|
|
|
|
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
|
|
|
#endif
|
|
|
|
#ifndef ENCODER_PULSES_PER_STEP
|
|
|
|
#define ENCODER_PULSES_PER_STEP STD_ENCODER_PULSES_PER_STEP
|
|
|
|
#endif
|
|
|
|
#ifndef ENCODER_STEPS_PER_MENU_ITEM
|
|
|
|
#define ENCODER_STEPS_PER_MENU_ITEM STD_ENCODER_STEPS_PER_MENU_ITEM
|
|
|
|
#endif
|
|
|
|
#ifndef ENCODER_FEEDRATE_DEADZONE
|
|
|
|
#define ENCODER_FEEDRATE_DEADZONE 6
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Shift register panels
|
|
|
|
// ---------------------
|
|
|
|
// 2 wire Non-latching LCD SR from:
|
|
|
|
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
|
2019-01-14 14:29:55 -06:00
|
|
|
#if ENABLED(FF_INTERFACEBOARD)
|
|
|
|
#define SR_LCD_3W_NL // Non latching 3 wire shift register
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_ULTIPANEL
|
|
|
|
#elif ENABLED(SAV_3DLCD)
|
|
|
|
#define SR_LCD_2W_NL // Non latching 2 wire shift register
|
|
|
|
#define IS_ULTIPANEL
|
2019-01-14 14:29:55 -06:00
|
|
|
#endif
|
2017-10-19 00:43:07 -05:00
|
|
|
|
2019-07-14 09:19:29 -05:00
|
|
|
#if ENABLED(IS_ULTIPANEL)
|
2017-10-19 00:43:07 -05:00
|
|
|
#define ULTIPANEL
|
|
|
|
#endif
|
|
|
|
#if ENABLED(ULTIPANEL)
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_ULTRA_LCD
|
|
|
|
#ifndef NEWPANEL
|
|
|
|
#define NEWPANEL
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if ENABLED(IS_ULTRA_LCD)
|
2017-10-19 00:43:07 -05:00
|
|
|
#define ULTRA_LCD
|
|
|
|
#endif
|
|
|
|
|
2019-07-14 09:19:29 -05:00
|
|
|
#if ENABLED(IS_RRW_KEYPAD)
|
|
|
|
#define REPRAPWORLD_KEYPAD
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Keypad needs a move step
|
|
|
|
#if ENABLED(REPRAPWORLD_KEYPAD)
|
|
|
|
#define NEWPANEL
|
|
|
|
#ifndef REPRAPWORLD_KEYPAD_MOVE_STEP
|
|
|
|
#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2019-05-07 20:32:50 -05:00
|
|
|
// Extensible UI serial touch screens. (See src/lcd/extensible_ui)
|
2019-11-23 16:53:44 -06:00
|
|
|
#if ANY(MALYAN_LCD, DGUS_LCD, TOUCH_UI_FTDI_EVE)
|
2019-07-14 09:19:29 -05:00
|
|
|
#define IS_EXTUI
|
2019-05-07 20:32:50 -05:00
|
|
|
#define EXTENSIBLE_UI
|
|
|
|
#endif
|
|
|
|
|
2018-10-23 16:00:34 -05:00
|
|
|
// Aliases for LCD features
|
|
|
|
#define HAS_SPI_LCD ENABLED(ULTRA_LCD)
|
2019-05-07 20:32:50 -05:00
|
|
|
#define HAS_DISPLAY (HAS_SPI_LCD || ENABLED(EXTENSIBLE_UI))
|
2018-11-11 12:16:24 -06:00
|
|
|
#define HAS_GRAPHICAL_LCD ENABLED(DOGLCD)
|
|
|
|
#define HAS_CHARACTER_LCD (HAS_SPI_LCD && !HAS_GRAPHICAL_LCD)
|
2018-11-09 00:07:16 -06:00
|
|
|
#define HAS_LCD_MENU (ENABLED(ULTIPANEL) && DISABLED(NO_LCD_MENUS))
|
2019-07-14 09:19:29 -05:00
|
|
|
#define HAS_ADC_BUTTONS ENABLED(ADC_KEYPAD)
|
2020-01-03 21:00:44 -06:00
|
|
|
#define HAS_DGUS_LCD ANY(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
|
2018-11-20 21:39:30 -06:00
|
|
|
|
2020-02-22 21:36:12 -06:00
|
|
|
#if HAS_GRAPHICAL_LCD
|
|
|
|
#ifndef LCD_PIXEL_WIDTH
|
|
|
|
#define LCD_PIXEL_WIDTH 128
|
|
|
|
#endif
|
|
|
|
#ifndef LCD_PIXEL_HEIGHT
|
|
|
|
#define LCD_PIXEL_HEIGHT 64
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
/**
|
|
|
|
* Extruders have some combination of stepper motors and hotends
|
|
|
|
* so we separate these concepts into the defines:
|
|
|
|
*
|
|
|
|
* EXTRUDERS - Number of Selectable Tools
|
|
|
|
* HOTENDS - Number of hotends, whether connected or separate
|
|
|
|
* E_STEPPERS - Number of actual E stepper motors
|
|
|
|
* E_MANUAL - Number of E steppers for LCD move options
|
|
|
|
*
|
|
|
|
*/
|
2019-01-31 19:10:52 -06:00
|
|
|
|
2019-03-01 01:51:24 -06:00
|
|
|
#if EXTRUDERS == 0
|
|
|
|
#undef DISTINCT_E_FACTORS
|
|
|
|
#undef SINGLENOZZLE
|
|
|
|
#undef SWITCHING_EXTRUDER
|
|
|
|
#undef SWITCHING_NOZZLE
|
|
|
|
#undef MIXING_EXTRUDER
|
|
|
|
#undef MK2_MULTIPLEXER
|
|
|
|
#undef PRUSA_MMU2
|
|
|
|
#endif
|
|
|
|
|
2019-01-31 19:10:52 -06:00
|
|
|
#if ENABLED(SWITCHING_EXTRUDER) // One stepper for every two EXTRUDERS
|
2018-02-19 10:59:23 -06:00
|
|
|
#if EXTRUDERS > 4
|
|
|
|
#define E_STEPPERS 3
|
|
|
|
#elif EXTRUDERS > 2
|
|
|
|
#define E_STEPPERS 2
|
2017-09-06 06:28:32 -05:00
|
|
|
#else
|
2018-02-19 10:59:23 -06:00
|
|
|
#define E_STEPPERS 1
|
2017-09-06 06:28:32 -05:00
|
|
|
#endif
|
2018-05-29 11:05:52 -05:00
|
|
|
#if DISABLED(SWITCHING_NOZZLE)
|
|
|
|
#define HOTENDS E_STEPPERS
|
|
|
|
#endif
|
2018-02-19 10:59:23 -06:00
|
|
|
#elif ENABLED(MIXING_EXTRUDER)
|
|
|
|
#define E_STEPPERS MIXING_STEPPERS
|
|
|
|
#define E_MANUAL 1
|
2019-02-10 04:54:23 -06:00
|
|
|
#define DUAL_MIXING_EXTRUDER (MIXING_STEPPERS == 2)
|
2018-09-08 01:43:24 -05:00
|
|
|
#elif ENABLED(SWITCHING_TOOLHEAD)
|
2018-02-19 10:59:23 -06:00
|
|
|
#define E_STEPPERS EXTRUDERS
|
|
|
|
#define E_MANUAL EXTRUDERS
|
2019-01-31 19:10:52 -06:00
|
|
|
#elif ENABLED(PRUSA_MMU2)
|
|
|
|
#define E_STEPPERS 1
|
2017-10-19 00:43:07 -05:00
|
|
|
#endif
|
2017-09-06 06:28:32 -05:00
|
|
|
|
2018-07-02 16:54:52 -05:00
|
|
|
// No inactive extruders with MK2_MULTIPLEXER or SWITCHING_NOZZLE
|
2019-03-16 23:43:06 -05:00
|
|
|
#if EITHER(MK2_MULTIPLEXER, SWITCHING_NOZZLE)
|
2018-07-02 16:54:52 -05:00
|
|
|
#undef DISABLE_INACTIVE_EXTRUDER
|
|
|
|
#endif
|
|
|
|
|
2019-01-31 19:10:52 -06:00
|
|
|
// Prusa MK2 Multiplexer and MMU 2.0 force SINGLENOZZLE
|
2019-03-16 23:43:06 -05:00
|
|
|
#if EITHER(MK2_MULTIPLEXER, PRUSA_MMU2)
|
2018-07-02 16:54:52 -05:00
|
|
|
#define SINGLENOZZLE
|
|
|
|
#endif
|
|
|
|
|
2019-03-16 23:43:06 -05:00
|
|
|
#if EITHER(SINGLENOZZLE, MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset
|
2018-05-27 17:56:21 -05:00
|
|
|
#undef HOTENDS
|
|
|
|
#define HOTENDS 1
|
|
|
|
#undef HOTEND_OFFSET_X
|
|
|
|
#undef HOTEND_OFFSET_Y
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HOTENDS
|
|
|
|
#define HOTENDS EXTRUDERS
|
|
|
|
#endif
|
|
|
|
|
2018-09-08 01:43:24 -05:00
|
|
|
#ifndef E_STEPPERS
|
|
|
|
#define E_STEPPERS EXTRUDERS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef E_MANUAL
|
|
|
|
#define E_MANUAL EXTRUDERS
|
|
|
|
#endif
|
|
|
|
|
2018-07-02 16:54:52 -05:00
|
|
|
#define HOTEND_LOOP() for (int8_t e = 0; e < HOTENDS; e++)
|
|
|
|
|
2018-05-18 13:16:59 -05:00
|
|
|
#define DO_SWITCH_EXTRUDER (ENABLED(SWITCHING_EXTRUDER) && (DISABLED(SWITCHING_NOZZLE) || SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR))
|
2019-02-04 00:19:56 -06:00
|
|
|
#define SWITCHING_NOZZLE_TWO_SERVOS defined(SWITCHING_NOZZLE_E1_SERVO_NR)
|
2018-05-18 13:16:59 -05:00
|
|
|
|
2018-08-24 21:26:29 -05:00
|
|
|
#define HAS_HOTEND_OFFSET (HOTENDS > 1)
|
2019-03-16 23:43:06 -05:00
|
|
|
#define HAS_DUPLICATION_MODE EITHER(DUAL_X_CARRIAGE, MULTI_NOZZLE_DUPLICATION)
|
2018-08-24 21:26:29 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
/**
|
|
|
|
* DISTINCT_E_FACTORS affects how some E factors are accessed
|
|
|
|
*/
|
|
|
|
#if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1
|
|
|
|
#define XYZE_N (XYZ + E_STEPPERS)
|
2019-04-11 13:58:50 -05:00
|
|
|
#define E_AXIS_N(E) AxisEnum(E_AXIS + E)
|
2019-06-29 00:23:57 -05:00
|
|
|
#define UNUSED_E(E) NOOP
|
2017-10-19 00:43:07 -05:00
|
|
|
#else
|
|
|
|
#undef DISTINCT_E_FACTORS
|
|
|
|
#define XYZE_N XYZE
|
2019-01-30 20:55:05 -06:00
|
|
|
#define E_AXIS_N(E) E_AXIS
|
2019-06-29 00:23:57 -05:00
|
|
|
#define UNUSED_E(E) UNUSED(E)
|
2017-10-19 00:43:07 -05:00
|
|
|
#endif
|
2016-08-01 23:13:13 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
/**
|
|
|
|
* The BLTouch Probe emulates a servo probe
|
|
|
|
* and uses "special" angles for its state.
|
|
|
|
*/
|
|
|
|
#if ENABLED(BLTOUCH)
|
2018-04-01 23:54:12 -05:00
|
|
|
#ifndef Z_PROBE_SERVO_NR
|
|
|
|
#define Z_PROBE_SERVO_NR 0
|
2016-12-03 22:02:27 -06:00
|
|
|
#endif
|
2017-10-19 00:43:07 -05:00
|
|
|
#ifndef NUM_SERVOS
|
2018-04-01 23:54:12 -05:00
|
|
|
#define NUM_SERVOS (Z_PROBE_SERVO_NR + 1)
|
2016-09-19 00:24:54 -05:00
|
|
|
#endif
|
2017-10-19 00:43:07 -05:00
|
|
|
#undef DEACTIVATE_SERVOS_AFTER_MOVE
|
|
|
|
#if NUM_SERVOS == 1
|
|
|
|
#undef SERVO_DELAY
|
|
|
|
#define SERVO_DELAY { 50 }
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Always disable probe pin inverting for BLTouch
|
|
|
|
#undef Z_MIN_PROBE_ENDSTOP_INVERTING
|
|
|
|
#define Z_MIN_PROBE_ENDSTOP_INVERTING false
|
|
|
|
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
|
|
|
|
#undef Z_MIN_ENDSTOP_INVERTING
|
2019-03-17 05:57:25 -05:00
|
|
|
#define Z_MIN_ENDSTOP_INVERTING false
|
2017-10-19 00:43:07 -05:00
|
|
|
#endif
|
|
|
|
#endif
|
2017-05-19 06:50:01 -05:00
|
|
|
|
2018-10-23 00:57:19 -05:00
|
|
|
#ifndef PREHEAT_1_LABEL
|
|
|
|
#define PREHEAT_1_LABEL "PLA"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PREHEAT_2_LABEL
|
2018-10-23 15:38:17 -05:00
|
|
|
#define PREHEAT_2_LABEL "ABS"
|
2018-10-23 00:57:19 -05:00
|
|
|
#endif
|
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
/**
|
2020-02-11 09:05:45 -06:00
|
|
|
* Set a flag for a servo probe (or BLTouch)
|
2017-10-19 00:43:07 -05:00
|
|
|
*/
|
2018-04-01 23:54:12 -05:00
|
|
|
#define HAS_Z_SERVO_PROBE (defined(Z_PROBE_SERVO_NR) && Z_PROBE_SERVO_NR >= 0)
|
2016-08-22 15:02:19 -05:00
|
|
|
|
2017-10-19 00:43:07 -05:00
|
|
|
/**
|
2018-04-27 00:44:47 -05:00
|
|
|
* Set flags for enabled probes
|
2017-10-19 00:43:07 -05:00
|
|
|
*/
|
2019-12-24 00:03:08 -06:00
|
|
|
#define HAS_BED_PROBE (HAS_Z_SERVO_PROBE || ANY(FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, SOLENOID_PROBE, SENSORLESS_PROBING, RACK_AND_PINION_PROBE))
|
2019-03-16 23:43:06 -05:00
|
|
|
#define PROBE_SELECTED (HAS_BED_PROBE || EITHER(PROBE_MANUALLY, MESH_BED_LEVELING))
|
2016-09-18 23:28:11 -05:00
|
|
|
|
2018-11-05 00:20:13 -06:00
|
|
|
#if HAS_BED_PROBE
|
2020-01-03 17:46:26 -06:00
|
|
|
#define HAS_PROBE_XY_OFFSET DISABLED(NOZZLE_AS_PROBE)
|
2019-10-15 13:28:04 -05:00
|
|
|
#define HAS_CUSTOM_PROBE_PIN DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
|
|
|
|
#define HOMING_Z_WITH_PROBE (Z_HOME_DIR < 0 && !HAS_CUSTOM_PROBE_PIN)
|
2018-11-05 00:20:13 -06:00
|
|
|
#ifndef Z_PROBE_LOW_POINT
|
|
|
|
#define Z_PROBE_LOW_POINT -5
|
|
|
|
#endif
|
|
|
|
#if ENABLED(Z_PROBE_ALLEN_KEY)
|
|
|
|
#define PROBE_TRIGGERED_WHEN_STOWED_TEST // Extra test for Allen Key Probe
|
|
|
|
#endif
|
2019-06-21 19:02:26 -05:00
|
|
|
#ifdef MULTIPLE_PROBING
|
|
|
|
#if EXTRA_PROBING
|
|
|
|
#define TOTAL_PROBING (MULTIPLE_PROBING + EXTRA_PROBING)
|
|
|
|
#else
|
|
|
|
#define TOTAL_PROBING MULTIPLE_PROBING
|
|
|
|
#endif
|
|
|
|
#endif
|
2018-11-05 00:20:13 -06:00
|
|
|
#else
|
2018-04-27 00:44:47 -05:00
|
|
|
// Clear probe pin settings when no probe is selected
|
2017-10-19 00:43:07 -05:00
|
|
|
#undef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
|
|
|
|
#endif
|
|
|
|
|
2018-11-03 02:13:10 -05:00
|
|
|
#ifdef GRID_MAX_POINTS_X
|
|
|
|
#define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y))
|
|
|
|
#endif
|
|
|
|
|
2020-01-19 23:35:07 -06:00
|
|
|
#define HAS_EXTRA_ENDSTOPS ANY(X_DUAL_ENDSTOPS, Y_DUAL_ENDSTOPS, Z_MULTI_ENDSTOPS)
|
2019-10-10 21:03:33 -05:00
|
|
|
#define HAS_SOFTWARE_ENDSTOPS EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
|
|
|
|
#define HAS_RESUME_CONTINUE ANY(EXTENSIBLE_UI, NEWPANEL, EMERGENCY_PARSER)
|
|
|
|
#define HAS_COLOR_LEDS ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED)
|
|
|
|
#define HAS_LEDS_OFF_FLAG (BOTH(PRINTER_EVENT_LEDS, SDSUPPORT) && HAS_RESUME_CONTINUE)
|
|
|
|
#define HAS_PRINT_PROGRESS EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY)
|
|
|
|
#define HAS_PRINT_PROGRESS_PERMYRIAD (HAS_PRINT_PROGRESS && EITHER(PRINT_PROGRESS_SHOW_DECIMALS, SHOW_REMAINING_TIME))
|
|
|
|
#define HAS_SERVICE_INTERVALS (ENABLED(PRINTCOUNTER) && (SERVICE_INTERVAL_1 > 0 || SERVICE_INTERVAL_2 > 0 || SERVICE_INTERVAL_3 > 0))
|
|
|
|
#define HAS_FILAMENT_SENSOR ENABLED(FILAMENT_RUNOUT_SENSOR)
|
2017-03-16 17:20:24 -05:00
|
|
|
|
2019-04-04 03:06:19 -05:00
|
|
|
#define HAS_GAMES ANY(MARLIN_BRICKOUT, MARLIN_INVADERS, MARLIN_SNAKE, MARLIN_MAZE)
|
|
|
|
#define HAS_GAME_MENU (1 < ENABLED(MARLIN_BRICKOUT) + ENABLED(MARLIN_INVADERS) + ENABLED(MARLIN_SNAKE) + ENABLED(MARLIN_MAZE))
|
2018-06-19 11:55:49 -05:00
|
|
|
|
2019-07-03 02:43:33 -05:00
|
|
|
#define IS_SCARA ENABLED(MORGAN_SCARA)
|
2018-11-03 02:13:10 -05:00
|
|
|
#define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)
|
|
|
|
#define IS_CARTESIAN !IS_KINEMATIC
|
2019-01-27 22:43:13 -06:00
|
|
|
|
2019-02-03 01:29:00 -06:00
|
|
|
#ifndef INVERT_X_DIR
|
|
|
|
#define INVERT_X_DIR false
|
|
|
|
#endif
|
|
|
|
#ifndef INVERT_Y_DIR
|
|
|
|
#define INVERT_Y_DIR false
|
|
|
|
#endif
|
|
|
|
#ifndef INVERT_Z_DIR
|
|
|
|
#define INVERT_Z_DIR false
|
|
|
|
#endif
|
|
|
|
#ifndef INVERT_E_DIR
|
|
|
|
#define INVERT_E_DIR false
|
|
|
|
#endif
|
2019-02-12 15:55:47 -06:00
|
|
|
|
2019-04-10 17:14:57 -05:00
|
|
|
#if ENABLED(SLIM_LCD_MENUS)
|
|
|
|
#define BOOT_MARLIN_LOGO_SMALL
|
|
|
|
#endif
|
2019-04-19 20:11:51 -05:00
|
|
|
|
2019-10-15 14:18:46 -05:00
|
|
|
#define IS_RE_ARM_BOARD MB(RAMPS_14_RE_ARM_EFB, RAMPS_14_RE_ARM_EEB, RAMPS_14_RE_ARM_EFF, RAMPS_14_RE_ARM_EEF, RAMPS_14_RE_ARM_SF)
|
2019-07-28 14:48:29 -05:00
|
|
|
|
2019-10-08 19:42:18 -05:00
|
|
|
#define HAS_LINEAR_E_JERK (DISABLED(CLASSIC_JERK) && ENABLED(LIN_ADVANCE))
|
2019-10-09 19:44:49 -05:00
|
|
|
|
|
|
|
#ifndef SPI_SPEED
|
|
|
|
#define SPI_SPEED SPI_FULL_SPEED
|
|
|
|
#endif
|