🎨 Check flags without ENABLED

This commit is contained in:
Scott Lahteine
2021-07-09 17:09:58 -05:00
parent fea4e06484
commit 78c2eb6876
31 changed files with 90 additions and 90 deletions

View File

@ -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(); }