Browse Source

Fix error next command in autotune (PR#2274)

Now send only temperature for T or B, but not send OK.
Host interprets the line to show the right temperature, but not in
response to M105 then stop and send commands until it ends the autotune.
MagoKimbra 10 years ago
parent
commit
eb81982fcd
3 changed files with 5 additions and 9 deletions
  1. 0
    3
      Marlin/Marlin_main.cpp
  2. 2
    2
      Marlin/language.h
  3. 3
    4
      Marlin/temperature.cpp

+ 0
- 3
Marlin/Marlin_main.cpp View File

4510
   int c = code_seen('C') ? code_value_short() : 5;
4510
   int c = code_seen('C') ? code_value_short() : 5;
4511
   float temp = code_seen('S') ? code_value() : (e < 0 ? 70.0 : 150.0);
4511
   float temp = code_seen('S') ? code_value() : (e < 0 ? 70.0 : 150.0);
4512
   PID_autotune(temp, e, c);
4512
   PID_autotune(temp, e, c);
4513
-  // Suppress a line mismatch error
4514
-  gcode_LastN += 1;
4515
-  FlushSerialRequestResend();
4516
 }
4513
 }
4517
 
4514
 
4518
 #ifdef SCARA
4515
 #ifdef SCARA

+ 2
- 2
Marlin/language.h View File

195
 #define MSG_KP                              " Kp: "
195
 #define MSG_KP                              " Kp: "
196
 #define MSG_KI                              " Ki: "
196
 #define MSG_KI                              " Ki: "
197
 #define MSG_KD                              " Kd: "
197
 #define MSG_KD                              " Kd: "
198
-#define MSG_OK_B                            "ok B:"
199
-#define MSG_OK_T                            "ok T:"
198
+#define MSG_B                               "B:"
199
+#define MSG_T                               "T:"
200
 #define MSG_AT                              " @:"
200
 #define MSG_AT                              " @:"
201
 #define MSG_PID_AUTOTUNE_FINISHED           MSG_PID_AUTOTUNE " finished! Put the last Kp, Ki and Kd constants from below into Configuration.h"
201
 #define MSG_PID_AUTOTUNE_FINISHED           MSG_PID_AUTOTUNE " finished! Put the last Kp, Ki and Kd constants from below into Configuration.h"
202
 #define MSG_PID_DEBUG                       " PID_DEBUG "
202
 #define MSG_PID_DEBUG                       " PID_DEBUG "

+ 3
- 4
Marlin/temperature.cpp View File

191
 //================================ Functions ================================
191
 //================================ Functions ================================
192
 //===========================================================================
192
 //===========================================================================
193
 
193
 
194
-void PID_autotune(float temp, int extruder, int ncycles)
195
-{
194
+void PID_autotune(float temp, int extruder, int ncycles) {
196
   float input = 0.0;
195
   float input = 0.0;
197
   int cycles = 0;
196
   int cycles = 0;
198
   bool heating = true;
197
   bool heating = true;
324
       int p;
323
       int p;
325
       if (extruder < 0) {
324
       if (extruder < 0) {
326
         p = soft_pwm_bed;
325
         p = soft_pwm_bed;
327
-        SERIAL_PROTOCOLPGM(MSG_OK_B);
326
+        SERIAL_PROTOCOLPGM(MSG_B);
328
       }
327
       }
329
       else {
328
       else {
330
         p = soft_pwm[extruder];
329
         p = soft_pwm[extruder];
331
-        SERIAL_PROTOCOLPGM(MSG_OK_T);
330
+        SERIAL_PROTOCOLPGM(MSG_T);
332
       }
331
       }
333
 
332
 
334
       SERIAL_PROTOCOL(input);
333
       SERIAL_PROTOCOL(input);

Loading…
Cancel
Save