Skip to content

Commit

Permalink
L64xx M906 Fix status variable, formatting (#16597)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob-the-Kuhn authored and thinkyhead committed Jan 20, 2020
1 parent ef8f829 commit a1f5245
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Marlin/src/gcode/feature/L6470/M906.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) {
const float comp_coef = 1600.0f / L6470_ADC_out_limited;
const uint16_t MicroSteps = _BV(motor.GetParam(L6470_STEP_MODE) & 0x07);

say_axis_status(axis, status);
say_axis_status(axis, sh.STATUS_AXIS_RAW);

SERIAL_ECHOPGM("...OverCurrent Threshold: ");
sprintf_P(temp_buf, PSTR("%2d ("), OverCurrent_Threshold);
Expand Down Expand Up @@ -181,7 +181,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) {
const uint16_t L6470_ADC_out = motor.GetParam(L6470_ADC_OUT) & 0x1F,
L6474_TVAL_val = motor.GetParam(L6474_TVAL) & 0x7F;

say_axis_status(axis, status);
say_axis_status(axis, sh.STATUS_AXIS_RAW);

SERIAL_ECHOPGM("...OverCurrent Threshold: ");
sprintf_P(temp_buf, PSTR("%2d ("), OverCurrent_Threshold);
Expand All @@ -192,15 +192,13 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) {
sprintf_P(temp_buf, PSTR("%2d ("), L6474_TVAL_val);
SERIAL_ECHO(temp_buf);
SERIAL_ECHO((L6474_TVAL_val + 1) * motor.STALL_CURRENT_CONSTANT_INV);
SERIAL_ECHOLNPGM(" mA Motor Status: NA)");
SERIAL_ECHOLNPGM(" mA) Motor Status: NA");

const uint16_t MicroSteps = _BV(motor.GetParam(L6470_STEP_MODE) & 0x07); //NOMORE(MicroSteps, 16);
SERIAL_ECHOLNPAIR("...MicroSteps: ", MicroSteps,
" ADC_OUT: ", L6470_ADC_out,
" Vs_compensation: NA");

SERIAL_EOL();
SERIAL_ECHOPAIR("...MicroSteps: ", MicroSteps,
" ADC_OUT: ", L6470_ADC_out);

SERIAL_ECHOLNPGM(" Vs_compensation: NA\n");
SERIAL_ECHOLNPGM("...KVAL_HOLD: NA"
" KVAL_RUN : NA"
" KVAL_ACC: NA"
Expand Down

0 comments on commit a1f5245

Please sign in to comment.