Kaynağa Gözat

Have M109 / M190 do nothing with no parameters

Scott Lahteine 8 yıl önce
ebeveyn
işleme
ecc537015a
1 değiştirilmiş dosya ile 16 ekleme ve 27 silme
  1. 16
    27
      Marlin/Marlin_main.cpp

+ 16
- 27
Marlin/Marlin_main.cpp Dosyayı Görüntüle

5854
 
5854
 
5855
     #if ENABLED(PRINTJOB_TIMER_AUTOSTART)
5855
     #if ENABLED(PRINTJOB_TIMER_AUTOSTART)
5856
       /**
5856
       /**
5857
-       * Stop the timer at the end of print, starting is managed by
5858
-       * 'heat and wait' M109.
5857
+       * Stop the timer at the end of print. Start is managed by 'heat and wait' M109.
5859
        * We use half EXTRUDE_MINTEMP here to allow nozzles to be put into hot
5858
        * We use half EXTRUDE_MINTEMP here to allow nozzles to be put into hot
5860
-       * stand by mode, for instance in a dual extruder setup, without affecting
5859
+       * standby mode, for instance in a dual extruder setup, without affecting
5861
        * the running print timer.
5860
        * the running print timer.
5862
        */
5861
        */
5863
       if (code_value_temp_abs() <= (EXTRUDE_MINTEMP)/2) {
5862
       if (code_value_temp_abs() <= (EXTRUDE_MINTEMP)/2) {
6039
     if (target_extruder != active_extruder) return;
6038
     if (target_extruder != active_extruder) return;
6040
   #endif
6039
   #endif
6041
 
6040
 
6042
-  bool no_wait_for_cooling = code_seen('S');
6041
+  const bool no_wait_for_cooling = code_seen('S');
6043
   if (no_wait_for_cooling || code_seen('R')) {
6042
   if (no_wait_for_cooling || code_seen('R')) {
6044
     thermalManager.setTargetHotend(code_value_temp_abs(), target_extruder);
6043
     thermalManager.setTargetHotend(code_value_temp_abs(), target_extruder);
6045
     #if ENABLED(DUAL_X_CARRIAGE)
6044
     #if ENABLED(DUAL_X_CARRIAGE)
6049
 
6048
 
6050
     #if ENABLED(PRINTJOB_TIMER_AUTOSTART)
6049
     #if ENABLED(PRINTJOB_TIMER_AUTOSTART)
6051
       /**
6050
       /**
6052
-       * We use half EXTRUDE_MINTEMP here to allow nozzles to be put into hot
6053
-       * stand by mode, for instance in a dual extruder setup, without affecting
6051
+       * Use half EXTRUDE_MINTEMP to allow nozzles to be put into hot
6052
+       * standby mode, (e.g., in a dual extruder setup) without affecting
6054
        * the running print timer.
6053
        * the running print timer.
6055
        */
6054
        */
6056
-      if (code_value_temp_abs() <= (EXTRUDE_MINTEMP)/2) {
6055
+      if (code_value_temp_abs() <= (EXTRUDE_MINTEMP) / 2) {
6057
         print_job_timer.stop();
6056
         print_job_timer.stop();
6058
         LCD_MESSAGEPGM(WELCOME_MSG);
6057
         LCD_MESSAGEPGM(WELCOME_MSG);
6059
       }
6058
       }
6060
-      /**
6061
-       * We do not check if the timer is already running because this check will
6062
-       * be done for us inside the Stopwatch::start() method thus a running timer
6063
-       * will not restart.
6064
-       */
6065
-      else print_job_timer.start();
6059
+      else
6060
+        print_job_timer.start();
6066
     #endif
6061
     #endif
6067
 
6062
 
6068
     if (thermalManager.isHeatingHotend(target_extruder)) lcd_status_printf_P(0, PSTR("E%i %s"), target_extruder + 1, MSG_HEATING);
6063
     if (thermalManager.isHeatingHotend(target_extruder)) lcd_status_printf_P(0, PSTR("E%i %s"), target_extruder + 1, MSG_HEATING);
6069
   }
6064
   }
6065
+  else return;
6070
 
6066
 
6071
   #if ENABLED(AUTOTEMP)
6067
   #if ENABLED(AUTOTEMP)
6072
     planner.autotemp_M104_M109();
6068
     planner.autotemp_M104_M109();
6079
   #else
6075
   #else
6080
     // Loop until the temperature is very close target
6076
     // Loop until the temperature is very close target
6081
     #define TEMP_CONDITIONS (wants_to_cool ? thermalManager.isCoolingHotend(target_extruder) : thermalManager.isHeatingHotend(target_extruder))
6077
     #define TEMP_CONDITIONS (wants_to_cool ? thermalManager.isCoolingHotend(target_extruder) : thermalManager.isHeatingHotend(target_extruder))
6082
-  #endif //TEMP_RESIDENCY_TIME > 0
6078
+  #endif
6083
 
6079
 
6084
   float theTarget = -1.0, old_temp = 9999.0;
6080
   float theTarget = -1.0, old_temp = 9999.0;
6085
   bool wants_to_cool = false;
6081
   bool wants_to_cool = false;
6134
         residency_start_ms = now;
6130
         residency_start_ms = now;
6135
       }
6131
       }
