Browse Source

Merge pull request #2067 from thinkyhead/thermal_unified

Fix heating error message
pull/1/head
Scott Lahteine 10 years ago
parent
commit
56090fc374
  1. 2
      Marlin/Configuration_adv.h
  2. 2
      Marlin/configurator/config/Configuration_adv.h
  3. 2
      Marlin/example_configurations/Felix/Configuration_adv.h
  4. 2
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  5. 2
      Marlin/example_configurations/K8200/Configuration_adv.h
  6. 2
      Marlin/example_configurations/SCARA/Configuration_adv.h
  7. 2
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  8. 2
      Marlin/example_configurations/delta/biv2.5/Configuration_adv.h
  9. 2
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  10. 2
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  11. 2
      Marlin/example_configurations/makibox/Configuration_adv.h
  12. 2
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  13. 10
      Marlin/temperature.cpp
  14. 45
      Marlin/ultralcd.cpp

2
Marlin/Configuration_adv.h

@ -25,7 +25,7 @@
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
* but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees.
* but only if the current temperature is far enough below the target for a reliable test.
*/
#define WATCH_TEMP_PERIOD 16 // Seconds
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius

2
Marlin/configurator/config/Configuration_adv.h

@ -25,7 +25,7 @@
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
* but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees.
* but only if the current temperature is far enough below the target for a reliable test.
*/
#define WATCH_TEMP_PERIOD 16 // Seconds
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius

2
Marlin/example_configurations/Felix/Configuration_adv.h

@ -25,7 +25,7 @@
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
* but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees.
* but only if the current temperature is far enough below the target for a reliable test.
*/
#define WATCH_TEMP_PERIOD 16 // Seconds
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius

2
Marlin/example_configurations/Hephestos/Configuration_adv.h

@ -25,7 +25,7 @@
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
* but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees.
* but only if the current temperature is far enough below the target for a reliable test.
*/
#define WATCH_TEMP_PERIOD 16 // Seconds
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius

2
Marlin/example_configurations/K8200/Configuration_adv.h

@ -25,7 +25,7 @@
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
* but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees.
* but only if the current temperature is far enough below the target for a reliable test.
*/
#define WATCH_TEMP_PERIOD 16 // Seconds
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius

2
Marlin/example_configurations/SCARA/Configuration_adv.h

@ -25,7 +25,7 @@
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
* but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees.
* but only if the current temperature is far enough below the target for a reliable test.
*/
#define WATCH_TEMP_PERIOD 16 // Seconds
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius

2
Marlin/example_configurations/WITBOX/Configuration_adv.h

@ -25,7 +25,7 @@
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
* but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees.
* but only if the current temperature is far enough below the target for a reliable test.
*/
#define WATCH_TEMP_PERIOD 16 // Seconds
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius

2
Marlin/example_configurations/delta/biv2.5/Configuration_adv.h

@ -25,7 +25,7 @@
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
* but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees.
* but only if the current temperature is far enough below the target for a reliable test.
*/
#define WATCH_TEMP_PERIOD 16 // Seconds
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius

2
Marlin/example_configurations/delta/generic/Configuration_adv.h

@ -25,7 +25,7 @@
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
* but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees.
* but only if the current temperature is far enough below the target for a reliable test.
*/
#define WATCH_TEMP_PERIOD 16 // Seconds
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius

2
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h

@ -25,7 +25,7 @@
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
* but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees.
* but only if the current temperature is far enough below the target for a reliable test.
*/
#define WATCH_TEMP_PERIOD 16 // Seconds
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius

2
Marlin/example_configurations/makibox/Configuration_adv.h

@ -25,7 +25,7 @@
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
* but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees.
* but only if the current temperature is far enough below the target for a reliable test.
*/
#define WATCH_TEMP_PERIOD 16 // Seconds
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius

2
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h

@ -25,7 +25,7 @@
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
* WATCH_TEMP_PERIOD to transpire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
* but only if the current temperature is below the target by at least 2 * WATCH_TEMP_INCREASE degrees.
* but only if the current temperature is far enough below the target for a reliable test.
*/
#define WATCH_TEMP_PERIOD 16 // Seconds
#define WATCH_TEMP_INCREASE 4 // Degrees Celsius

10
Marlin/temperature.cpp

