|
|
|
@ -29,6 +29,7 @@
|
|
|
|
|
#if ENABLED(DAC_STEPPER_CURRENT)
|
|
|
|
|
|
|
|
|
|
#include "stepper_dac.h"
|
|
|
|
|
#include "../../MarlinCore.h" // for SP_X_LBL...
|
|
|
|
|
|
|
|
|
|
bool dac_present = false;
|
|
|
|
|
constexpr xyze_uint8_t dac_order = DAC_STEPPER_ORDER;
|
|
|
|
@ -85,15 +86,12 @@ void dac_current_set_percents(xyze_uint8_t &pct) {
|
|
|
|
|
|
|
|
|
|
void dac_print_values() {
|
|
|
|
|
if (!dac_present) return;
|
|
|
|
|
|
|
|
|
|
SERIAL_ECHO_MSG("Stepper current values in % (Amps):");
|
|
|
|
|
SERIAL_ECHO_START();
|
|
|
|
|
SERIAL_ECHOLNPAIR_P(
|
|
|
|
|
SP_X_LBL, dac_perc(X_AXIS), PSTR(" ("), dac_amps(X_AXIS), PSTR(")")
|
|
|
|
|
SP_Y_LBL, dac_perc(Y_AXIS), PSTR(" ("), dac_amps(Y_AXIS), PSTR(")")
|
|
|
|
|
SP_Z_LBL, dac_perc(Z_AXIS), PSTR(" ("), dac_amps(Z_AXIS), PSTR(")")
|
|
|
|
|
SP_E_LBL, dac_perc(E_AXIS), PSTR(" ("), dac_amps(E_AXIS), PSTR(")")
|
|
|
|
|
);
|
|
|
|
|
SERIAL_ECHOPAIR_P( SP_X_LBL, dac_perc(X_AXIS), PSTR(" ("), dac_amps(X_AXIS), PSTR(")"));
|
|
|
|
|
SERIAL_ECHOPAIR_P( SP_Y_LBL, dac_perc(Y_AXIS), PSTR(" ("), dac_amps(Y_AXIS), PSTR(")"));
|
|
|
|
|
SERIAL_ECHOPAIR_P( SP_Z_LBL, dac_perc(Z_AXIS), PSTR(" ("), dac_amps(Z_AXIS), PSTR(")"));
|
|
|
|
|
SERIAL_ECHOLNPAIR_P(SP_E_LBL, dac_perc(E_AXIS), PSTR(" ("), dac_amps(E_AXIS), PSTR(")"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void dac_commit_eeprom() {
|
|
|
|
|