From 740f0c76902aa6182555b0123b7944b6331604e5 Mon Sep 17 00:00:00 2001 From: Phil Hord Date: Sun, 26 Feb 2012 18:46:34 -0500 Subject: [PATCH 1/2] Add explicit #define for bogus temp override The code to ignore the "bad thermistor reading failsafe" suicide function depends on the existing of the PS_ON pin feature. But in some boards this shouldn't be the case Fix this by adding an explicit definition to make our intentions more clear and separable. --- Marlin/pins.h | 3 +++ Marlin/temperature.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Marlin/pins.h b/Marlin/pins.h index e950cbe683..52aae6b7ed 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -111,6 +111,9 @@ #endif #define PS_ON_PIN 15 +// Gen 1.3 and earlier supplied thermistor power via PS_ON +// Need to ignore the bad thermistor readings on those units +#define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE //our pin for debugging. #define DEBUG_PIN 0 diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 6efbbd1d94..069674be90 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -851,7 +851,7 @@ ISR(TIMER0_COMPB_vect) for(unsigned char e = 0; e < EXTRUDERS; e++) { if(current_raw[e] >= maxttemp[e]) { target_raw[e] = 0; - #if (PS_ON != -1) + #ifndef BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE { max_temp_error(e); kill();; @@ -860,7 +860,7 @@ ISR(TIMER0_COMPB_vect) } if(current_raw[e] <= minttemp[e]) { target_raw[e] = 0; - #if (PS_ON != -1) + #ifndef BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE { min_temp_error(e); kill(); From b65ef8d66c99bb909966ef4d1576f347cbe88b19 Mon Sep 17 00:00:00 2001 From: Phil Hord Date: Sun, 26 Feb 2012 20:39:49 -0500 Subject: [PATCH 2/2] Add support for upcoming Gen7 v1.4 V1.4 moves thermistor power to the always-on 5v line. The BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE is no longer needed on this board. Add a new motherboard type to support this feature. --- Marlin/Configuration.h | 1 + Marlin/pins.h | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 38bb61c5c6..74c03eb04c 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -19,6 +19,7 @@ // Gen7 custom (Alfons3 Version) = 10 "https://github.com/Alfons3/Generation_7_Electronics" // Gen7 v1.1, v1.2 = 11 // Gen7 v1.3 = 12 +// Gen7 v1.4 = 13 // MEGA/RAMPS up to 1.2 = 3 // RAMPS 1.3 = 33 (Power outputs: Extruder, Bed, Fan) // RAMPS 1.3 = 34 (Power outputs: Extruder0, Extruder1, Bed) diff --git a/Marlin/pins.h b/Marlin/pins.h index 52aae6b7ed..2fa53126f7 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -45,13 +45,19 @@ #endif /* 99 */ /**************************************************************************************** -* Gen7 v1.1, v1.2, v1.3 pin assignment +* Gen7 v1.1, v1.2, v1.3, v1.4 pin assignment * ****************************************************************************************/ + +#if MOTHERBOARD == 13 +#define MOTHERBOARD 11 +#define GEN7_VERSION 14 // v1.4 +#endif + #if MOTHERBOARD == 12 #define MOTHERBOARD 11 -#define GEN7_V_1_3 +#define GEN7_VERSION 13 // v1.3 #endif #if MOTHERBOARD == 11 @@ -62,6 +68,10 @@ #endif +#ifndef GEN7_VERSION +#define GEN7_VERSION 12 // v1.x +#endif + //x axis pins #define X_STEP_PIN 19 #define X_DIR_PIN 18 @@ -103,7 +113,7 @@ #define SDSS -1 // SCL pin of I2C header #define LED_PIN -1 -#ifdef GEN7_V_1_3 +#if (GEN7_VERSION >= 13) // Gen7 v1.3 removed the fan pin #define FAN_PIN -1 #else @@ -111,9 +121,12 @@ #endif #define PS_ON_PIN 15 +#if (GEN7_VERSION < 14) // Gen 1.3 and earlier supplied thermistor power via PS_ON // Need to ignore the bad thermistor readings on those units #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE +#endif + //our pin for debugging. #define DEBUG_PIN 0