Browse Source

Merge pull request #1989 from thinkyhead/pid_tuning_report

Fix the M303 S-1 report text
Scott Lahteine 10 years ago
parent
commit
a9a4f0ed3b
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      Marlin/temperature.cpp

+ 5
- 4
Marlin/temperature.cpp View File

@@ -188,7 +188,7 @@ static void updateTemperaturesFromRawValues();
188 188
 #endif
189 189
 
190 190
 //===========================================================================
191
-//================================ functions ================================
191
+//================================ Functions ================================
192 192
 //===========================================================================
193 193
 
194 194
 void PID_autotune(float temp, int extruder, int ncycles)
@@ -342,9 +342,10 @@ void PID_autotune(float temp, int extruder, int ncycles)
342 342
     }
343 343
     if (cycles > ncycles) {
344 344
       SERIAL_PROTOCOLLNPGM(MSG_PID_AUTOTUNE_FINISHED);
345
-      SERIAL_PROTOCOLPGM("#define  DEFAULT_Kp "); SERIAL_PROTOCOLLN(Kp);
346
-      SERIAL_PROTOCOLPGM("#define  DEFAULT_Ki "); SERIAL_PROTOCOLLN(Ki);
347
-      SERIAL_PROTOCOLPGM("#define  DEFAULT_Kd "); SERIAL_PROTOCOLLN(Kd);
345
+      const char *estring = extruder < 0 ? "bed" : "";
346
+      SERIAL_PROTOCOLPGM("#define  DEFAULT_"); SERIAL_PROTOCOL(estring); SERIAL_PROTOCOLPGM("Kp "); SERIAL_PROTOCOLLN(Kp);
347
+      SERIAL_PROTOCOLPGM("#define  DEFAULT_"); SERIAL_PROTOCOL(estring); SERIAL_PROTOCOLPGM("Ki "); SERIAL_PROTOCOLLN(Ki);
348
+      SERIAL_PROTOCOLPGM("#define  DEFAULT_"); SERIAL_PROTOCOL(estring); SERIAL_PROTOCOLPGM("Kd "); SERIAL_PROTOCOLLN(Kd);
348 349
       return;
349 350
     }
350 351
     lcd_update();

Loading…
Cancel
Save