From ad64723354089e9a900f49319972962cd2236f97 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 22 Oct 2016 10:07:51 -0500 Subject: [PATCH] Move MAX_EXTRUDERS to pins.h --- Marlin/configuration_store.cpp | 1 - Marlin/pins.h | 4 ++++ Marlin/temperature.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp index cb958d977..d46217f57 100644 --- a/Marlin/configuration_store.cpp +++ b/Marlin/configuration_store.cpp @@ -40,7 +40,6 @@ // Change EEPROM version if these are changed: #define EEPROM_OFFSET 100 -#define MAX_EXTRUDERS 4 /** * V24 EEPROM Layout: diff --git a/Marlin/pins.h b/Marlin/pins.h index bfb30abec..f0720d7bf 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -275,6 +275,10 @@ #define SUICIDE_PIN -1 #endif +#ifndef MAX_EXTRUDERS + #define MAX_EXTRUDERS 4 +#endif + // Marlin needs to account for pins that equal -1 #define marlinAnalogInputToDigitalPin(p) ((p) == -1 ? -1 : analogInputToDigitalPin(p)) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 731dae9c7..0d36f15b3 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -151,7 +151,7 @@ volatile bool Temperature::temp_meas_ready = false; millis_t Temperature::next_bed_check_ms; #endif -unsigned long Temperature::raw_temp_value[4] = { 0 }; +unsigned long Temperature::raw_temp_value[MAX_EXTRUDERS] = { 0 }; unsigned long Temperature::raw_temp_bed_value = 0; // Init min and max temp with extreme values to prevent false errors during startup