Merge pull request #6567 from thinkyhead/rc_sdcard_stop
Shutdown heaters, autotemp on SD Cancel
This commit is contained in:
commit
6834e36871
@ -141,7 +141,7 @@ script:
|
|||||||
- restore_configs
|
- restore_configs
|
||||||
- opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
|
- opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
|
||||||
- opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
|
- opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
|
||||||
- opt_enable_adv EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES
|
- opt_enable_adv EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP
|
||||||
- build_marlin
|
- build_marlin
|
||||||
#
|
#
|
||||||
# Test MESH_BED_LEVELING feature, with LCD
|
# Test MESH_BED_LEVELING feature, with LCD
|
||||||
|
@ -1182,10 +1182,7 @@ inline void get_serial_commands() {
|
|||||||
LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS);
|
LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS);
|
||||||
set_led_color(0, 255, 0); // Green
|
set_led_color(0, 255, 0); // Green
|
||||||
#if HAS_RESUME_CONTINUE
|
#if HAS_RESUME_CONTINUE
|
||||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
enqueue_and_echo_commands_P(PSTR("M0")); // end of the queue!
|
||||||
wait_for_user = true;
|
|
||||||
while (wait_for_user) idle();
|
|
||||||
KEEPALIVE_STATE(IN_HANDLER);
|
|
||||||
#else
|
#else
|
||||||
safe_delay(1000);
|
safe_delay(1000);
|
||||||
#endif
|
#endif
|
||||||
@ -5762,10 +5759,6 @@ inline void gcode_M31() {
|
|||||||
|
|
||||||
SERIAL_ECHO_START;
|
SERIAL_ECHO_START;
|
||||||
SERIAL_ECHOLNPAIR("Print time: ", buffer);
|
SERIAL_ECHOLNPAIR("Print time: ", buffer);
|
||||||
|
|
||||||
#if ENABLED(AUTOTEMP)
|
|
||||||
thermalManager.autotempShutdown();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
@ -552,7 +552,7 @@ void CardReader::checkautostart(bool force) {
|
|||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
while (root.readDir(p, NULL) > 0) {
|
while (root.readDir(p, NULL) > 0) {
|
||||||
for (int8_t i = 0; i < (int8_t)strlen((char*)p.name); i++) p.name[i] = tolower(p.name[i]);
|
for (int8_t i = (int8_t)strlen((char*)p.name); i--;) p.name[i] = tolower(p.name[i]);
|
||||||
if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) {
|
if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) {
|
||||||
openAndPrintFile(autoname);
|
openAndPrintFile(autoname);
|
||||||
found = true;
|
found = true;
|
||||||
|
@ -355,7 +355,7 @@
|
|||||||
#define MSG_DWELL _UxGT("Sleep...")
|
#define MSG_DWELL _UxGT("Sleep...")
|
||||||
#endif
|
#endif
|
||||||
#ifndef MSG_USERWAIT
|
#ifndef MSG_USERWAIT
|
||||||
#define MSG_USERWAIT _UxGT("Wait for user...")
|
#define MSG_USERWAIT _UxGT("Click to resume...")
|
||||||
#endif
|
#endif
|
||||||
#ifndef MSG_RESUMING
|
#ifndef MSG_RESUMING
|
||||||
#define MSG_RESUMING _UxGT("Resuming print")
|
#define MSG_RESUMING _UxGT("Resuming print")
|
||||||
|
@ -25,9 +25,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Marlin.h"
|
#include "Marlin.h"
|
||||||
#include "ultralcd.h"
|
|
||||||
#include "temperature.h"
|
#include "temperature.h"
|
||||||
#include "thermistortables.h"
|
#include "thermistortables.h"
|
||||||
|
#include "ultralcd.h"
|
||||||
|
#include "planner.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
|
|
||||||
#if ENABLED(HEATER_0_USES_MAX6675)
|
#if ENABLED(HEATER_0_USES_MAX6675)
|
||||||
@ -1288,6 +1289,11 @@ void Temperature::init() {
|
|||||||
#endif // THERMAL_PROTECTION_HOTENDS || THERMAL_PROTECTION_BED
|
#endif // THERMAL_PROTECTION_HOTENDS || THERMAL_PROTECTION_BED
|
||||||
|
|
||||||
void Temperature::disable_all_heaters() {
|
void Temperature::disable_all_heaters() {
|
||||||
|
|
||||||
|
#if ENABLED(AUTOTEMP)
|
||||||
|
planner.autotemp_enabled = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
HOTEND_LOOP() setTargetHotend(0, e);
|
HOTEND_LOOP() setTargetHotend(0, e);
|
||||||
setTargetBed(0);
|
setTargetBed(0);
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
#ifndef TEMPERATURE_H
|
#ifndef TEMPERATURE_H
|
||||||
#define TEMPERATURE_H
|
#define TEMPERATURE_H
|
||||||
|
|
||||||
#include "planner.h"
|
|
||||||
#include "thermistortables.h"
|
#include "thermistortables.h"
|
||||||
|
|
||||||
#include "MarlinConfig.h"
|
#include "MarlinConfig.h"
|
||||||
@ -418,16 +417,6 @@ class Temperature {
|
|||||||
*/
|
*/
|
||||||
static void updatePID();
|
static void updatePID();
|
||||||
|
|
||||||
#if ENABLED(AUTOTEMP)
|
|
||||||
static void autotempShutdown() {
|
|
||||||
if (planner.autotemp_enabled) {
|
|
||||||
planner.autotemp_enabled = false;
|
|
||||||
if (degTargetHotend(EXTRUDER_IDX) > planner.autotemp_min)
|
|
||||||
setTargetHotend(0, EXTRUDER_IDX);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(BABYSTEPPING)
|
#if ENABLED(BABYSTEPPING)
|
||||||
|
|
||||||
static void babystep_axis(const AxisEnum axis, const int distance) {
|
static void babystep_axis(const AxisEnum axis, const int distance) {
|
||||||
|
@ -702,8 +702,9 @@ void kill_screen(const char* lcd_msg) {
|
|||||||
clear_command_queue();
|
clear_command_queue();
|
||||||
quickstop_stepper();
|
quickstop_stepper();
|
||||||
print_job_timer.stop();
|
print_job_timer.stop();
|
||||||
#if ENABLED(AUTOTEMP)
|
thermalManager.disable_all_heaters();
|
||||||
thermalManager.autotempShutdown();
|
#if FAN_COUNT > 0
|
||||||
|
for (uint8_t i = 0; i < FAN_COUNT; i++) fanSpeeds[i] = 0;
|
||||||
#endif
|
#endif
|
||||||
wait_for_heatup = false;
|
wait_for_heatup = false;
|
||||||
LCD_MESSAGEPGM(MSG_PRINT_ABORTED);
|
LCD_MESSAGEPGM(MSG_PRINT_ABORTED);
|
||||||
|
Loading…
Reference in New Issue
Block a user