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 9ab609ad5..e593d79c9 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 000000000..60ed5ce6e --- /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 fde6524e8..3f8bddb6c 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 4229d5487..8cf533f93 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 bc9b589fe..4089b4749 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 bd6f99e8b..067f7d5a3 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 6d017cde3..9f71aa3d0 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 45c8cfb80..bf8b220f8 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 4cb356520..c3e10cd13 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 686a9d5f1..8b4a6efbe 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 e6f63af5f..d25cdbe5e 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 93c041860..33be9e9a4 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 bd6f99e8b..067f7d5a3 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 91b4ac3f2..b4277bff3 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 5995579ee..129a454ed 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 a29745937..06064bf99 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 534779c18..6ea5339ac 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 38a0542b6..dff1353dd 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 0c5b2da02..de923d9a4 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 28269ec26..0fac6a839 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 bf2d07180..f8c4735eb 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 53a66edfb..fec377644 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 1ab5eddb1..8c3677f7e 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 feaaefa17..dc77b4074 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 0fc856308..a870c5d5e 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 602a1b55e..1c057f46d 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 f6a2f1def..542357bc3 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 73878728d..d15133b2b 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 61d704467..85e4833d5 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 b86d146f0..b6009f9d0 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 a1d4d7d61..5f23ca5fe 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 d09a46314..04ef83f2a 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 57f0f455e..2854c7db6 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 6c3e2de8f..6f67df532 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 6cac78e91..6e598b902 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 8f15e51e6..3f41cdb48 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 0ec16f57b..bccd131e2 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 67c55aaad..79176f729 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 e25730952..5a6811ff8 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 fa7aabddc..b99db5651 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 13898efc0..6de65a273 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 f7a5d8474..6edd5da92 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 6c91f2888..e68e10e71 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 a7e3f04f8..f77512a0f 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 666edd90f..172014e7f 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 8fab0db3d..47d6af273 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 8c3677f7e..2f36343d3 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 3f8bddb6c..410ee36ec 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 fec377644..c780ff51b 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 1869d33b5..70fd8adfc 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 000000000..16099895a --- /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 2b2680607..891f19fb9 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 26c54840f..c096c856a 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 771581341..c6a01915f 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 dc77b4074..15642584c 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 8cf533f93..1c75864f2 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 a870c5d5e..4d9cde622 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 4089b4749..84df93468 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 1c057f46d..fcfb763fa 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 542357bc3..6eb81a80b 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 067f7d5a3..76fdb6b6f 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 d15133b2b..2ffefc758 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 9f71aa3d0..e5fbb0071 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 85e4833d5..585362360 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 bf8b220f8..8a30f6bfb 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 b6009f9d0..4907abb68 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 c3e10cd13..f2b93daca 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 5f23ca5fe..083fa6214 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 04ef83f2a..02153ad77 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 2854c7db6..591b126fe 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 8b4a6efbe..f8d8223a4 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 6f67df532..bfeb8653f 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 d25cdbe5e..a142085ee 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 6e598b902..ce7dc41be 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 33be9e9a4..e3546f0fd 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 3f41cdb48..368bcaaee 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 067f7d5a3..76fdb6b6f 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 bccd131e2..7d52dd5a4 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 79176f729..4b8821186 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 b4277bff3..d79183abf 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 5a6811ff8..e562f29c1 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 129a454ed..bf4fe7126 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 b99db5651..47875cb45 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 06064bf99..33f5d35ff 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 6de65a273..484a64d5c 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 6ea5339ac..d54a8ac3b 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 6edd5da92..ba6dc6926 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 dff1353dd..0b1d20635 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 e68e10e71..09d105bf4 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 de923d9a4..e21cbf3c5 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 f77512a0f..94781fedc 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 0fac6a839..83bc8899f 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 4e53c4890..82507d33b 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 b985d622f..3ea30e9e7 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 c9708b8d8..b5f9ed86d 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 d7d627a02..101249e3c 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 632666368..6fd19dd4d 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 218f3217b..2d0faa0f5 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 e593d79c9..fc0c6d54a 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 16099895a..c3d0c3f9e 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 000000000..381255662 --- /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 2f36343d3..57e86e0ff 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 c3d0c3f9e..07287bb55 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 15642584c..2dae67d8d 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 4d9cde622..d4d96a58f 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 fcfb763fa..01e4258b2 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 6eb81a80b..57a2caba4 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 2ffefc758..d0f8a0cef 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 585362360..8e7080c08 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 4907abb68..6eefcaf01 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 083fa6214..cd5cb4e3f 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 02153ad77..f8cab6d37 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 591b126fe..e5b3bfcb7 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 bfeb8653f..2d6464ce8 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 ce7dc41be..4c1b2d880 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 368bcaaee..daa52e1bc 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 7d52dd5a4..a19e65a23 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 4b8821186..c371e257d 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 e562f29c1..a024a52e7 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 47875cb45..a3e0aa892 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 484a64d5c..b60419a31 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 ba6dc6926..56d6eff5d 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 09d105bf4..e466bf5bf 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 94781fedc..afb20b0dd 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 57e86e0ff..d2c5d603c 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 2dae67d8d..29c893aaf 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 93de4f143..a365caee7 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 d4d96a58f..92eb2d3ae 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 01e4258b2..fc10dcfe6 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 57a2caba4..4701c06a0 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 d0f8a0cef..5874d1cf0 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 8e7080c08..0bc4ee51d 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 6eefcaf01..1dbc6a0c1 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 cd5cb4e3f..ff28de895 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 f8cab6d37..e4fd7fa74 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 e5b3bfcb7..ec9b14505 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 2d6464ce8..e06184e07 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 4c1b2d880..10fd6a6b4 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 daa52e1bc..d63753905 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 a19e65a23..4c95f5295 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 c371e257d..2ecf23207 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 a024a52e7..5fbd6027b 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 a3e0aa892..41006fd8b 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 b60419a31..d9a628000 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 56d6eff5d..afe02628e 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 e466bf5bf..b4586b55a 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 afb20b0dd..f69b16d61 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 2d0faa0f5..43b76a995 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 c780ff51b..a32007e3b 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 f8c4735eb..c228ac3ed 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 fc0c6d54a..3ff131de2 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 07287bb55..4277c6543 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 d2c5d603c..8b5e3394c 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 4277c6543..b0d10a301 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 d17564b42..6a34f6fd8 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 29c893aaf..2ac06d1e8 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 92eb2d3ae..7bd240eda 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 fc10dcfe6..09a97f1e1 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 4701c06a0..47b72e461 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 5874d1cf0..a4eb3a30d 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 0bc4ee51d..933b229d4 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 1dbc6a0c1..4cbf03c11 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 ff28de895..390b07e2d 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 e4fd7fa74..7fe8a6a5f 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 ec9b14505..ac2411b67 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 e06184e07..52a56937c 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 10fd6a6b4..b3ac58545 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 d63753905..ad08e0e02 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 4c95f5295..b733bd6af 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 2ecf23207..673e167ff 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 5fbd6027b..f321eafeb 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 41006fd8b..50e42936d 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 d9a628000..2726e9a2c 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 afe02628e..7a0ff37ba 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 b4586b55a..79907874f 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 f69b16d61..36f6d3c5f 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 82507d33b..496fed5c9 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 b0d10a301..5ead4a11b 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 129a43561..366090722 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 381255662..baa822d7f 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 a32007e3b..1b1bffaec 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 000000000..fcf258475 --- /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!"