🎨 Standardize G-code reporting
This commit is contained in:
@@ -35,15 +35,19 @@
|
||||
* D<dval> - Set the D value
|
||||
*/
|
||||
void GcodeSuite::M304() {
|
||||
|
||||
if (!parser.seen("PID")) return M304_report();
|
||||
if (parser.seen('P')) thermalManager.temp_bed.pid.Kp = parser.value_float();
|
||||
if (parser.seen('I')) thermalManager.temp_bed.pid.Ki = scalePID_i(parser.value_float());
|
||||
if (parser.seen('D')) thermalManager.temp_bed.pid.Kd = scalePID_d(parser.value_float());
|
||||
}
|
||||
|
||||
SERIAL_ECHO_MSG(" p:", thermalManager.temp_bed.pid.Kp,
|
||||
" i:", unscalePID_i(thermalManager.temp_bed.pid.Ki),
|
||||
" d:", unscalePID_d(thermalManager.temp_bed.pid.Kd));
|
||||
|
||||
void GcodeSuite::M304_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_BED_PID));
|
||||
SERIAL_ECHO_MSG(
|
||||
" M304 P", thermalManager.temp_bed.pid.Kp
|
||||
, " I", unscalePID_i(thermalManager.temp_bed.pid.Ki)
|
||||
, " D", unscalePID_d(thermalManager.temp_bed.pid.Kd)
|
||||
);
|
||||
}
|
||||
|
||||
#endif // PIDTEMPBED
|
||||
|
||||
Reference in New Issue
Block a user