ソースを参照

Merge pull request #6567 from thinkyhead/rc_sdcard_stop

Shutdown heaters, autotemp on SD Cancel
Scott Lahteine 8年前
コミット
6834e36871
7個のファイルの変更14行の追加25行の削除
  1. 1
    1
      .travis.yml
  2. 1
    8
      Marlin/Marlin_main.cpp
  3. 1
    1
      Marlin/cardreader.cpp
  4. 1
    1
      Marlin/language_en.h
  5. 7
    1
      Marlin/temperature.cpp
  6. 0
    11
      Marlin/temperature.h
  7. 3
    2
      Marlin/ultralcd.cpp

+ 1
- 1
.travis.yml ファイルの表示

141
   - restore_configs
141
   - restore_configs
142
   - opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
142
   - opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
143
   - opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
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
   - build_marlin
145
   - build_marlin
146
   #
146
   #
147
   # Test MESH_BED_LEVELING feature, with LCD
147
   # Test MESH_BED_LEVELING feature, with LCD

+ 1
- 8
Marlin/Marlin_main.cpp ファイルの表示

1182
             LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS);
1182
             LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS);
1183
             set_led_color(0, 255, 0); // Green
1183
             set_led_color(0, 255, 0); // Green
1184
             #if HAS_RESUME_CONTINUE
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
             #else
1186
             #else
1190
               safe_delay(1000);
1187
               safe_delay(1000);
1191
             #endif
1188
             #endif
5762
 
5759
 
5763
   SERIAL_ECHO_START;
5760
   SERIAL_ECHO_START;
5764
   SERIAL_ECHOLNPAIR("Print time: ", buffer);
5761
   SERIAL_ECHOLNPAIR("Print time: ", buffer);
5765
-
5766
-  #if ENABLED(AUTOTEMP)
5767
-    thermalManager.autotempShutdown();
5768
-  #endif
5769
 }
5762
 }
5770
 
5763
 
5771
 #if ENABLED(SDSUPPORT)
5764
 #if ENABLED(SDSUPPORT)

+ 1
- 1
Marlin/cardreader.cpp ファイルの表示

552
 
552
 
553
   bool found = false;
553
   bool found = false;
554
   while (root.readDir(p, NULL) > 0) {
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
     if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) {
556
     if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) {
557
       openAndPrintFile(autoname);
557
       openAndPrintFile(autoname);
558
       found = true;
558
       found = true;

+ 1
- 1
Marlin/language_en.h ファイルの表示

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

+ 7
- 1
Marlin/temperature.cpp ファイルの表示

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

+ 0
- 11
Marlin/temperature.h ファイルの表示

27
 #ifndef TEMPERATURE_H
27
 #ifndef TEMPERATURE_H
28
 #define TEMPERATURE_H
28
 #define TEMPERATURE_H
29
 
29
 
30
-#include "planner.h"
31
 #include "thermistortables.h"
30
 #include "thermistortables.h"
32
 
31
 
33
 #include "MarlinConfig.h"
32
 #include "MarlinConfig.h"
418
      */
417
      */
419
     static void updatePID();
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
     #if ENABLED(BABYSTEPPING)
420
     #if ENABLED(BABYSTEPPING)
432
 
421
 
433
       static void babystep_axis(const AxisEnum axis, const int distance) {
422
       static void babystep_axis(const AxisEnum axis, const int distance) {

+ 3
- 2
Marlin/ultralcd.cpp ファイルの表示

702
       clear_command_queue();
702
       clear_command_queue();
703
       quickstop_stepper();
703
       quickstop_stepper();
704
       print_job_timer.stop();
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
       #endif
708
       #endif
708
       wait_for_heatup = false;
709
       wait_for_heatup = false;
709
       LCD_MESSAGEPGM(MSG_PRINT_ABORTED);
710
       LCD_MESSAGEPGM(MSG_PRINT_ABORTED);

読み込み中…
キャンセル
保存