@ -620,19 +620,21 @@ void manage_heater() {
// Check if the temperature is failing to increase
#ifdef THERMAL_PROTECTION_HOTENDS
// Is it time to check this extruder's heater?
if (watch_heater_next_ms[e] && ms > watch_heater_next_ms[e]) {
// Has it failed to increase enough?
if (degHotend(e) < watch_target_temp[e]) {
// Stop!
disable_all_heaters();
_temp_error(e, MSG_HEATING_FAILED, MSG_HEATING_FAILED_LCD);
_temp_error(e, PSTR(MSG_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD));
}
else {
// Only check once per M104/M109
watch_heater_next_ms[e] = 0;
// Start again if the target is still far off
start_watching_heater(e);
}
}
#endif // THERMAL_PROTECTION_HOTENDS
#ifdef TEMP_SENSOR_1_AS_REDUNDANT
@ -1005,7 +1007,7 @@ void tp_init() {
*/
void start_watching_heater(int e) {
millis_t ms = millis() + WATCH_TEMP_PERIOD * 1000;
if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE * 2)) {
if (degHotend(e) < degTargetHotend(e) - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1)) {
watch_target_temp[e] = degHotend(e) + WATCH_TEMP_INCREASE;
watch_heater_next_ms[e] = ms;
}

45
Marlin/ultralcd.cpp

@ -7,12 +7,11 @@
#include "stepper.h"
#include "configuration_store.h"
int8_t encoderDiff; /* encoderDiff is updated from interrupt context and added to encoderPosition every LCD update */
int8_t encoderDiff; // updated from interrupt context and added to encoderPosition every LCD update
bool encoderRateMultiplierEnabled;
int32_t lastEncoderMovementMillis;
/* Configuration settings */
int plaPreheatHotendTemp;
int plaPreheatHPBTemp;
int plaPreheatFanSpeed;
@ -25,8 +24,6 @@ int absPreheatFanSpeed;
millis_t previous_lcd_status_ms = 0;
#endif
/* !Configuration settings */
// Function pointer to menu functions.
typedef void (*menuFunc_t)();
@ -875,10 +872,17 @@ static void lcd_control_menu() {
* "Control" > "Temperature" submenu
*
*/
static void lcd_control_temperature_menu() {
START_MENU();
//
// ^ Control
//
MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
//
// Nozzle, Nozzle 2, Nozzle 3, Nozzle 4
//
#if TEMP_SENSOR_0 != 0
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15);
#endif
@ -897,16 +901,32 @@ static void lcd_control_temperature_menu() {
#endif // EXTRUDERS > 3
#endif // EXTRUDERS > 2
#endif // EXTRUDERS > 1
//
// Bed
//
#if TEMP_SENSOR_BED != 0
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
#endif
//
// Fan Speed
//
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
//
// Autotemp, Min, Max, Fact
//
#if defined(AUTOTEMP) && (TEMP_SENSOR_0 != 0)
MENU_ITEM_EDIT(bool, MSG_AUTOTEMP, &autotemp_enabled);
MENU_ITEM_EDIT(float3, MSG_MIN, &autotemp_min, 0, HEATER_0_MAXTEMP - 15);
MENU_ITEM_EDIT(float3, MSG_MAX, &autotemp_max, 0, HEATER_0_MAXTEMP - 15);
MENU_ITEM_EDIT(float32, MSG_FACTOR, &autotemp_factor, 0.0, 1.0);
#endif
//
// PID-P, PID-I, PID-D, PID-C
//
#ifdef PIDTEMP
// set up temp variables - undo the default scaling
raw_Ki = unscalePID_i(PID_PARAM(Ki,0));
@ -959,7 +979,15 @@ static void lcd_control_temperature_menu() {
#endif//EXTRUDERS > 1
#endif //PID_PARAMS_PER_EXTRUDER
#endif//PIDTEMP
//
// Preheat PLA conf
//
MENU_ITEM(submenu, MSG_PREHEAT_PLA_SETTINGS, lcd_control_temperature_preheat_pla_settings_menu);
//
// Preheat ABS conf
//
MENU_ITEM(submenu, MSG_PREHEAT_ABS_SETTINGS, lcd_control_temperature_preheat_abs_settings_menu);
END_MENU();
}
@ -969,7 +997,6 @@ static void lcd_control_temperature_menu() {
* "Temperature" > "Preheat PLA conf" submenu
*
*/
static void lcd_control_temperature_preheat_pla_settings_menu() {
START_MENU();
MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
@ -991,7 +1018,6 @@ static void lcd_control_temperature_preheat_pla_settings_menu() {
* "Temperature" > "Preheat ABS conf" submenu
*
*/
static void lcd_control_temperature_preheat_abs_settings_menu() {
START_MENU();
MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
@ -1013,7 +1039,6 @@ static void lcd_control_temperature_preheat_abs_settings_menu() {
* "Control" > "Motion" submenu
*
*/
static void lcd_control_motion_menu() {
START_MENU();
MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
@ -1055,7 +1080,6 @@ static void lcd_control_motion_menu() {
* "Control" > "Filament" submenu
*
*/
static void lcd_control_volumetric_menu() {
START_MENU();
MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
@ -1083,7 +1107,6 @@ static void lcd_control_volumetric_menu() {
* "Control" > "Contrast" submenu
*
*/
#ifdef HAS_LCD_CONTRAST
static void lcd_set_contrast() {
if (encoderPosition != 0) {
@ -1103,7 +1126,6 @@ static void lcd_control_volumetric_menu() {
* "Control" > "Retract" submenu
*
*/
#ifdef FWRETRACT
static void lcd_control_retract_menu() {
START_MENU();
@ -1141,7 +1163,6 @@ static void lcd_sd_updir() {
* "Print from SD" submenu
*
*/
void lcd_sdcard_menu() {
if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) return; // nothing to do (so don't thrash the SD card)
uint16_t fileCnt = card.getnrfilenames();

Loading…
Cancel
Save