From 93ea281061590ca5b222a44dab25e903ddb94401 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 25 Jul 2016 18:07:15 -0700 Subject: [PATCH 01/13] Split up Conditionals.h into two files Rather than include twice, which is tricky but may confuse --- Marlin/Conditionals.h | 281 +----------------- Marlin/Conditionals_LCD.h | 270 +++++++++++++++++ Marlin/Configuration_adv.h | 2 +- .../Cartesio/Configuration_adv.h | 2 +- .../Felix/Configuration_adv.h | 2 +- .../Hephestos/Configuration_adv.h | 2 +- .../Hephestos_2/Configuration_adv.h | 2 +- .../K8200/Configuration_adv.h | 2 +- .../K8400/Configuration_adv.h | 2 +- .../RigidBot/Configuration_adv.h | 2 +- .../SCARA/Configuration_adv.h | 2 +- .../TAZ4/Configuration_adv.h | 2 +- .../WITBOX/Configuration_adv.h | 2 +- .../delta/biv2.5/Configuration_adv.h | 2 +- .../delta/generic/Configuration_adv.h | 2 +- .../delta/kossel_mini/Configuration_adv.h | 2 +- .../delta/kossel_pro/Configuration_adv.h | 2 +- .../delta/kossel_xl/Configuration_adv.h | 2 +- .../makibox/Configuration_adv.h | 2 +- .../tvrrug/Round2/Configuration_adv.h | 2 +- Marlin/macros.h | 3 + 21 files changed, 307 insertions(+), 283 deletions(-) create mode 100644 Marlin/Conditionals_LCD.h diff --git a/Marlin/Conditionals.h b/Marlin/Conditionals.h index 9ab609ad5f..e593d79c95 100644 --- a/Marlin/Conditionals.h +++ b/Marlin/Conditionals.h @@ -26,273 +26,16 @@ */ #ifndef CONDITIONALS_H - -/** -* Miscellaneous -*/ -#ifndef M_PI - #define M_PI 3.1415926536 -#endif - -/** - * This value is used by M109 when tying to calculate a ballpark safe margin - * to prevent wait-forever situation. - */ -#ifndef EXTRUDE_MINTEMP - #define EXTRUDE_MINTEMP 170 -#endif - -#ifndef CONFIGURATION_LCD // Get the LCD defines which are needed first -#define CONFIGURATION_LCD - - #define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT)) - - #if ENABLED(CARTESIO_UI) - #define DOGLCD - #define ULTIPANEL - #define NEWPANEL - #define DEFAULT_LCD_CONTRAST 90 - #define LCD_CONTRAST_MIN 60 - #define LCD_CONTRAST_MAX 140 - #endif - - #if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL) - #define DOGLCD - #define ULTIPANEL - #define NEWPANEL - #define DEFAULT_LCD_CONTRAST 17 - #endif - - #if ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) - #define ULTRA_LCD //general LCD support, also 16x2 - #define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) - #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store. - - #if ENABLED(miniVIKI) - #define LCD_CONTRAST_MIN 75 - #define LCD_CONTRAST_MAX 115 - #define DEFAULT_LCD_CONTRAST 95 - #elif ENABLED(VIKI2) - #define DEFAULT_LCD_CONTRAST 40 - #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) - #define LCD_CONTRAST_MIN 90 - #define LCD_CONTRAST_MAX 130 - #define DEFAULT_LCD_CONTRAST 110 - #define U8GLIB_LM6059_AF - #define SD_DETECT_INVERTED - #endif - - #define ENCODER_PULSES_PER_STEP 4 - #define ENCODER_STEPS_PER_MENU_ITEM 1 - #endif - - // Generic support for SSD1306 / SH1106 OLED based LCDs. - #if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SH1106) - #define ULTRA_LCD //general LCD support, also 16x2 - #define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 / SH1106 graphic Display Family) - #endif - - #if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106) - #define ULTIMAKERCONTROLLER - #endif - - #if ENABLED(BQ_LCD_SMART_CONTROLLER) - #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - - #ifndef ENCODER_PULSES_PER_STEP - #define ENCODER_PULSES_PER_STEP 4 - #endif - - #ifndef ENCODER_STEPS_PER_MENU_ITEM - #define ENCODER_STEPS_PER_MENU_ITEM 1 - #endif - - #ifndef LONG_FILENAME_HOST_SUPPORT - #define LONG_FILENAME_HOST_SUPPORT - #endif - #endif - - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define DOGLCD - #define U8GLIB_ST7920 - #define REPRAP_DISCOUNT_SMART_CONTROLLER - #endif - - #if ENABLED(ULTIMAKERCONTROLLER) \ - || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \ - || ENABLED(G3D_PANEL) \ - || ENABLED(RIGIDBOT_PANEL) \ - || ENABLED(REPRAPWORLD_KEYPAD) - #define ULTIPANEL - #define NEWPANEL - #endif - - #if ENABLED(RA_CONTROL_PANEL) - #define LCD_I2C_TYPE_PCA8574 - #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander - #define ULTIPANEL - #define NEWPANEL - #endif - - #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #define DOGLCD - #define U8GLIB_ST7920 - #define ULTIPANEL - #define NEWPANEL - #endif - - /** - * I2C PANELS - */ - - #if ENABLED(LCD_I2C_SAINSMART_YWROBOT) - // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home ) - // Make sure it is placed in the Arduino libraries directory. - #define LCD_I2C_TYPE_PCF8575 - #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander - #define ULTIPANEL - #define NEWPANEL - #endif - - // PANELOLU2 LCD with status LEDs, separate encoder and click inputs - #if ENABLED(LCD_I2C_PANELOLU2) - #define LCD_I2C_TYPE_MCP23017 - #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander - #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD - - #ifndef ENCODER_PULSES_PER_STEP - #define ENCODER_PULSES_PER_STEP 4 - #endif - - #ifndef ENCODER_STEPS_PER_MENU_ITEM - #define ENCODER_STEPS_PER_MENU_ITEM 1 - #endif - - #define ULTIPANEL - #define NEWPANEL - #endif - - // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs - #if ENABLED(LCD_I2C_VIKI) - // 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 - #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later) - #define ULTIPANEL - #define NEWPANEL - #endif - - // Shift register panels - // --------------------- - // 2 wire Non-latching LCD SR from: - // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection - - #if ENABLED(SAV_3DLCD) - #define SR_LCD_2W_NL // Non latching 2 wire shift register - #define ULTIPANEL - #define NEWPANEL - #endif - - #if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display - #ifndef LCD_WIDTH - #define LCD_WIDTH 22 - #endif - #ifndef LCD_HEIGHT - #define LCD_HEIGHT 5 - #endif - #endif - - #if ENABLED(ULTIPANEL) - #define NEWPANEL //enable this if you have a click-encoder panel - #define ULTRA_LCD - #ifndef LCD_WIDTH - #define LCD_WIDTH 20 - #endif - #ifndef LCD_HEIGHT - #define LCD_HEIGHT 4 - #endif - #else //no panel but just LCD - #if ENABLED(ULTRA_LCD) - #ifndef LCD_WIDTH - #define LCD_WIDTH 16 - #endif - #ifndef LCD_HEIGHT - #define LCD_HEIGHT 2 - #endif - #endif - #endif - - #if ENABLED(DOGLCD) - /* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */ - // \x00 intentionally skipped to avoid problems in strings - #define LCD_STR_REFRESH "\x01" - #define LCD_STR_FOLDER "\x02" - #define LCD_STR_ARROW_RIGHT "\x03" - #define LCD_STR_UPLEVEL "\x04" - #define LCD_STR_CLOCK "\x05" - #define LCD_STR_FEEDRATE "\x06" - #define LCD_STR_BEDTEMP "\x07" - #define LCD_STR_THERMOMETER "\x08" - #define LCD_STR_DEGREE "\x09" - - #define LCD_STR_SPECIAL_MAX '\x09' - // Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin. - // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here. - #else - /* Custom characters defined in the first 8 characters of the LCD */ - #define LCD_STR_BEDTEMP "\x00" // Print only as a char. This will have 'unexpected' results when used in a string! - #define LCD_STR_DEGREE "\x01" - #define LCD_STR_THERMOMETER "\x02" - #define LCD_STR_UPLEVEL "\x03" - #define LCD_STR_REFRESH "\x04" - #define LCD_STR_FOLDER "\x05" - #define LCD_STR_FEEDRATE "\x06" - #define LCD_STR_CLOCK "\x07" - #define LCD_STR_ARROW_RIGHT ">" /* from the default character set */ - #endif - - /** - * Default LCD contrast for dogm-like LCD displays - */ - #if ENABLED(DOGLCD) - - #define HAS_LCD_CONTRAST ( \ - ENABLED(MAKRPANEL) \ - || ENABLED(CARTESIO_UI) \ - || ENABLED(VIKI2) \ - || ENABLED(miniVIKI) \ - || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \ - ) - - #if HAS_LCD_CONTRAST - #ifndef LCD_CONTRAST_MIN - #define LCD_CONTRAST_MIN 0 - #endif - #ifndef LCD_CONTRAST_MAX - #define LCD_CONTRAST_MAX 63 - #endif - #ifndef DEFAULT_LCD_CONTRAST - #define DEFAULT_LCD_CONTRAST 32 - #endif - #endif - #endif - - #ifndef BOOTSCREEN_TIMEOUT - #define BOOTSCREEN_TIMEOUT 2500 - #endif - -#else // CONFIGURATION_LCD - - #define CONDITIONALS_H +#define CONDITIONALS_H #include "pins.h" #ifndef USBCON #define HardwareSerial_h // trick to disable the standard HWserial #endif + #include "Arduino.h" + + #include "macros.h" #if ENABLED(EMERGENCY_PARSER) #define EMERGENCY_PARSER_CAPABILITIES " EMERGENCY_CODES:M108,M112,M410" @@ -300,8 +43,6 @@ #define EMERGENCY_PARSER_CAPABILITIES "" #endif - #include "Arduino.h" - /** * Set ENDSTOPPULLUPS for unused endstop switches */ @@ -747,6 +488,7 @@ #define HAS_E3_STEP (PIN_EXISTS(E3_STEP)) #define HAS_E4_STEP (PIN_EXISTS(E4_STEP)) #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS)) + #define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER)) #define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E)) @@ -754,6 +496,14 @@ #define HAS_THERMALLY_PROTECTED_BED (HAS_TEMP_BED && HAS_HEATER_BED && ENABLED(THERMAL_PROTECTION_BED)) + /** + * This value is used by M109 when trying to calculate a ballpark safe margin + * to prevent wait-forever situation. + */ + #ifndef EXTRUDE_MINTEMP + #define EXTRUDE_MINTEMP 170 + #endif + /** * Helper Macros for heaters and extruder fan */ @@ -801,7 +551,9 @@ #endif #define WRITE_FAN_N(n, v) WRITE_FAN##n(v) - #define HAS_BUZZER (PIN_EXISTS(BEEPER) || defined(LCD_USE_I2C_BUZZER)) + /** + * Servos and probes + */ #if HAS_SERVOS #ifndef Z_ENDSTOP_SERVO_NR @@ -923,5 +675,4 @@ #define Z_RAISE_BETWEEN_PROBING MIN_Z_HEIGHT_FOR_HOMING #endif -#endif //CONFIGURATION_LCD #endif //CONDITIONALS_H diff --git a/Marlin/Conditionals_LCD.h b/Marlin/Conditionals_LCD.h new file mode 100644 index 0000000000..60ed5ce6e1 --- /dev/null +++ b/Marlin/Conditionals_LCD.h @@ -0,0 +1,270 @@ +/** + * 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 . + * + */ + +/** + * Conditionals_LCD.h + * LCD Defines that depend on configuration but are not editable. + */ + +#ifndef CONDITIONALS_LCD_H // Get the LCD defines which are needed first +#define CONDITIONALS_LCD_H + + #define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT)) + + #if ENABLED(CARTESIO_UI) + #define DOGLCD + #define ULTIPANEL + #define NEWPANEL + #define DEFAULT_LCD_CONTRAST 90 + #define LCD_CONTRAST_MIN 60 + #define LCD_CONTRAST_MAX 140 + #endif + + #if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL) + #define DOGLCD + #define ULTIPANEL + #define NEWPANEL + #define DEFAULT_LCD_CONTRAST 17 + #endif + + #if ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) + #define ULTRA_LCD //general LCD support, also 16x2 + #define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) + #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store. + + #if ENABLED(miniVIKI) + #define LCD_CONTRAST_MIN 75 + #define LCD_CONTRAST_MAX 115 + #define DEFAULT_LCD_CONTRAST 95 + #elif ENABLED(VIKI2) + #define DEFAULT_LCD_CONTRAST 40 + #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) + #define LCD_CONTRAST_MIN 90 + #define LCD_CONTRAST_MAX 130 + #define DEFAULT_LCD_CONTRAST 110 + #define U8GLIB_LM6059_AF + #define SD_DETECT_INVERTED + #endif + + #define ENCODER_PULSES_PER_STEP 4 + #define ENCODER_STEPS_PER_MENU_ITEM 1 + #endif + + // Generic support for SSD1306 / SH1106 OLED based LCDs. + #if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SH1106) + #define ULTRA_LCD //general LCD support, also 16x2 + #define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 / SH1106 graphic Display Family) + #endif + + #if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106) + #define ULTIMAKERCONTROLLER + #endif + + #if ENABLED(BQ_LCD_SMART_CONTROLLER) + #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + + #ifndef ENCODER_PULSES_PER_STEP + #define ENCODER_PULSES_PER_STEP 4 + #endif + + #ifndef ENCODER_STEPS_PER_MENU_ITEM + #define ENCODER_STEPS_PER_MENU_ITEM 1 + #endif + + #ifndef LONG_FILENAME_HOST_SUPPORT + #define LONG_FILENAME_HOST_SUPPORT + #endif + #endif + + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define DOGLCD + #define U8GLIB_ST7920 + #define REPRAP_DISCOUNT_SMART_CONTROLLER + #endif + + #if ENABLED(ULTIMAKERCONTROLLER) \ + || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \ + || ENABLED(G3D_PANEL) \ + || ENABLED(RIGIDBOT_PANEL) \ + || ENABLED(REPRAPWORLD_KEYPAD) + #define ULTIPANEL + #define NEWPANEL + #endif + + #if ENABLED(RA_CONTROL_PANEL) + #define LCD_I2C_TYPE_PCA8574 + #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander + #define ULTIPANEL + #define NEWPANEL + #endif + + #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) + #define DOGLCD + #define U8GLIB_ST7920 + #define ULTIPANEL + #define NEWPANEL + #endif + + /** + * I2C PANELS + */ + + #if ENABLED(LCD_I2C_SAINSMART_YWROBOT) + // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home ) + // Make sure it is placed in the Arduino libraries directory. + #define LCD_I2C_TYPE_PCF8575 + #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander + #define ULTIPANEL + #define NEWPANEL + #endif + + // PANELOLU2 LCD with status LEDs, separate encoder and click inputs + #if ENABLED(LCD_I2C_PANELOLU2) + #define LCD_I2C_TYPE_MCP23017 + #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander + #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD + + #ifndef ENCODER_PULSES_PER_STEP + #define ENCODER_PULSES_PER_STEP 4 + #endif + + #ifndef ENCODER_STEPS_PER_MENU_ITEM + #define ENCODER_STEPS_PER_MENU_ITEM 1 + #endif + + #define ULTIPANEL + #define NEWPANEL + #endif + + // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs + #if ENABLED(LCD_I2C_VIKI) + // 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 + #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later) + #define ULTIPANEL + #define NEWPANEL + #endif + + // Shift register panels + // --------------------- + // 2 wire Non-latching LCD SR from: + // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection + + #if ENABLED(SAV_3DLCD) + #define SR_LCD_2W_NL // Non latching 2 wire shift register + #define ULTIPANEL + #define NEWPANEL + #endif + + #if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display + #ifndef LCD_WIDTH + #define LCD_WIDTH 22 + #endif + #ifndef LCD_HEIGHT + #define LCD_HEIGHT 5 + #endif + #endif + + #if ENABLED(ULTIPANEL) + #define NEWPANEL //enable this if you have a click-encoder panel + #define ULTRA_LCD + #ifndef LCD_WIDTH + #define LCD_WIDTH 20 + #endif + #ifndef LCD_HEIGHT + #define LCD_HEIGHT 4 + #endif + #else //no panel but just LCD + #if ENABLED(ULTRA_LCD) + #ifndef LCD_WIDTH + #define LCD_WIDTH 16 + #endif + #ifndef LCD_HEIGHT + #define LCD_HEIGHT 2 + #endif + #endif + #endif + + #if ENABLED(DOGLCD) + /* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */ + // \x00 intentionally skipped to avoid problems in strings + #define LCD_STR_REFRESH "\x01" + #define LCD_STR_FOLDER "\x02" + #define LCD_STR_ARROW_RIGHT "\x03" + #define LCD_STR_UPLEVEL "\x04" + #define LCD_STR_CLOCK "\x05" + #define LCD_STR_FEEDRATE "\x06" + #define LCD_STR_BEDTEMP "\x07" + #define LCD_STR_THERMOMETER "\x08" + #define LCD_STR_DEGREE "\x09" + + #define LCD_STR_SPECIAL_MAX '\x09' + // Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin. + // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here. + #else + /* Custom characters defined in the first 8 characters of the LCD */ + #define LCD_STR_BEDTEMP "\x00" // Print only as a char. This will have 'unexpected' results when used in a string! + #define LCD_STR_DEGREE "\x01" + #define LCD_STR_THERMOMETER "\x02" + #define LCD_STR_UPLEVEL "\x03" + #define LCD_STR_REFRESH "\x04" + #define LCD_STR_FOLDER "\x05" + #define LCD_STR_FEEDRATE "\x06" + #define LCD_STR_CLOCK "\x07" + #define LCD_STR_ARROW_RIGHT ">" /* from the default character set */ + #endif + + /** + * Default LCD contrast for dogm-like LCD displays + */ + #if ENABLED(DOGLCD) + + #define HAS_LCD_CONTRAST ( \ + ENABLED(MAKRPANEL) \ + || ENABLED(CARTESIO_UI) \ + || ENABLED(VIKI2) \ + || ENABLED(miniVIKI) \ + || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \ + ) + + #if HAS_LCD_CONTRAST + #ifndef LCD_CONTRAST_MIN + #define LCD_CONTRAST_MIN 0 + #endif + #ifndef LCD_CONTRAST_MAX + #define LCD_CONTRAST_MAX 63 + #endif + #ifndef DEFAULT_LCD_CONTRAST + #define DEFAULT_LCD_CONTRAST 32 + #endif + #endif + #endif + + #ifndef BOOTSCREEN_TIMEOUT + #define BOOTSCREEN_TIMEOUT 2500 + #endif + +#endif //CONDITIONALS_LCD_H diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index fde6524e80..3f8bddb6c7 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -46,7 +46,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index 4229d54876..8cf533f939 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -46,7 +46,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index bc9b589fe1..4089b4749b 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -46,7 +46,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index bd6f99e8b3..067f7d5a30 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -46,7 +46,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h index 6d017cde38..9f71aa3d01 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h @@ -46,7 +46,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index 45c8cfb801..bf8b220f81 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -52,7 +52,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/example_configurations/K8400/Configuration_adv.h b/Marlin/example_configurations/K8400/Configuration_adv.h index 4cb3565204..c3e10cd13c 100644 --- a/Marlin/example_configurations/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/K8400/Configuration_adv.h @@ -46,7 +46,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index 686a9d5f1c..8b4a6efbe8 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -46,7 +46,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index e6f63af5f9..d25cdbe5e0 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -46,7 +46,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/example_configurations/TAZ4/Configuration_adv.h b/Marlin/example_configurations/TAZ4/Configuration_adv.h index 93c0418605..33be9e9a4d 100644 --- a/Marlin/example_configurations/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/TAZ4/Configuration_adv.h @@ -46,7 +46,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index bd6f99e8b3..067f7d5a30 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -46,7 +46,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h index 91b4ac3f21..b4277bff36 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h @@ -46,7 +46,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 5995579ee0..129a454edc 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -46,7 +46,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index a29745937b..06064bf99c 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -46,7 +46,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 534779c181..6ea5339ac8 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -51,7 +51,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index 38a0542b6c..dff1353dda 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -46,7 +46,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 0c5b2da028..de923d9a44 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -46,7 +46,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 28269ec263..0fac6a8397 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -46,7 +46,7 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals.h" +#include "Conditionals_LCD.h" // @section temperature diff --git a/Marlin/macros.h b/Marlin/macros.h index bf2d07180b..f8c4735ebf 100644 --- a/Marlin/macros.h +++ b/Marlin/macros.h @@ -34,6 +34,9 @@ #define SET_BIT(n,b,value) (n) ^= ((-value)^(n)) & (_BV(b)) // Macros for maths shortcuts +#ifndef M_PI + #define M_PI 3.14159265358979323846 +#endif #define RADIANS(d) ((d)*M_PI/180.0) #define DEGREES(r) ((r)*180.0/M_PI) #define HYPOT(x,y) sqrt(sq(x)+sq(y)) From df27d01cd9d0e33a7f0f94c1c6cee8db930c5fcf Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 25 Jul 2016 20:53:36 -0700 Subject: [PATCH 02/13] Arrange needed includes in Marlin.h --- Marlin/Marlin.h | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 53a66edfb7..fec377644f 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -41,26 +41,28 @@ #include "fastio.h" #include "Configuration.h" -#include "pins.h" - -#include "utility.h" #ifndef SANITYCHECK_H #error "Your Configuration.h and Configuration_adv.h files are outdated!" #endif -#include "Arduino.h" - #include "enum.h" +#include "utility.h" typedef unsigned long millis_t; #ifdef USBCON #include "HardwareSerial.h" + #if ENABLED(BLUETOOTH) + #define MYSERIAL bluetoothSerial + #else + #define MYSERIAL Serial + #endif // BLUETOOTH +#else + #include "MarlinSerial.h" + #define MYSERIAL customizedSerial #endif -#include "MarlinSerial.h" - #include "WString.h" #if ENABLED(PRINTCOUNTER) @@ -69,16 +71,6 @@ typedef unsigned long millis_t; #include "stopwatch.h" #endif -#ifdef USBCON - #if ENABLED(BLUETOOTH) - #define MYSERIAL bluetoothSerial - #else - #define MYSERIAL Serial - #endif // BLUETOOTH -#else - #define MYSERIAL customizedSerial -#endif - #define SERIAL_CHAR(x) MYSERIAL.write(x) #define SERIAL_EOL SERIAL_CHAR('\n') From 2d378fac1bfad5ad1915256df7e2dec112bba12f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 25 Jul 2016 22:43:50 -0700 Subject: [PATCH 03/13] No need to include thermistortables.h in Configuration.h --- Marlin/Configuration.h | 1 - Marlin/example_configurations/Cartesio/Configuration.h | 1 - Marlin/example_configurations/Felix/Configuration.h | 1 - Marlin/example_configurations/Felix/DUAL/Configuration.h | 1 - Marlin/example_configurations/Hephestos/Configuration.h | 1 - Marlin/example_configurations/Hephestos_2/Configuration.h | 1 - Marlin/example_configurations/K8200/Configuration.h | 1 - Marlin/example_configurations/K8400/Configuration.h | 1 - Marlin/example_configurations/K8400/Dual-head/Configuration.h | 1 - .../RepRapWorld/Megatronics/Configuration.h | 1 - Marlin/example_configurations/RigidBot/Configuration.h | 1 - Marlin/example_configurations/SCARA/Configuration.h | 1 - Marlin/example_configurations/TAZ4/Configuration.h | 1 - Marlin/example_configurations/WITBOX/Configuration.h | 1 - Marlin/example_configurations/adafruit/ST7565/Configuration.h | 1 - Marlin/example_configurations/delta/biv2.5/Configuration.h | 1 - Marlin/example_configurations/delta/generic/Configuration.h | 1 - Marlin/example_configurations/delta/kossel_mini/Configuration.h | 1 - Marlin/example_configurations/delta/kossel_pro/Configuration.h | 1 - Marlin/example_configurations/delta/kossel_xl/Configuration.h | 1 - Marlin/example_configurations/makibox/Configuration.h | 1 - Marlin/example_configurations/tvrrug/Round2/Configuration.h | 1 - Marlin/temperature.cpp | 1 + Marlin/temperature.h | 1 + 24 files changed, 2 insertions(+), 22 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 1ab5eddb14..8c3677f7ec 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1344,6 +1344,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index feaaefa172..dc77b4074c 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -1338,6 +1338,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 0fc8563084..a870c5d5ef 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -1321,6 +1321,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index 602a1b55e3..1c057f46da 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -1319,6 +1319,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index f6a2f1def2..542357bc38 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -1330,6 +1330,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index 73878728da..d15133b2bd 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -1332,6 +1332,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 61d704467b..85e4833d5e 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -1355,6 +1355,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/K8400/Configuration.h b/Marlin/example_configurations/K8400/Configuration.h index b86d146f01..b6009f9d02 100644 --- a/Marlin/example_configurations/K8400/Configuration.h +++ b/Marlin/example_configurations/K8400/Configuration.h @@ -1338,6 +1338,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/K8400/Dual-head/Configuration.h index a1d4d7d616..5f23ca5fe8 100644 --- a/Marlin/example_configurations/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/K8400/Dual-head/Configuration.h @@ -1338,6 +1338,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index d09a463145..04ef83f2a5 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -1338,6 +1338,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 57f0f455ee..2854c7db6d 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -1338,6 +1338,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 6c3e2de8f1..6f67df5324 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -1346,6 +1346,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index 6cac78e91a..6e598b902c 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -1359,6 +1359,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 8f15e51e6d..3f41cdb486 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -1330,6 +1330,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 0ec16f57bc..bccd131e27 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -1338,6 +1338,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index 67c55aaadd..79176f7290 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -1430,6 +1430,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index e257309522..5a6811ff81 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -1424,6 +1424,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index fa7aabddce..b99db5651f 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -1427,6 +1427,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 13898efc0f..6de65a2735 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -1427,6 +1427,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index f7a5d84746..6edd5da924 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -1430,6 +1430,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 6c91f2888e..e68e10e712 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -1341,6 +1341,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index a7e3f04f8c..f77512a0ff 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -1332,6 +1332,5 @@ #endif #include "Configuration_adv.h" -#include "thermistortables.h" #endif //CONFIGURATION_H diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 666edd90f9..172014e7f1 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -27,6 +27,7 @@ #include "Marlin.h" #include "ultralcd.h" #include "temperature.h" +#include "thermistortables.h" #include "language.h" #include "Sd2PinMap.h" diff --git a/Marlin/temperature.h b/Marlin/temperature.h index 8fab0db3dd..47d6af2738 100644 --- a/Marlin/temperature.h +++ b/Marlin/temperature.h @@ -29,6 +29,7 @@ #include "Marlin.h" #include "planner.h" +#include "thermistortables.h" #if ENABLED(PID_ADD_EXTRUSION_RATE) #include "stepper.h" From c6226bb0aa578ead548863b3d0af75276a81efe6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 25 Jul 2016 23:04:19 -0700 Subject: [PATCH 04/13] Unify config in a single include without nested includes --- Marlin/Configuration.h | 4 +-- Marlin/Configuration_adv.h | 7 +--- Marlin/Marlin.h | 3 +- Marlin/Marlin.ino | 3 +- Marlin/MarlinConfig.h | 32 +++++++++++++++++++ Marlin/configuration_store.h | 2 +- Marlin/dac_mcp4728.h | 3 +- Marlin/digipot_mcp4451.cpp | 2 +- .../Cartesio/Configuration.h | 4 +-- .../Cartesio/Configuration_adv.h | 7 +--- .../Felix/Configuration.h | 4 +-- .../Felix/Configuration_adv.h | 7 +--- .../Felix/DUAL/Configuration.h | 4 +-- .../Hephestos/Configuration.h | 4 +-- .../Hephestos/Configuration_adv.h | 7 +--- .../Hephestos_2/Configuration.h | 4 +-- .../Hephestos_2/Configuration_adv.h | 7 +--- .../K8200/Configuration.h | 4 +-- .../K8200/Configuration_adv.h | 7 +--- .../K8400/Configuration.h | 4 +-- .../K8400/Configuration_adv.h | 7 +--- .../K8400/Dual-head/Configuration.h | 4 +-- .../RepRapWorld/Megatronics/Configuration.h | 4 +-- .../RigidBot/Configuration.h | 4 +-- .../RigidBot/Configuration_adv.h | 7 +--- .../SCARA/Configuration.h | 4 +-- .../SCARA/Configuration_adv.h | 7 +--- .../TAZ4/Configuration.h | 4 +-- .../TAZ4/Configuration_adv.h | 7 +--- .../WITBOX/Configuration.h | 4 +-- .../WITBOX/Configuration_adv.h | 7 +--- .../adafruit/ST7565/Configuration.h | 4 +-- .../delta/biv2.5/Configuration.h | 4 +-- .../delta/biv2.5/Configuration_adv.h | 7 +--- .../delta/generic/Configuration.h | 4 +-- .../delta/generic/Configuration_adv.h | 7 +--- .../delta/kossel_mini/Configuration.h | 4 +-- .../delta/kossel_mini/Configuration_adv.h | 7 +--- .../delta/kossel_pro/Configuration.h | 4 +-- .../delta/kossel_pro/Configuration_adv.h | 7 +--- .../delta/kossel_xl/Configuration.h | 4 +-- .../delta/kossel_xl/Configuration_adv.h | 7 +--- .../makibox/Configuration.h | 4 +-- .../makibox/Configuration_adv.h | 7 +--- .../tvrrug/Round2/Configuration.h | 4 +-- .../tvrrug/Round2/Configuration_adv.h | 7 +--- Marlin/language.h | 2 +- Marlin/qr_solve.h | 2 +- Marlin/servo.cpp | 2 +- Marlin/stepper_indirection.cpp | 2 +- Marlin/stepper_indirection.h | 2 +- Marlin/ultralcd_impl_DOGM.h | 9 +++--- 52 files changed, 87 insertions(+), 191 deletions(-) create mode 100644 Marlin/MarlinConfig.h diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 8c3677f7ec..2f36343d3a 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1343,6 +1343,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 3f8bddb6c7..410ee36ec1 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -46,8 +46,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index fec377644f..c780ff51bf 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -39,8 +39,9 @@ #include #include +#include "MarlinConfig.h" + #include "fastio.h" -#include "Configuration.h" #ifndef SANITYCHECK_H #error "Your Configuration.h and Configuration_adv.h files are outdated!" diff --git a/Marlin/Marlin.ino b/Marlin/Marlin.ino index 1869d33b5f..70fd8adfc2 100644 --- a/Marlin/Marlin.ino +++ b/Marlin/Marlin.ino @@ -34,8 +34,7 @@ /* All the implementation is done in *.cpp files to get better compatibility with avr-gcc without the Arduino IDE */ /* Use this file to help the Arduino IDE find which Arduino libraries are needed and to keep documentation on GCode */ -#include "Configuration.h" -#include "pins.h" +#include "MarlinConfig.h" #if ENABLED(ULTRA_LCD) #if ENABLED(LCD_I2C_TYPE_PCF8575) diff --git a/Marlin/MarlinConfig.h b/Marlin/MarlinConfig.h new file mode 100644 index 0000000000..16099895a2 --- /dev/null +++ b/Marlin/MarlinConfig.h @@ -0,0 +1,32 @@ +/** + * 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 . + * + */ + +#ifndef MARLIN_CONFIG_H +#define MARLIN_CONFIG_H + +#include "Configuration.h" +#include "Conditionals_LCD.h" +#include "Configuration_adv.h" +#include "Conditionals.h" +#include "SanityCheck.h" + +#endif // MARLIN_CONFIG_H diff --git a/Marlin/configuration_store.h b/Marlin/configuration_store.h index 2b2680607a..891f19fb97 100644 --- a/Marlin/configuration_store.h +++ b/Marlin/configuration_store.h @@ -23,7 +23,7 @@ #ifndef CONFIGURATION_STORE_H #define CONFIGURATION_STORE_H -#include "Configuration.h" +#include "MarlinConfig.h" void Config_ResetDefault(); diff --git a/Marlin/dac_mcp4728.h b/Marlin/dac_mcp4728.h index 26c54840fe..c096c856a9 100644 --- a/Marlin/dac_mcp4728.h +++ b/Marlin/dac_mcp4728.h @@ -27,8 +27,7 @@ #ifndef mcp4728_h #define mcp4728_h -#include "Configuration.h" -#include "Configuration_adv.h" +#include "MarlinConfig.h" #if ENABLED(DAC_STEPPER_CURRENT) #include "Wire.h" diff --git a/Marlin/digipot_mcp4451.cpp b/Marlin/digipot_mcp4451.cpp index 771581341a..c6a01915f3 100644 --- a/Marlin/digipot_mcp4451.cpp +++ b/Marlin/digipot_mcp4451.cpp @@ -20,7 +20,7 @@ * */ -#include "Configuration.h" +#include "MarlinConfig.h" #if ENABLED(DIGIPOT_I2C) diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index dc77b4074c..15642584c7 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -1337,6 +1337,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index 8cf533f939..1c75864f27 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -46,8 +46,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index a870c5d5ef..4d9cde622e 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -1320,6 +1320,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 4089b4749b..84df934685 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -46,8 +46,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index 1c057f46da..fcfb763faa 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -1318,6 +1318,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 542357bc38..6eb81a80b5 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -1329,6 +1329,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index 067f7d5a30..76fdb6b6fe 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -46,8 +46,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index d15133b2bd..2ffefc7583 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -1331,6 +1331,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h index 9f71aa3d01..e5fbb00718 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h @@ -46,8 +46,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 85e4833d5e..5853623602 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -1354,6 +1354,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index bf8b220f81..8a30f6bfb6 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -52,8 +52,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -804,7 +802,4 @@ const unsigned int dropsegments = 2; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/K8400/Configuration.h b/Marlin/example_configurations/K8400/Configuration.h index b6009f9d02..4907abb68c 100644 --- a/Marlin/example_configurations/K8400/Configuration.h +++ b/Marlin/example_configurations/K8400/Configuration.h @@ -1337,6 +1337,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/K8400/Configuration_adv.h b/Marlin/example_configurations/K8400/Configuration_adv.h index c3e10cd13c..f2b93daca5 100644 --- a/Marlin/example_configurations/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/K8400/Configuration_adv.h @@ -46,8 +46,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/K8400/Dual-head/Configuration.h index 5f23ca5fe8..083fa62140 100644 --- a/Marlin/example_configurations/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/K8400/Dual-head/Configuration.h @@ -1337,6 +1337,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 04ef83f2a5..02153ad77e 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -1337,6 +1337,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 2854c7db6d..591b126feb 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -1337,6 +1337,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index 8b4a6efbe8..f8d8223a48 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -46,8 +46,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 6f67df5324..bfeb8653fe 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -1345,6 +1345,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index d25cdbe5e0..a142085ee5 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -46,8 +46,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index 6e598b902c..ce7dc41be7 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -1358,6 +1358,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/TAZ4/Configuration_adv.h b/Marlin/example_configurations/TAZ4/Configuration_adv.h index 33be9e9a4d..e3546f0fd2 100644 --- a/Marlin/example_configurations/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/TAZ4/Configuration_adv.h @@ -46,8 +46,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -806,7 +804,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 3f41cdb486..368bcaaee4 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -1329,6 +1329,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index 067f7d5a30..76fdb6b6fe 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -46,8 +46,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index bccd131e27..7d52dd5a48 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -1337,6 +1337,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index 79176f7290..4b88211864 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -1429,6 +1429,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h index b4277bff36..d79183abf1 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h @@ -46,8 +46,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -800,7 +798,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 5a6811ff81..e562f29c1c 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -1423,6 +1423,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 129a454edc..bf4fe71265 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -46,8 +46,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -800,7 +798,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index b99db5651f..47875cb455 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -1426,6 +1426,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 06064bf99c..33f5d35ffc 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -46,8 +46,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -799,7 +797,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 6de65a2735..484a64d5c0 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -1426,6 +1426,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 6ea5339ac8..d54a8ac3b8 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -51,8 +51,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -804,7 +802,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index 6edd5da924..ba6dc69267 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -1429,6 +1429,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index dff1353dda..0b1d206354 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -46,8 +46,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -800,7 +798,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index e68e10e712..09d105bf4e 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -1340,6 +1340,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index de923d9a44..e21cbf3c52 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -46,8 +46,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index f77512a0ff..94781fedce 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -1331,6 +1331,4 @@ //#define FILAMENT_LCD_DISPLAY #endif -#include "Configuration_adv.h" - -#endif //CONFIGURATION_H +#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 0fac6a8397..83bc8899f7 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -46,8 +46,6 @@ */ #define CONFIGURATION_ADV_H_VERSION 010100 -#include "Conditionals_LCD.h" - // @section temperature //=========================================================================== @@ -798,7 +796,4 @@ const unsigned int dropsegments = 5; //everything with less than this number of //#define EXPERIMENTAL_I2CBUS -#include "Conditionals.h" -#include "SanityCheck.h" - -#endif //CONFIGURATION_ADV_H +#endif // CONFIGURATION_ADV_H diff --git a/Marlin/language.h b/Marlin/language.h index 4e53c48903..82507d33b0 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -23,7 +23,7 @@ #ifndef LANGUAGE_H #define LANGUAGE_H -#include "Configuration.h" +#include "MarlinConfig.h" // Fallback if no language is set. DON'T CHANGE #ifndef LCD_LANGUAGE diff --git a/Marlin/qr_solve.h b/Marlin/qr_solve.h index b985d622f2..3ea30e9e7d 100644 --- a/Marlin/qr_solve.h +++ b/Marlin/qr_solve.h @@ -20,7 +20,7 @@ * */ -#include "Configuration.h" +#include "MarlinConfig.h" #if ENABLED(AUTO_BED_LEVELING_GRID) diff --git a/Marlin/servo.cpp b/Marlin/servo.cpp index c9708b8d84..b5f9ed86da 100644 --- a/Marlin/servo.cpp +++ b/Marlin/servo.cpp @@ -50,7 +50,7 @@ * detach() - Stop an attached servo from pulsing its i/o pin. * */ -#include "Configuration.h" +#include "MarlinConfig.h" #if HAS_SERVOS diff --git a/Marlin/stepper_indirection.cpp b/Marlin/stepper_indirection.cpp index d7d627a02d..101249e3c8 100644 --- a/Marlin/stepper_indirection.cpp +++ b/Marlin/stepper_indirection.cpp @@ -43,7 +43,7 @@ #include "stepper_indirection.h" -#include "Configuration.h" +#include "MarlinConfig.h" #if ENABLED(HAVE_TMCDRIVER) #include diff --git a/Marlin/stepper_indirection.h b/Marlin/stepper_indirection.h index 6326663683..6fd19dd4d5 100644 --- a/Marlin/stepper_indirection.h +++ b/Marlin/stepper_indirection.h @@ -44,7 +44,7 @@ #ifndef STEPPER_INDIRECTION_H #define STEPPER_INDIRECTION_H -#include "Configuration.h" +#include "MarlinConfig.h" // TMC26X drivers have STEP/DIR on normal pins, but ENABLE via SPI #if ENABLED(HAVE_TMCDRIVER) diff --git a/Marlin/ultralcd_impl_DOGM.h b/Marlin/ultralcd_impl_DOGM.h index 218f3217bc..2d0faa0f5e 100644 --- a/Marlin/ultralcd_impl_DOGM.h +++ b/Marlin/ultralcd_impl_DOGM.h @@ -36,6 +36,8 @@ #ifndef ULTRALCD_IMPL_DOGM_H #define ULTRALCD_IMPL_DOGM_H +#include "MarlinConfig.h" + /** * Implementation of the LCD display routines for a DOGM128 graphic display. * These are common LCD 128x64 pixel graphic displays. @@ -51,20 +53,17 @@ #define LCD_CLICKED (buttons&EN_C) #endif -#include #include "dogm_bitmaps.h" - #include "ultralcd.h" #include "ultralcd_st7920_u8glib_rrd.h" -#include "Configuration.h" - #include "duration_t.h" +#include + #if DISABLED(MAPPER_C2C3) && DISABLED(MAPPER_NON) && ENABLED(USE_BIG_EDIT_FONT) #undef USE_BIG_EDIT_FONT #endif - #if ENABLED(USE_SMALL_INFOFONT) #include "dogm_font_data_6x9_marlin.h" #define FONT_STATUSMENU_NAME u8g_font_6x9 From 8a44928df3cff0a692713c39bef726c6ddbd0aac Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 25 Jul 2016 23:12:03 -0700 Subject: [PATCH 05/13] Make Conditionals.h a catch-all for old configs --- Marlin/{Conditionals.h => Conditionals_post.h} | 8 ++++---- Marlin/MarlinConfig.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) rename Marlin/{Conditionals.h => Conditionals_post.h} (99%) diff --git a/Marlin/Conditionals.h b/Marlin/Conditionals_post.h similarity index 99% rename from Marlin/Conditionals.h rename to Marlin/Conditionals_post.h index e593d79c95..fc0c6d54a6 100644 --- a/Marlin/Conditionals.h +++ b/Marlin/Conditionals_post.h @@ -21,12 +21,10 @@ */ /** - * Conditionals.h + * Conditionals_post.h * Defines that depend on configuration but are not editable. */ -#ifndef CONDITIONALS_H -#define CONDITIONALS_H #include "pins.h" @@ -36,6 +34,8 @@ #include "Arduino.h" #include "macros.h" +#ifndef CONDITIONALS_POST_H +#define CONDITIONALS_POST_H #if ENABLED(EMERGENCY_PARSER) #define EMERGENCY_PARSER_CAPABILITIES " EMERGENCY_CODES:M108,M112,M410" @@ -675,4 +675,4 @@ #define Z_RAISE_BETWEEN_PROBING MIN_Z_HEIGHT_FOR_HOMING #endif -#endif //CONDITIONALS_H +#endif // CONDITIONALS_POST_H diff --git a/Marlin/MarlinConfig.h b/Marlin/MarlinConfig.h index 16099895a2..c3d0c3f9eb 100644 --- a/Marlin/MarlinConfig.h +++ b/Marlin/MarlinConfig.h @@ -26,7 +26,7 @@ #include "Configuration.h" #include "Conditionals_LCD.h" #include "Configuration_adv.h" -#include "Conditionals.h" +#include "Conditionals_post.h" #include "SanityCheck.h" #endif // MARLIN_CONFIG_H From 5f4702ecb27d8c8da9e8b14f9042c0f2caffc585 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 25 Jul 2016 23:12:26 -0700 Subject: [PATCH 06/13] Make Conditionals.h a catch-all for old configs --- Marlin/Conditionals.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Marlin/Conditionals.h diff --git a/Marlin/Conditionals.h b/Marlin/Conditionals.h new file mode 100644 index 0000000000..3812556629 --- /dev/null +++ b/Marlin/Conditionals.h @@ -0,0 +1,28 @@ +/** + * 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 . + * + */ + +/** + * Conditionals.h + * OBSOLETE: Replaced by Conditionals_LCD.h and Conditionals_post.h + */ + +#error "Please remove the following #include's from your Configuration.h and Configuration_adv.h: macros.h boards.h Conditionals.h Configuration_adv.h SanityCheck.h." From 83c4653c711f054640a6d522416ba886246cc6c6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 25 Jul 2016 23:22:45 -0700 Subject: [PATCH 07/13] Include boards and macros ahead of configs --- Marlin/Configuration.h | 3 --- Marlin/MarlinConfig.h | 2 ++ Marlin/example_configurations/Cartesio/Configuration.h | 3 --- Marlin/example_configurations/Felix/Configuration.h | 3 --- Marlin/example_configurations/Felix/DUAL/Configuration.h | 3 --- Marlin/example_configurations/Hephestos/Configuration.h | 3 --- Marlin/example_configurations/Hephestos_2/Configuration.h | 3 --- Marlin/example_configurations/K8200/Configuration.h | 3 --- Marlin/example_configurations/K8400/Configuration.h | 3 --- Marlin/example_configurations/K8400/Dual-head/Configuration.h | 3 --- .../RepRapWorld/Megatronics/Configuration.h | 3 --- Marlin/example_configurations/RigidBot/Configuration.h | 3 --- Marlin/example_configurations/SCARA/Configuration.h | 3 --- Marlin/example_configurations/TAZ4/Configuration.h | 3 --- Marlin/example_configurations/WITBOX/Configuration.h | 3 --- Marlin/example_configurations/adafruit/ST7565/Configuration.h | 3 --- Marlin/example_configurations/delta/biv2.5/Configuration.h | 3 --- Marlin/example_configurations/delta/generic/Configuration.h | 3 --- .../example_configurations/delta/kossel_mini/Configuration.h | 3 --- Marlin/example_configurations/delta/kossel_pro/Configuration.h | 3 --- Marlin/example_configurations/delta/kossel_xl/Configuration.h | 3 --- Marlin/example_configurations/makibox/Configuration.h | 3 --- Marlin/example_configurations/tvrrug/Round2/Configuration.h | 3 --- 23 files changed, 2 insertions(+), 66 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 2f36343d3a..57e86e0ff4 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/MarlinConfig.h b/Marlin/MarlinConfig.h index c3d0c3f9eb..07287bb551 100644 --- a/Marlin/MarlinConfig.h +++ b/Marlin/MarlinConfig.h @@ -23,6 +23,8 @@ #ifndef MARLIN_CONFIG_H #define MARLIN_CONFIG_H +#include "macros.h" +#include "boards.h" #include "Configuration.h" #include "Conditionals_LCD.h" #include "Configuration_adv.h" diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index 15642584c7..2dae67d8d3 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 4d9cde622e..d4d96a58f7 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index fcfb763faa..01e4258b27 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 6eb81a80b5..57a2caba44 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index 2ffefc7583..d0f8a0cef7 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 5853623602..8e7080c08d 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -58,9 +58,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/K8400/Configuration.h b/Marlin/example_configurations/K8400/Configuration.h index 4907abb68c..6eefcaf019 100644 --- a/Marlin/example_configurations/K8400/Configuration.h +++ b/Marlin/example_configurations/K8400/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/K8400/Dual-head/Configuration.h index 083fa62140..cd5cb4e3f1 100644 --- a/Marlin/example_configurations/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/K8400/Dual-head/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 02153ad77e..f8cab6d370 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 591b126feb..e5b3bfcb7a 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index bfeb8653fe..2d6464ce8f 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index ce7dc41be7..4c1b2d8803 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 368bcaaee4..daa52e1bc7 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 7d52dd5a48..a19e65a233 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index 4b88211864..c371e257d1 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index e562f29c1c..a024a52e78 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 47875cb455..a3e0aa892a 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 484a64d5c0..b60419a310 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -57,9 +57,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index ba6dc69267..56d6eff5d8 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 09d105bf4e..e466bf5bf8 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 94781fedce..afb20b0ddd 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -51,9 +51,6 @@ */ #define CONFIGURATION_H_VERSION 010100 -#include "boards.h" -#include "macros.h" - //=========================================================================== //============================= Getting Started ============================= //=========================================================================== From 277899c1755621bc0c5ecbec12744952fbb691d8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 25 Jul 2016 23:23:55 -0700 Subject: [PATCH 08/13] Move include _Bootscreen.h where needed --- Marlin/Configuration.h | 4 ---- Marlin/example_configurations/Cartesio/Configuration.h | 3 --- Marlin/example_configurations/Cartesio/_Bootscreen.h | 2 +- Marlin/example_configurations/Felix/Configuration.h | 3 --- Marlin/example_configurations/Felix/DUAL/Configuration.h | 3 --- Marlin/example_configurations/Hephestos/Configuration.h | 3 --- Marlin/example_configurations/Hephestos_2/Configuration.h | 4 ---- Marlin/example_configurations/K8200/Configuration.h | 3 --- Marlin/example_configurations/K8400/Configuration.h | 3 --- .../example_configurations/K8400/Dual-head/Configuration.h | 3 --- .../RepRapWorld/Megatronics/Configuration.h | 3 --- Marlin/example_configurations/RigidBot/Configuration.h | 3 --- Marlin/example_configurations/SCARA/Configuration.h | 3 --- Marlin/example_configurations/TAZ4/Configuration.h | 3 --- Marlin/example_configurations/WITBOX/Configuration.h | 4 ---- .../example_configurations/adafruit/ST7565/Configuration.h | 3 --- Marlin/example_configurations/delta/biv2.5/Configuration.h | 3 --- Marlin/example_configurations/delta/generic/Configuration.h | 3 --- .../delta/kossel_mini/Configuration.h | 3 --- .../example_configurations/delta/kossel_pro/Configuration.h | 3 --- .../example_configurations/delta/kossel_xl/Configuration.h | 3 --- Marlin/example_configurations/makibox/Configuration.h | 3 --- Marlin/example_configurations/tvrrug/Round2/Configuration.h | 4 ---- Marlin/ultralcd_impl_DOGM.h | 6 +++++- 24 files changed, 6 insertions(+), 72 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 57e86e0ff4..d2c5d603c0 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -109,10 +109,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_Bootscreen.h" -#endif - // @section machine // SERIAL_PORT selects which serial port should be used for communication with the host. diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index 2dae67d8d3..29c893aaf1 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -109,9 +109,6 @@ // example configuration folder. // #define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_Bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/Cartesio/_Bootscreen.h b/Marlin/example_configurations/Cartesio/_Bootscreen.h index 93de4f143f..a365caee75 100644 --- a/Marlin/example_configurations/Cartesio/_Bootscreen.h +++ b/Marlin/example_configurations/Cartesio/_Bootscreen.h @@ -35,7 +35,7 @@ #define CUSTOM_BOOTSCREEN_BMPWIDTH 63 #define CUSTOM_BOOTSCREEN_BMPHEIGHT 64 -const unsigned char 81x0i84fkcmoqbu7vte29[512] PROGMEM = { +const unsigned char custom_start_bmp[512] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index d4d96a58f7..92eb2d3ae6 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -109,9 +109,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index 01e4258b27..fc10dcfe6d 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -109,9 +109,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 57a2caba44..4701c06a08 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -109,9 +109,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index d0f8a0cef7..5874d1cf09 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -109,10 +109,6 @@ // example configuration folder. // #define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_Bootscreen.h" -#endif - // @section machine // SERIAL_PORT selects which serial port should be used for communication with the host. diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 8e7080c08d..0bc4ee51d3 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -116,9 +116,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/K8400/Configuration.h b/Marlin/example_configurations/K8400/Configuration.h index 6eefcaf019..1dbc6a0c12 100644 --- a/Marlin/example_configurations/K8400/Configuration.h +++ b/Marlin/example_configurations/K8400/Configuration.h @@ -109,9 +109,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/K8400/Dual-head/Configuration.h index cd5cb4e3f1..ff28de895a 100644 --- a/Marlin/example_configurations/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/K8400/Dual-head/Configuration.h @@ -109,9 +109,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index f8cab6d370..e4fd7fa740 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -109,9 +109,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index e5b3bfcb7a..ec9b14505c 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -109,9 +109,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 2d6464ce8f..e06184e07b 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -134,9 +134,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index 4c1b2d8803..10fd6a6b4b 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -109,9 +109,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index daa52e1bc7..d637539058 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -109,10 +109,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_Bootscreen.h" -#endif - // @section machine // SERIAL_PORT selects which serial port should be used for communication with the host. diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index a19e65a233..4c95f52950 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -109,9 +109,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index c371e257d1..2ecf232077 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -109,9 +109,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index a024a52e78..5fbd6027b7 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -109,9 +109,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index a3e0aa892a..41006fd8b2 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -109,9 +109,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index b60419a310..d9a6280009 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -115,9 +115,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index 56d6eff5d8..afe02628e5 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -102,9 +102,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index e466bf5bf8..b4586b55a5 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -109,9 +109,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_bootscreen.h" -#endif // @section machine diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index afb20b0ddd..f69b16d61e 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -109,10 +109,6 @@ // example configuration folder. // //#define SHOW_CUSTOM_BOOTSCREEN -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_Bootscreen.h" -#endif - // @section machine // SERIAL_PORT selects which serial port should be used for communication with the host. diff --git a/Marlin/ultralcd_impl_DOGM.h b/Marlin/ultralcd_impl_DOGM.h index 2d0faa0f5e..43b76a9957 100644 --- a/Marlin/ultralcd_impl_DOGM.h +++ b/Marlin/ultralcd_impl_DOGM.h @@ -60,6 +60,10 @@ #include +#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) + #include "_Bootscreen.h" +#endif + #if DISABLED(MAPPER_C2C3) && DISABLED(MAPPER_NON) && ENABLED(USE_BIG_EDIT_FONT) #undef USE_BIG_EDIT_FONT #endif @@ -145,7 +149,7 @@ #elif ENABLED(U8GLIB_ST7920) //U8GLIB_ST7920_128X64_RRD u8g(0,0,0); U8GLIB_ST7920_128X64_RRD u8g(0); -#elif defined(CARTESIO_UI) +#elif ENABLED(CARTESIO_UI) // The CartesioUI display #if DOGLCD_MOSI != -1 && DOGLCD_SCK != -1 // using SW-SPI From d9f7ed9a3c438ae686d4f177156471d6ecdd9538 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 25 Jul 2016 23:24:11 -0700 Subject: [PATCH 09/13] Move some macros from Marlin.h to macros.h --- Marlin/Marlin.h | 11 ----------- Marlin/macros.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index c780ff51bf..a32007e3b5 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -22,12 +22,6 @@ #ifndef MARLIN_H #define MARLIN_H -#define FORCE_INLINE __attribute__((always_inline)) inline -/** - * Compiler warning on unused variable. - */ -#define UNUSED(x) (void) (x) - #include #include #include @@ -265,11 +259,6 @@ inline void refresh_cmd_timeout() { previous_cmd_ms = millis(); } void setPwmFrequency(uint8_t pin, int val); #endif -#ifndef CRITICAL_SECTION_START - #define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli(); - #define CRITICAL_SECTION_END SREG = _sreg; -#endif - /** * Feedrate scaling and conversion */ diff --git a/Marlin/macros.h b/Marlin/macros.h index f8c4735ebf..c228ac3ed0 100644 --- a/Marlin/macros.h +++ b/Marlin/macros.h @@ -23,6 +23,17 @@ #ifndef MACROS_H #define MACROS_H +#define FORCE_INLINE __attribute__((always_inline)) inline + +// Bracket code that shouldn't be interrupted +#ifndef CRITICAL_SECTION_START + #define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli(); + #define CRITICAL_SECTION_END SREG = _sreg; +#endif + +// Remove compiler warning on an unused variable +#define UNUSED(x) (void) (x) + // Macros to make a string from a macro #define STRINGIFY_(M) #M #define STRINGIFY(M) STRINGIFY_(M) From 7e70a0b05d18665ff775377ca0d8f7514d1e3a86 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 26 Jul 2016 12:16:22 -0700 Subject: [PATCH 10/13] Move pins / Arduino includes to MarlinConfig.h --- Marlin/Conditionals_post.h | 9 --------- Marlin/MarlinConfig.h | 5 +++++ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index fc0c6d54a6..3ff131de2e 100644 --- a/Marlin/Conditionals_post.h +++ b/Marlin/Conditionals_post.h @@ -25,15 +25,6 @@ * Defines that depend on configuration but are not editable. */ - - #include "pins.h" - - #ifndef USBCON - #define HardwareSerial_h // trick to disable the standard HWserial - #endif - #include "Arduino.h" - - #include "macros.h" #ifndef CONDITIONALS_POST_H #define CONDITIONALS_POST_H diff --git a/Marlin/MarlinConfig.h b/Marlin/MarlinConfig.h index 07287bb551..4277c65432 100644 --- a/Marlin/MarlinConfig.h +++ b/Marlin/MarlinConfig.h @@ -28,6 +28,11 @@ #include "Configuration.h" #include "Conditionals_LCD.h" #include "Configuration_adv.h" +#include "pins.h" +#ifndef USBCON + #define HardwareSerial_h // trick to disable the standard HWserial +#endif +#include "Arduino.h" #include "Conditionals_post.h" #include "SanityCheck.h" From 24a1a16e5d2fd2485f61456be22f5c795fe185f9 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 26 Jul 2016 12:16:59 -0700 Subject: [PATCH 11/13] Move versioning to MarlinConfig.h --- Marlin/Configuration.h | 6 - Marlin/MarlinConfig.h | 1 + Marlin/Version.h | 104 ++++++++++-------- .../Cartesio/Configuration.h | 6 - .../Felix/Configuration.h | 6 - .../Felix/DUAL/Configuration.h | 6 - .../Hephestos/Configuration.h | 6 - .../Hephestos_2/Configuration.h | 6 - .../K8200/Configuration.h | 6 - .../K8400/Configuration.h | 6 - .../K8400/Dual-head/Configuration.h | 6 - .../RepRapWorld/Megatronics/Configuration.h | 6 - .../RigidBot/Configuration.h | 6 - .../SCARA/Configuration.h | 6 - .../TAZ4/Configuration.h | 6 - .../WITBOX/Configuration.h | 6 - .../adafruit/ST7565/Configuration.h | 6 - .../delta/biv2.5/Configuration.h | 6 - .../delta/generic/Configuration.h | 6 - .../delta/kossel_mini/Configuration.h | 6 - .../delta/kossel_pro/Configuration.h | 6 - .../delta/kossel_xl/Configuration.h | 6 - .../makibox/Configuration.h | 6 - .../tvrrug/Round2/Configuration.h | 6 - Marlin/language.h | 6 - 25 files changed, 57 insertions(+), 186 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index d2c5d603c0..8b5e3394cc 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/MarlinConfig.h b/Marlin/MarlinConfig.h index 4277c65432..b0d10a301f 100644 --- a/Marlin/MarlinConfig.h +++ b/Marlin/MarlinConfig.h @@ -25,6 +25,7 @@ #include "macros.h" #include "boards.h" +#include "Version.h" #include "Configuration.h" #include "Conditionals_LCD.h" #include "Configuration_adv.h" diff --git a/Marlin/Version.h b/Marlin/Version.h index d17564b42a..6a34f6fd8e 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -26,59 +26,67 @@ * directive USE_AUTOMATIC_VERSIONING. */ -/** - * Marlin release version identifier - */ -#define SHORT_BUILD_VERSION "1.1.0-RCBugFix" +#if ENABLED(USE_AUTOMATIC_VERSIONING) -/** - * Verbose version identifier which should contain a reference to the location - * from where the binary was downloaded or the source code was compiled. - */ -#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (Github)" + #include "_Version.h" -/** - * The STRING_DISTRIBUTION_DATE represents when the binary file was built, - * here we define this default string as the date where the latest release - * version was tagged. - */ -#define STRING_DISTRIBUTION_DATE "2016-04-27 12:00" +#else -/** - * Required minimum Configuration.h and Configuration_adv.h file versions. - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option on - * the configuration files. - */ -#define REQUIRED_CONFIGURATION_H_VERSION 010100 -#define REQUIRED_CONFIGURATION_ADV_H_VERSION 010100 + /** + * Marlin release version identifier + */ + #define SHORT_BUILD_VERSION "1.1.0-RCBugFix" -/** - * @todo: Missing documentation block - */ -#define PROTOCOL_VERSION "1.0" + /** + * Verbose version identifier which should contain a reference to the location + * from where the binary was downloaded or the source code was compiled. + */ + #define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (Github)" -/** - * Defines a generic printer name to be output to the LCD after booting Marlin. - */ -#define MACHINE_NAME "3D Printer" + /** + * The STRING_DISTRIBUTION_DATE represents when the binary file was built, + * here we define this default string as the date where the latest release + * version was tagged. + */ + #define STRING_DISTRIBUTION_DATE "2016-04-27 12:00" -/** - * The SOURCE_CODE_URL is the location where users will find the Marlin Source - * Code which is installed on the device. In most cases —unless the manufacturer - * has a distinct Github fork— the Source Code URL should just be the main - * Marlin repository. - */ -#define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin" + /** + * Required minimum Configuration.h and Configuration_adv.h file versions. + * + * You must increment this version number for every significant change such as, + * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option on + * the configuration files. + */ + #define REQUIRED_CONFIGURATION_H_VERSION 010100 + #define REQUIRED_CONFIGURATION_ADV_H_VERSION 010100 -/** - * Default generic printer UUID. - */ -#define DEFAULT_MACHINE_UUID "cede2a2f-41a2-4748-9b12-c55c62f367ff" + /** + * @todo: Missing documentation block + */ + #define PROTOCOL_VERSION "1.0" -/** - * The WEBSITE_URL is the location where users can get more information such as - * documentation about a specific Marlin release. - */ -#define WEBSITE_URL "http://marlinfw.org" + /** + * Defines a generic printer name to be output to the LCD after booting Marlin. + */ + #define MACHINE_NAME "3D Printer" + + /** + * The SOURCE_CODE_URL is the location where users will find the Marlin Source + * Code which is installed on the device. In most cases —unless the manufacturer + * has a distinct Github fork— the Source Code URL should just be the main + * Marlin repository. + */ + #define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin" + + /** + * Default generic printer UUID. + */ + #define DEFAULT_MACHINE_UUID "cede2a2f-41a2-4748-9b12-c55c62f367ff" + + /** + * The WEBSITE_URL is the location where users can get more information such as + * documentation about a specific Marlin release. + */ + #define WEBSITE_URL "http://marlinfw.org" + +#endif // USE_AUTOMATIC_VERSIONING diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index 29c893aaf1..2ac06d1e81 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 92eb2d3ae6..7bd240eda2 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index fc10dcfe6d..09a97f1e1d 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 4701c06a08..47b72e461c 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index 5874d1cf09..a4eb3a30d4 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 0bc4ee51d3..933b229d4e 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -90,12 +90,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/K8400/Configuration.h b/Marlin/example_configurations/K8400/Configuration.h index 1dbc6a0c12..4cbf03c11c 100644 --- a/Marlin/example_configurations/K8400/Configuration.h +++ b/Marlin/example_configurations/K8400/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/K8400/Dual-head/Configuration.h index ff28de895a..390b07e2da 100644 --- a/Marlin/example_configurations/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/K8400/Dual-head/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index e4fd7fa740..7fe8a6a5f0 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index ec9b14505c..ac2411b678 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index e06184e07b..52a56937c8 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -108,12 +108,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index 10fd6a6b4b..b3ac585452 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index d637539058..ad08e0e022 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 4c95f52950..b733bd6af3 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index 2ecf232077..673e167ff6 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 5fbd6027b7..f321eafebb 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 41006fd8b2..50e42936d9 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index d9a6280009..2726e9a2cf 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -89,12 +89,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index afe02628e5..7a0ff37ba8 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -76,12 +76,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index b4586b55a5..79907874f4 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index f69b16d61e..36f6d3c5f5 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -83,12 +83,6 @@ // @section info -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - // 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. diff --git a/Marlin/language.h b/Marlin/language.h index 82507d33b0..496fed5c96 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -68,12 +68,6 @@ // pt_utf8 Portuguese (UTF8) // ru Russian -#if ENABLED(USE_AUTOMATIC_VERSIONING) - #include "_Version.h" -#else - #include "Version.h" -#endif - #ifdef DEFAULT_SOURCE_CODE_URL #undef SOURCE_CODE_URL #define SOURCE_CODE_URL DEFAULT_SOURCE_CODE_URL From fa647cca23a1901afb0797090275dfc4e7f40843 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 26 Jul 2016 12:28:49 -0700 Subject: [PATCH 12/13] Do the sanity check just once per build --- Marlin/MarlinConfig.h | 1 - Marlin/{SanityCheck.h => SanityCheck.cpp} | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) rename Marlin/{SanityCheck.h => SanityCheck.cpp} (99%) diff --git a/Marlin/MarlinConfig.h b/Marlin/MarlinConfig.h index b0d10a301f..5ead4a11b5 100644 --- a/Marlin/MarlinConfig.h +++ b/Marlin/MarlinConfig.h @@ -35,6 +35,5 @@ #endif #include "Arduino.h" #include "Conditionals_post.h" -#include "SanityCheck.h" #endif // MARLIN_CONFIG_H diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.cpp similarity index 99% rename from Marlin/SanityCheck.h rename to Marlin/SanityCheck.cpp index 129a43561e..3660907228 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.cpp @@ -21,12 +21,12 @@ */ /** - * SanityCheck.h + * SanityCheck.cpp * * Test configuration values for errors at compile-time. + * This is done only once, here, to speed up compilation time. */ -#ifndef SANITYCHECK_H -#define SANITYCHECK_H +#include "MarlinConfig.h" /** * Due to the high number of issues related with old versions of Arduino IDE @@ -727,5 +727,3 @@ #elif defined(HOMING_FEEDRATE) #error "HOMING_FEEDRATE is deprecated. Set individual rates with HOMING_FEEDRATE_(XY|Z|E) instead." #endif - -#endif //SANITYCHECK_H From 3be49881c0bf7c976e0b1fcecce011f087b2574e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 26 Jul 2016 12:32:16 -0700 Subject: [PATCH 13/13] Make SanityCheck.h a catch-all for obsolete configs --- Marlin/Conditionals.h | 3 +-- Marlin/Marlin.h | 4 ---- Marlin/SanityCheck.h | 27 +++++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 Marlin/SanityCheck.h diff --git a/Marlin/Conditionals.h b/Marlin/Conditionals.h index 3812556629..baa822d7f5 100644 --- a/Marlin/Conditionals.h +++ b/Marlin/Conditionals.h @@ -24,5 +24,4 @@ * Conditionals.h * OBSOLETE: Replaced by Conditionals_LCD.h and Conditionals_post.h */ - -#error "Please remove the following #include's from your Configuration.h and Configuration_adv.h: macros.h boards.h Conditionals.h Configuration_adv.h SanityCheck.h." +#include "SanityCheck.h" diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index a32007e3b5..1b1bffaec1 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -37,10 +37,6 @@ #include "fastio.h" -#ifndef SANITYCHECK_H - #error "Your Configuration.h and Configuration_adv.h files are outdated!" -#endif - #include "enum.h" #include "utility.h" diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h new file mode 100644 index 0000000000..fcf258475e --- /dev/null +++ b/Marlin/SanityCheck.h @@ -0,0 +1,27 @@ +/** + * 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 . + * + */ + +/** + * SanityCheck.h + * OBSOLETE: Moved to SanityCheck.cpp + */ +#error "Please remove all #include lines from your Configuration.h and Configuration_adv.h files!"