|
@@ -898,24 +898,28 @@ inline void process_commands()
|
898
|
898
|
|
899
|
899
|
#ifdef PIDTEMP
|
900
|
900
|
case 301: // M301
|
901
|
|
- if(code_seen('P')) Kp = code_value();
|
902
|
|
- if(code_seen('I')) Ki = code_value()*PID_dT;
|
903
|
|
- if(code_seen('D')) Kd = code_value()/PID_dT;
|
904
|
|
- #ifdef PID_ADD_EXTRUSION_RATE
|
905
|
|
- if(code_seen('C')) Kc = code_value();
|
906
|
|
- #endif
|
907
|
|
- SERIAL_PROTOCOL("ok p:");
|
908
|
|
- SERIAL_PROTOCOL(Kp);
|
909
|
|
- SERIAL_PROTOCOL(" i:");
|
910
|
|
- SERIAL_PROTOCOL(Ki/PID_dT);
|
911
|
|
- SERIAL_PROTOCOL(" d:");
|
912
|
|
- SERIAL_PROTOCOL(Kd*PID_dT);
|
913
|
|
- #ifdef PID_ADD_EXTRUSION_RATE
|
914
|
|
- SERIAL_PROTOCOL(" c:");
|
915
|
|
- SERIAL_PROTOCOL(Kc*PID_dT);
|
916
|
|
- #endif
|
917
|
|
- SERIAL_PROTOCOLLN("");
|
918
|
|
-
|
|
901
|
+ {
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+ if(code_seen('P')) Kp = code_value();
|
|
905
|
+ if(code_seen('I')) Ki = code_value()*PID_dT;
|
|
906
|
+ if(code_seen('D')) Kd = code_value()/PID_dT;
|
|
907
|
+ #ifdef PID_ADD_EXTRUSION_RATE
|
|
908
|
+ if(code_seen('C')) Kc = code_value();
|
|
909
|
+ #endif
|
|
910
|
+ updatePID();
|
|
911
|
+ SERIAL_PROTOCOL("ok p:");
|
|
912
|
+ SERIAL_PROTOCOL(Kp);
|
|
913
|
+ SERIAL_PROTOCOL(" i:");
|
|
914
|
+ SERIAL_PROTOCOL(Ki/PID_dT);
|
|
915
|
+ SERIAL_PROTOCOL(" d:");
|
|
916
|
+ SERIAL_PROTOCOL(Kd*PID_dT);
|
|
917
|
+ #ifdef PID_ADD_EXTRUSION_RATE
|
|
918
|
+ SERIAL_PROTOCOL(" c:");
|
|
919
|
+ SERIAL_PROTOCOL(Kc*PID_dT);
|
|
920
|
+ #endif
|
|
921
|
+ SERIAL_PROTOCOLLN("");
|
|
922
|
+ }
|
919
|
923
|
break;
|
920
|
924
|
#endif //PIDTEMP
|
921
|
925
|
case 400: // finish all moves
|