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.
master
MagoKimbra 9 years ago committed by Richard Wackerbarth
parent 55b23c896a
commit eb81982fcd

@ -4510,9 +4510,6 @@ inline void gcode_M303() {
int c = code_seen('C') ? code_value_short() : 5;
float temp = code_seen('S') ? code_value() : (e < 0 ? 70.0 : 150.0);
PID_autotune(temp, e, c);
// Suppress a line mismatch error
gcode_LastN += 1;
FlushSerialRequestResend();
}
#ifdef SCARA

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

@ -191,8 +191,7 @@ static void updateTemperaturesFromRawValues();
//================================ Functions ================================
//===========================================================================
void PID_autotune(float temp, int extruder, int ncycles)
{
void PID_autotune(float temp, int extruder, int ncycles) {
float input = 0.0;
int cycles = 0;
bool heating = true;
@ -324,11 +323,11 @@ void PID_autotune(float temp, int extruder, int ncycles)
int p;
if (extruder < 0) {
p = soft_pwm_bed;
SERIAL_PROTOCOLPGM(MSG_OK_B);
SERIAL_PROTOCOLPGM(MSG_B);
}
else {
p = soft_pwm[extruder];
SERIAL_PROTOCOLPGM(MSG_OK_T);
SERIAL_PROTOCOLPGM(MSG_T);
}
SERIAL_PROTOCOL(input);

Loading…
Cancel
Save