6136
 
6132
 
6137
-    #endif //TEMP_RESIDENCY_TIME > 0
6133
+    #endif
6138
 
6134
 
6139
     // Prevent a wait-forever situation if R is misused i.e. M109 R0
6135
     // Prevent a wait-forever situation if R is misused i.e. M109 R0
6140
     if (wants_to_cool) {
6136
     if (wants_to_cool) {
6171
     if (DEBUGGING(DRYRUN)) return;
6167
     if (DEBUGGING(DRYRUN)) return;
6172
 
6168
 
6173
     LCD_MESSAGEPGM(MSG_BED_HEATING);
6169
     LCD_MESSAGEPGM(MSG_BED_HEATING);
6174
-    bool no_wait_for_cooling = code_seen('S');
6170
+    const bool no_wait_for_cooling = code_seen('S');
6175
     if (no_wait_for_cooling || code_seen('R')) {
6171
     if (no_wait_for_cooling || code_seen('R')) {
6176
       thermalManager.setTargetBed(code_value_temp_abs());
6172
       thermalManager.setTargetBed(code_value_temp_abs());
6177
       #if ENABLED(PRINTJOB_TIMER_AUTOSTART)
6173
       #if ENABLED(PRINTJOB_TIMER_AUTOSTART)
6178
-        if (code_value_temp_abs() > BED_MINTEMP) {
6179
-          /**
6180
-          * We start the timer when 'heating and waiting' command arrives, LCD
6181
-          * functions never wait. Cooling down managed by extruders.
6182
-          *
6183
-          * We do not check if the timer is already running because this check will
6184
-          * be done for us inside the Stopwatch::start() method thus a running timer
6185
-          * will not restart.
6186
-          */
6174
+        if (code_value_temp_abs() > BED_MINTEMP)
6187
           print_job_timer.start();
6175
           print_job_timer.start();
6188
-        }
6189
       #endif
6176
       #endif
6190
     }
6177
     }
6178
+    else return;
6191
 
6179
 
6192
     #if TEMP_BED_RESIDENCY_TIME > 0
6180
     #if TEMP_BED_RESIDENCY_TIME > 0
6193
       millis_t residency_start_ms = 0;
6181
       millis_t residency_start_ms = 0;
6196
     #else
6184
     #else
6197
       // Loop until the temperature is very close target
6185
       // Loop until the temperature is very close target
6198
       #define TEMP_BED_CONDITIONS (wants_to_cool ? thermalManager.isCoolingBed() : thermalManager.isHeatingBed())
6186
       #define TEMP_BED_CONDITIONS (wants_to_cool ? thermalManager.isCoolingBed() : thermalManager.isHeatingBed())
6199
-    #endif //TEMP_BED_RESIDENCY_TIME > 0
6187
+    #endif
6200
 
6188
 
6201
     float theTarget = -1.0, old_temp = 9999.0;
6189
     float theTarget = -1.0, old_temp = 9999.0;
6202
     bool wants_to_cool = false;
6190
     bool wants_to_cool = false;
6378
 
6366
 
6379
   /**
6367
   /**
6380
    * M145: Set the heatup state for a material in the LCD menu
6368
    * M145: Set the heatup state for a material in the LCD menu
6369
+   *
6381
    *   S<material> (0=PLA, 1=ABS)
6370
    *   S<material> (0=PLA, 1=ABS)
6382
    *   H<hotend temp>
6371
    *   H<hotend temp>
6383
    *   B<bed temp>
6372
    *   B<bed temp>

Loading…
İptal
Kaydet