More useful ENABLED / DISABLED macros (#17054)

This commit is contained in:
Scott Lahteine
2020-03-07 22:20:41 -06:00
committed by GitHub
parent 5eb6fb1c2f
commit 64d092935b
26 changed files with 636 additions and 766 deletions

View File

@@ -73,20 +73,12 @@ void BLTouch::init(const bool set_voltage/*=false*/) {
);
}
const bool should_set = last_written_mode != (false
#if ENABLED(BLTOUCH_SET_5V_MODE)
|| true
#endif
);
const bool should_set = last_written_mode != ENABLED(BLTOUCH_SET_5V_MODE);
#endif
if (should_set && set_voltage)
mode_conv_proc((false
#if ENABLED(BLTOUCH_SET_5V_MODE)
|| true
#endif
));
mode_conv_proc(ENABLED(BLTOUCH_SET_5V_MODE));
}
void BLTouch::clear() {