🎨 Check flags without ENABLED
This commit is contained in:
@ -34,7 +34,7 @@
|
||||
#include "../../../feature/digipot/digipot.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(HAS_MOTOR_CURRENT_DAC)
|
||||
#if HAS_MOTOR_CURRENT_DAC
|
||||
#include "../../../feature/dac/stepper_dac.h"
|
||||
#endif
|
||||
|
||||
@ -73,7 +73,7 @@ void GcodeSuite::M907() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(HAS_MOTOR_CURRENT_DAC)
|
||||
#if HAS_MOTOR_CURRENT_DAC
|
||||
if (parser.seenval('S')) {
|
||||
const float dac_percent = parser.value_float();
|
||||
LOOP_LE_N(i, 4) stepper_dac.set_current_percent(i, dac_percent);
|
||||
@ -92,7 +92,7 @@ void GcodeSuite::M907() {
|
||||
TERN_(HAS_MOTOR_CURRENT_DAC, stepper_dac.set_current_value(parser.byteval('P', -1), parser.ushortval('S', 0)));
|
||||
}
|
||||
|
||||
#if ENABLED(HAS_MOTOR_CURRENT_DAC)
|
||||
#if HAS_MOTOR_CURRENT_DAC
|
||||
|
||||
void GcodeSuite::M909() { stepper_dac.print_values(); }
|
||||
void GcodeSuite::M910() { stepper_dac.commit_eeprom(); }
|
||||
|
Reference in New Issue
Block a user