|
|
@ -898,12 +898,16 @@ inline void process_commands()
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PIDTEMP
|
|
|
|
#ifdef PIDTEMP
|
|
|
|
case 301: // M301
|
|
|
|
case 301: // M301
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(code_seen('P')) Kp = code_value();
|
|
|
|
if(code_seen('P')) Kp = code_value();
|
|
|
|
if(code_seen('I')) Ki = code_value()*PID_dT;
|
|
|
|
if(code_seen('I')) Ki = code_value()*PID_dT;
|
|
|
|
if(code_seen('D')) Kd = code_value()/PID_dT;
|
|
|
|
if(code_seen('D')) Kd = code_value()/PID_dT;
|
|
|
|
#ifdef PID_ADD_EXTRUSION_RATE
|
|
|
|
#ifdef PID_ADD_EXTRUSION_RATE
|
|
|
|
if(code_seen('C')) Kc = code_value();
|
|
|
|
if(code_seen('C')) Kc = code_value();
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
updatePID();
|
|
|
|
SERIAL_PROTOCOL("ok p:");
|
|
|
|
SERIAL_PROTOCOL("ok p:");
|
|
|
|
SERIAL_PROTOCOL(Kp);
|
|
|
|
SERIAL_PROTOCOL(Kp);
|
|
|
|
SERIAL_PROTOCOL(" i:");
|
|
|
|
SERIAL_PROTOCOL(" i:");
|
|
|
@ -915,7 +919,7 @@ inline void process_commands()
|
|
|
|
SERIAL_PROTOCOL(Kc*PID_dT);
|
|
|
|
SERIAL_PROTOCOL(Kc*PID_dT);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
SERIAL_PROTOCOLLN("");
|
|
|
|
SERIAL_PROTOCOLLN("");
|
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
#endif //PIDTEMP
|
|
|
|
#endif //PIDTEMP
|
|
|
|
case 400: // finish all moves
|
|
|
|
case 400: // finish all moves
|
|
|
|