소스 검색

Apply minimum C in M303 (#13113)

Apply minimum `C` in `M303`. `PID_autotune()` needs to be called with a 'C'ycles-parameter >2 to give meaningful (different from 0) PID-factors. Therefore silently raise C to 3. Fixing one aspect of #13104
AnHardt 6 년 전
부모
커밋
0e37fe8776
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 1
    1
      Marlin/src/gcode/temperature/M303.cpp
  2. 3
    1
      Marlin/src/module/temperature.cpp

+ 1
- 1
Marlin/src/gcode/temperature/M303.cpp 파일 보기

@@ -32,7 +32,7 @@
32 32
  *
33 33
  *       S<temperature> sets the target temperature. (default 150C / 70C)
34 34
  *       E<extruder> (-1 for the bed) (default 0)
35
- *       C<cycles>
35
+ *       C<cycles> Minimum 3. Default 5.
36 36
  *       U<bool> with a non-zero value will apply the result to current settings
37 37
  */
38 38
 void GcodeSuite::M303() {

+ 3
- 1
Marlin/src/module/temperature.cpp 파일 보기

@@ -330,6 +330,8 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS];
330 330
    *
331 331
    * Alternately heat and cool the nozzle, observing its behavior to
332 332
    * determine the best PID values to achieve a stable temperature.
333
+   * Needs sufficient heater power to make some overshoot at target
334
+   * temperature to succeed.
333 335
    */
334 336
   void Temperature::PID_autotune(const float &target, const int8_t heater, const int8_t ncycles, const bool set_result/*=false*/) {
335 337
     float current = 0.0;
@@ -540,7 +542,7 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS];
540 542
         break;
541 543
       }
542 544
 
543
-      if (cycles > ncycles) {
545
+      if (cycles > ncycles && cycles > 2) {
544 546
         SERIAL_ECHOLNPGM(MSG_PID_AUTOTUNE_FINISHED);
545 547
 
546 548
         #if HAS_PID_FOR_BOTH

Loading…
취소
저장