Kaynağa Gözat

Merge pull request #6567 from thinkyhead/rc_sdcard_stop

Shutdown heaters, autotemp on SD Cancel
Scott Lahteine 8 yıl önce
ebeveyn
işleme
6834e36871

+ 1
- 1
.travis.yml Dosyayı Görüntüle

@@ -141,7 +141,7 @@ script:
141 141
   - restore_configs
142 142
   - opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
143 143
   - opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
144
-  - opt_enable_adv EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES
144
+  - opt_enable_adv EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP
145 145
   - build_marlin
146 146
   #
147 147
   # Test MESH_BED_LEVELING feature, with LCD

+ 1
- 8
Marlin/Marlin_main.cpp Dosyayı Görüntüle

@@ -1182,10 +1182,7 @@ inline void get_serial_commands() {
1182 1182
             LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS);
1183 1183
             set_led_color(0, 255, 0); // Green
1184 1184
             #if HAS_RESUME_CONTINUE
1185
-              KEEPALIVE_STATE(PAUSED_FOR_USER);
1186
-              wait_for_user = true;
1187
-              while (wait_for_user) idle();
1188
-              KEEPALIVE_STATE(IN_HANDLER);
1185
+              enqueue_and_echo_commands_P(PSTR("M0")); // end of the queue!
1189 1186
             #else
1190 1187
               safe_delay(1000);
1191 1188
             #endif
@@ -5762,10 +5759,6 @@ inline void gcode_M31() {
5762 5759
 
5763 5760
   SERIAL_ECHO_START;
5764 5761
   SERIAL_ECHOLNPAIR("Print time: ", buffer);
5765
-
5766
-  #if ENABLED(AUTOTEMP)
5767
-    thermalManager.autotempShutdown();
5768
-  #endif
5769 5762
 }
5770 5763
 
5771 5764
 #if ENABLED(SDSUPPORT)

+ 1
- 1
Marlin/cardreader.cpp Dosyayı Görüntüle

@@ -552,7 +552,7 @@ void CardReader::checkautostart(bool force) {
552 552
 
553 553
   bool found = false;
554 554
   while (root.readDir(p, NULL) > 0) {
555
-    for (int8_t i = 0; i < (int8_t)strlen((char*)p.name); i++) p.name[i] = tolower(p.name[i]);
555
+    for (int8_t i = (int8_t)strlen((char*)p.name); i--;) p.name[i] = tolower(p.name[i]);
556 556
     if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) {
557 557
       openAndPrintFile(autoname);
558 558
       found = true;

+ 1
- 1
Marlin/language_en.h Dosyayı Görüntüle

@@ -355,7 +355,7 @@
355 355
   #define MSG_DWELL                           _UxGT("Sleep...")
356 356
 #endif
357 357
 #ifndef MSG_USERWAIT
358
-  #define MSG_USERWAIT                        _UxGT("Wait for user...")
358
+  #define MSG_USERWAIT                        _UxGT("Click to resume...")
359 359
 #endif
360 360
 #ifndef MSG_RESUMING
361 361
   #define MSG_RESUMING                        _UxGT("Resuming print")

+ 7
- 1
Marlin/temperature.cpp Dosyayı Görüntüle

@@ -25,9 +25,10 @@
25 25
  */
26 26
 
27 27
 #include "Marlin.h"
28
-#include "ultralcd.h"
29 28
 #include "temperature.h"
30 29
 #include "thermistortables.h"
30
+#include "ultralcd.h"
31
+#include "planner.h"
31 32
 #include "language.h"
32 33
 
33 34
 #if ENABLED(HEATER_0_USES_MAX6675)
@@ -1288,6 +1289,11 @@ void Temperature::init() {
1288 1289
 #endif // THERMAL_PROTECTION_HOTENDS || THERMAL_PROTECTION_BED
1289 1290
 
1290 1291
 void Temperature::disable_all_heaters() {
1292
+
1293
+  #if ENABLED(AUTOTEMP)
1294
+    planner.autotemp_enabled = false;
1295
+  #endif
1296
+
1291 1297
   HOTEND_LOOP() setTargetHotend(0, e);
1292 1298
   setTargetBed(0);
1293 1299
 

+ 0
- 11
Marlin/temperature.h Dosyayı Görüntüle

@@ -27,7 +27,6 @@
27 27
 #ifndef TEMPERATURE_H
28 28
 #define TEMPERATURE_H
29 29
 
30
-#include "planner.h"
31 30
 #include "thermistortables.h"
32 31
 
33 32
 #include "MarlinConfig.h"
@@ -418,16 +417,6 @@ class Temperature {
418 417
      */
419 418
     static void updatePID();
420 419
 
421
-    #if ENABLED(AUTOTEMP)
422
-      static void autotempShutdown() {
423
-        if (planner.autotemp_enabled) {
424
-          planner.autotemp_enabled = false;
425
-          if (degTargetHotend(EXTRUDER_IDX) > planner.autotemp_min)
426
-            setTargetHotend(0, EXTRUDER_IDX);
427
-        }
428
-      }
429
-    #endif
430
-
431 420
     #if ENABLED(BABYSTEPPING)
432 421
 
433 422
       static void babystep_axis(const AxisEnum axis, const int distance) {

+ 3
- 2
Marlin/ultralcd.cpp Dosyayı Görüntüle

@@ -702,8 +702,9 @@ void kill_screen(const char* lcd_msg) {
702 702
       clear_command_queue();
703 703
       quickstop_stepper();
704 704
       print_job_timer.stop();
705
-      #if ENABLED(AUTOTEMP)
706
-        thermalManager.autotempShutdown();
705
+      thermalManager.disable_all_heaters();
706
+      #if FAN_COUNT > 0
707
+        for (uint8_t i = 0; i < FAN_COUNT; i++) fanSpeeds[i] = 0;
707 708
       #endif
708 709
       wait_for_heatup = false;
709 710
       LCD_MESSAGEPGM(MSG_PRINT_ABORTED);

Loading…
İptal
Kaydet