Reduce string storage, use masking 'seen'
This commit is contained in:
@ -41,15 +41,14 @@ void GcodeSuite::M281() {
|
||||
}
|
||||
if (!angle_change) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR(" Servo ", servo_index);
|
||||
SERIAL_ECHOPAIR(" L", servo_angles[servo_index][0]);
|
||||
SERIAL_ECHOLNPAIR(" U", servo_angles[servo_index][1]);
|
||||
SERIAL_ECHOLNPAIR(" Servo ", servo_index,
|
||||
" L", servo_angles[servo_index][0],
|
||||
" U", servo_angles[servo_index][1]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ECHOPAIR("Servo ", servo_index);
|
||||
SERIAL_ECHOLNPGM(" out of range");
|
||||
SERIAL_ECHOLNPAIR("Servo ", servo_index, " out of range");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,9 +61,9 @@ void GcodeSuite::M301() {
|
||||
#if ENABLED(PID_PARAMS_PER_HOTEND)
|
||||
SERIAL_ECHOPAIR(" e:", e); // specify extruder in serial output
|
||||
#endif // PID_PARAMS_PER_HOTEND
|
||||
SERIAL_ECHOPAIR(" p:", PID_PARAM(Kp, e));
|
||||
SERIAL_ECHOPAIR(" i:", unscalePID_i(PID_PARAM(Ki, e)));
|
||||
SERIAL_ECHOPAIR(" d:", unscalePID_d(PID_PARAM(Kd, e)));
|
||||
SERIAL_ECHOPAIR(" p:", PID_PARAM(Kp, e),
|
||||
" i:", unscalePID_i(PID_PARAM(Ki, e)),
|
||||
" d:", unscalePID_d(PID_PARAM(Kd, e)));
|
||||
#if ENABLED(PID_EXTRUSION_SCALING)
|
||||
//Kc does not have scaling applied above, or in resetting defaults
|
||||
SERIAL_ECHOPAIR(" c:", PID_PARAM(Kc, e));
|
||||
|
@ -56,8 +56,7 @@ void GcodeSuite::M302() {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("Cold extrudes are ");
|
||||
serialprintPGM(thermalManager.allow_cold_extrude ? PSTR("en") : PSTR("dis"));
|
||||
SERIAL_ECHOPAIR("abled (min temp ", thermalManager.extrude_min_temp);
|
||||
SERIAL_ECHOLNPGM("C)");
|
||||
SERIAL_ECHOLNPAIR("abled (min temp ", thermalManager.extrude_min_temp, "C)");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,9 +33,9 @@ void GcodeSuite::M304() {
|
||||
if (parser.seen('D')) thermalManager.temp_bed.pid.Kd = scalePID_d(parser.value_float());
|
||||
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR(" p:", thermalManager.temp_bed.pid.Kp);
|
||||
SERIAL_ECHOPAIR(" i:", unscalePID_i(thermalManager.temp_bed.pid.Ki));
|
||||
SERIAL_ECHOLNPAIR(" d:", unscalePID_d(thermalManager.temp_bed.pid.Kd));
|
||||
SERIAL_ECHOLNPAIR(" p:", thermalManager.temp_bed.pid.Kp,
|
||||
" i:", unscalePID_i(thermalManager.temp_bed.pid.Ki),
|
||||
" d:", unscalePID_d(thermalManager.temp_bed.pid.Kd));
|
||||
}
|
||||
|
||||
#endif // PIDTEMPBED
|
||||
|
@ -25,9 +25,9 @@
|
||||
|
||||
void report_M92(const bool echo=true, const int8_t e=-1) {
|
||||
if (echo) SERIAL_ECHO_START(); else SERIAL_CHAR(' ');
|
||||
SERIAL_ECHOPAIR(" M92 X", LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]));
|
||||
SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]));
|
||||
SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(planner.settings.axis_steps_per_mm[Z_AXIS]));
|
||||
SERIAL_ECHOPAIR(" M92 X", LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]),
|
||||
" Y", LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]),
|
||||
" Z", LINEAR_UNIT(planner.settings.axis_steps_per_mm[Z_AXIS]));
|
||||
#if DISABLED(DISTINCT_E_FACTORS)
|
||||
SERIAL_ECHOPAIR(" E", VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS]));
|
||||
#endif
|
||||
@ -37,8 +37,8 @@ void report_M92(const bool echo=true, const int8_t e=-1) {
|
||||
for (uint8_t i = 0; i < E_STEPPERS; i++) {
|
||||
if (e >= 0 && i != e) continue;
|
||||
if (echo) SERIAL_ECHO_START(); else SERIAL_CHAR(' ');
|
||||
SERIAL_ECHOPAIR(" M92 T", (int)i);
|
||||
SERIAL_ECHOLNPAIR(" E", VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS_N(i)]));
|
||||
SERIAL_ECHOLNPAIR(" M92 T", (int)i,
|
||||
" E", VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS_N(i)]));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -101,12 +101,10 @@ void GcodeSuite::M92() {
|
||||
micro_steps = argH ? argH : Z_MICROSTEPS;
|
||||
const float z_full_step_mm = micro_steps * planner.steps_to_mm[Z_AXIS];
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("{ micro_steps:", micro_steps);
|
||||
SERIAL_ECHOPAIR(", z_full_step_mm:", z_full_step_mm);
|
||||
SERIAL_ECHOPAIR("{ micro_steps:", micro_steps, ", z_full_step_mm:", z_full_step_mm);
|
||||
if (wanted) {
|
||||
const float best = uint16_t(wanted / z_full_step_mm) * z_full_step_mm;
|
||||
SERIAL_ECHOPGM(", best:[");
|
||||
SERIAL_ECHO(best);
|
||||
SERIAL_ECHOPAIR(", best:[", best);
|
||||
if (best != wanted) { SERIAL_CHAR(','); SERIAL_ECHO(best + z_full_step_mm); }
|
||||
SERIAL_CHAR(']');
|
||||
}
|
||||
|
Reference in New Issue
Block a user