From 34101224c438eef0bb7c456a80364fa47f08f113 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 6 Sep 2017 06:28:32 -0500 Subject: [PATCH] Inc updates --- Marlin/src/inc/Conditionals_post.h | 7 +++++-- Marlin/src/inc/MarlinConfig.h | 19 +++++++++++++------ Marlin/src/inc/SanityCheck.h | 23 +++++++++++------------ 3 files changed, 29 insertions(+), 20 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index c50480b971..15a3e1e548 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -263,7 +263,7 @@ * Advance calculated values */ #if ENABLED(ADVANCE) - #define EXTRUSION_AREA (0.25 * (D_FILAMENT) * (D_FILAMENT) * M_PI) + #define EXTRUSION_AREA CIRCLE_CIRC(0.5 * D_FILAMENT) #define STEPS_PER_CUBIC_MM_E (axis_steps_per_mm[E_AXIS_N] / (EXTRUSION_AREA)) #endif @@ -826,7 +826,10 @@ #define ABL_PLANAR (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT)) #define ABL_GRID (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)) #define HAS_ABL (ABL_PLANAR || ABL_GRID || ENABLED(AUTO_BED_LEVELING_UBL)) - #define HAS_LEVELING (HAS_ABL || ENABLED(MESH_BED_LEVELING)) + #define HAS_LEVELING (HAS_ABL || ENABLED(MESH_BED_LEVELING)) + #define HAS_AUTOLEVEL (HAS_ABL && DISABLED(PROBE_MANUALLY)) + #define OLDSCHOOL_ABL (HAS_ABL && DISABLED(AUTO_BED_LEVELING_UBL)) + #define HAS_MESH (ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(MESH_BED_LEVELING)) #define PLANNER_LEVELING (ABL_PLANAR || ABL_GRID || ENABLED(MESH_BED_LEVELING) || UBL_DELTA) #define HAS_PROBING_PROCEDURE (HAS_ABL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)) #if HAS_PROBING_PROCEDURE diff --git a/Marlin/src/inc/MarlinConfig.h b/Marlin/src/inc/MarlinConfig.h index 847562b0de..10df8cb224 100644 --- a/Marlin/src/inc/MarlinConfig.h +++ b/Marlin/src/inc/MarlinConfig.h @@ -23,18 +23,25 @@ #ifndef MARLIN_CONFIG_H #define MARLIN_CONFIG_H -#include "macros.h" -#include "src/HAL/HAL.h" -#include "boards.h" +#include "../core/boards.h" +#include "../core/macros.h" #include "Version.h" -#include "Configuration.h" +#include "../config/Configuration.h" #include "Conditionals_LCD.h" -#include "Configuration_adv.h" -#include "pins.h" +#include "../config/Configuration_adv.h" +#include "../HAL/HAL.h" +#include "../pins/pins.h" #if defined(ARDUINO_ARCH_AVR) && !defined(USBCON) #define HardwareSerial_h // trick to disable the standard HWserial #endif #include "Conditionals_post.h" #include "SanityCheck.h" +// Include all core headers +#include "../core/enum.h" +#include "../core/language.h" +#include "../core/types.h" +#include "../core/utility.h" +#include "../core/serial.h" + #endif // MARLIN_CONFIG_H diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 151c1d1f30..2239e54776 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -301,7 +301,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, #error "BABYSTEPPING is not implemented for SCARA yet." #elif ENABLED(DELTA) && ENABLED(BABYSTEP_XY) #error "BABYSTEPPING only implemented for Z axis on deltabots." - #elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && ENABLED(MESH_BED_LEVELING) + #elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && ENABLED(MESH_BED_LEVELING) #error "MESH_BED_LEVELING and BABYSTEP_ZPROBE_OFFSET is not a valid combination" #elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && !HAS_BED_PROBE #error "BABYSTEP_ZPROBE_OFFSET requires a probe." @@ -643,12 +643,10 @@ static_assert(1 >= 0 /** * Require some kind of probe for bed leveling and probe testing */ - #if HAS_ABL - #if ENABLED(AUTO_BED_LEVELING_UBL) - #error "Unified Bed Leveling requires a probe: FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo." - #else - #error "Auto Bed Leveling requires one of these: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or a Z Servo." - #endif + #if ENABLED(AUTO_BED_LEVELING_UBL) + #error "Unified Bed Leveling requires a probe: FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo." + #elif HAS_ABL + #error "Auto Bed Leveling requires one of these: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or a Z Servo." #endif #endif @@ -918,10 +916,11 @@ static_assert(1 >= 0 #error "TEMP_SENSOR_0 is required." #endif -#if HOTENDS > 1 || ENABLED(HEATERS_PARALLEL) - #if !HAS_HEATER_1 - #error "HEATER_1_PIN not defined for this board." - #endif +// Pins are required for heaters +#if ENABLED(HEATER_0_USES_MAX6675) && !(defined(MAX6675_SS) && MAX6675_SS >= 0) + #error "MAX6675_SS (required for TEMP_SENSOR_0) not defined for this board." +#elif (HOTENDS > 1 || ENABLED(HEATERS_PARALLEL)) && !HAS_HEATER_1 + #error "HEATER_1_PIN not defined for this board." #endif #if HOTENDS > 1 @@ -1297,4 +1296,4 @@ static_assert(COUNT(sanity_arr_2) <= XYZE_N, "DEFAULT_MAX_FEEDRATE has too many static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too many elements."); -#include "src/HAL/HAL_SanityCheck.h" // get CPU specific checks +#include "../HAL/HAL_SanityCheck.h" // get CPU specific checks