From dcfdef08c53c28a56cef43388e64f4cb33c325b2 Mon Sep 17 00:00:00 2001 From: MRprusa3d Date: Wed, 17 Apr 2019 22:49:34 +0200 Subject: [PATCH] fix @ preHeatError IV --- Firmware/temperature.cpp | 19 +++---------------- ...5mm_MK2-MultiMaterial-RAMBo10a-E3Dv6full.h | 4 +++- ...5mm_MK2-MultiMaterial-RAMBo13a-E3Dv6full.h | 4 +++- .../variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h | 4 +++- .../variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h | 4 +++- 5 files changed, 15 insertions(+), 20 deletions(-) diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index cc547bc5d..2dc4aed77 100644 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -1113,7 +1113,6 @@ void setWatch() #if (defined (TEMP_RUNAWAY_BED_HYSTERESIS) && TEMP_RUNAWAY_BED_TIMEOUT > 0) || (defined (TEMP_RUNAWAY_EXTRUDER_HYSTERESIS) && TEMP_RUNAWAY_EXTRUDER_TIMEOUT > 0) void temp_runaway_check(int _heater_id, float _target_temperature, float _current_temperature, float _output, bool _isbed) { - float __delta; float __hysteresis = 0; int __timeout = 0; bool temp_runaway_check_active = false; @@ -1129,8 +1128,6 @@ void temp_runaway_check(int _heater_id, float _target_temperature, float _curren if (_isbed) { __hysteresis = TEMP_RUNAWAY_BED_HYSTERESIS; - if(_target_temperature>105.0) - __hysteresis = TEMP_RUNAWAY_BED_HYSTERESIS * 3.0; __timeout = TEMP_RUNAWAY_BED_TIMEOUT; } #endif @@ -1179,16 +1176,7 @@ void temp_runaway_check(int _heater_id, float _target_temperature, float _curren SERIAL_ECHOPGM(" delta:"); MYSERIAL.print(_current_temperature-__preheat_start[_heater_id]);*/ -//-// if (_current_temperature - __preheat_start[_heater_id] < 2) { -//-// if (_current_temperature - __preheat_start[_heater_id] < ((_isbed && (_current_temperature>105.0))?0.6:2.0)) { - __delta=2.0; - if(_isbed) - { - __delta=3.0; - if(_current_temperature>90.0) __delta=2.0; - if(_current_temperature>105.0) __delta=0.6; - } - if (_current_temperature - __preheat_start[_heater_id] < __delta) { + if (_current_temperature - __preheat_start[_heater_id] < 2) { __preheat_errors[_heater_id]++; /*SERIAL_ECHOPGM(" Preheat errors:"); MYSERIAL.println(__preheat_errors[_heater_id]);*/ @@ -1209,8 +1197,7 @@ void temp_runaway_check(int _heater_id, float _target_temperature, float _curren } } -//-// if (_current_temperature >= _target_temperature && temp_runaway_status[_heater_id] == TempRunaway_PREHEAT) - if ((_current_temperature > (_target_temperature - __hysteresis)) && temp_runaway_status[_heater_id] == TempRunaway_PREHEAT) + if (((_isbed && (_target_temperature > TEMP_MAX_CHECKED_BED) && (_current_temperature > TEMP_MAX_CHECKED_BED)) || (_current_temperature > (_target_temperature - __hysteresis))) && (temp_runaway_status[_heater_id] == TempRunaway_PREHEAT)) { /*SERIAL_ECHOPGM("Heater:"); MYSERIAL.print(_heater_id); @@ -1229,7 +1216,7 @@ void temp_runaway_check(int _heater_id, float _target_temperature, float _curren if (temp_runaway_check_active) { // we are in range - if ((_current_temperature > (_target_temperature - __hysteresis)) && (_current_temperature < (_target_temperature + __hysteresis))) + if ((_isbed && (_target_temperature > TEMP_MAX_CHECKED_BED) && (_current_temperature > TEMP_MAX_CHECKED_BED)) || ((_current_temperature > (_target_temperature - __hysteresis)) && (_current_temperature < (_target_temperature + __hysteresis)))) { temp_runaway_check_active = false; temp_runaway_error_counter[_heater_id] = 0; diff --git a/Firmware/variants/1_75mm_MK2-MultiMaterial-RAMBo10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK2-MultiMaterial-RAMBo10a-E3Dv6full.h index 506fb4d5b..9e4ff1a2e 100644 --- a/Firmware/variants/1_75mm_MK2-MultiMaterial-RAMBo10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK2-MultiMaterial-RAMBo10a-E3Dv6full.h @@ -99,7 +99,7 @@ EXTRUDER SETTINGS #endif #define HEATER_1_MAXTEMP 305 #define HEATER_2_MAXTEMP 305 -#define BED_MAXTEMP 150 +#define BED_MAXTEMP 125 #if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP) // Define PID constants for extruder with PT100 @@ -176,6 +176,8 @@ ADDITIONAL FEATURES SETTINGS #endif // temperature runaway +#define TEMP_MAX_CHECKED_BED 95.0 + #define TEMP_RUNAWAY_BED_HYSTERESIS 5 #define TEMP_RUNAWAY_BED_TIMEOUT 360 diff --git a/Firmware/variants/1_75mm_MK2-MultiMaterial-RAMBo13a-E3Dv6full.h b/Firmware/variants/1_75mm_MK2-MultiMaterial-RAMBo13a-E3Dv6full.h index c953740eb..a3c39a180 100644 --- a/Firmware/variants/1_75mm_MK2-MultiMaterial-RAMBo13a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK2-MultiMaterial-RAMBo13a-E3Dv6full.h @@ -99,7 +99,7 @@ EXTRUDER SETTINGS #endif #define HEATER_1_MAXTEMP 305 #define HEATER_2_MAXTEMP 305 -#define BED_MAXTEMP 150 +#define BED_MAXTEMP 125 #if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP) // Define PID constants for extruder with PT100 @@ -178,6 +178,8 @@ ADDITIONAL FEATURES SETTINGS #endif // temperature runaway +#define TEMP_MAX_CHECKED_BED 95.0 + #define TEMP_RUNAWAY_BED_HYSTERESIS 5 #define TEMP_RUNAWAY_BED_TIMEOUT 360 diff --git a/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h index 96bf8dd03..5833e3a8f 100644 --- a/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h @@ -99,7 +99,7 @@ EXTRUDER SETTINGS #endif #define HEATER_1_MAXTEMP 305 #define HEATER_2_MAXTEMP 305 -#define BED_MAXTEMP 150 +#define BED_MAXTEMP 125 #if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP) // Define PID constants for extruder with PT100 @@ -176,6 +176,8 @@ ADDITIONAL FEATURES SETTINGS #endif // temperature runaway +#define TEMP_MAX_CHECKED_BED 95.0 + #define TEMP_RUNAWAY_BED_HYSTERESIS 5 #define TEMP_RUNAWAY_BED_TIMEOUT 360 diff --git a/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h b/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h index 150176698..4cfa53239 100644 --- a/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h @@ -99,7 +99,7 @@ EXTRUDER SETTINGS #endif #define HEATER_1_MAXTEMP 305 #define HEATER_2_MAXTEMP 305 -#define BED_MAXTEMP 150 +#define BED_MAXTEMP 125 #if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP) // Define PID constants for extruder with PT100 @@ -178,6 +178,8 @@ ADDITIONAL FEATURES SETTINGS #endif // temperature runaway +#define TEMP_MAX_CHECKED_BED 95.0 + #define TEMP_RUNAWAY_BED_HYSTERESIS 5 #define TEMP_RUNAWAY_BED_TIMEOUT 360