Make leveling_is_active a macro

This commit is contained in:
Scott Lahteine
2017-10-13 10:25:05 -05:00
parent 58abc66c1d
commit 9a930ebec2
15 changed files with 47 additions and 54 deletions

View File

@ -1086,7 +1086,7 @@ void kill_screen(const char* lcd_msg) {
const float new_zoffset = zprobe_zoffset + planner.steps_to_mm[Z_AXIS] * babystep_increment;
if (WITHIN(new_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) {
if (leveling_is_active())
if (LEVELING_IS_ACTIVE())
thermalManager.babystep_axis(Z_AXIS, babystep_increment);
zprobe_zoffset = new_zoffset;
@ -1934,7 +1934,7 @@ void kill_screen(const char* lcd_msg) {
if (!(axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]))
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
else if (leveling_is_valid()) {
_level_state = leveling_is_active();
_level_state = LEVELING_IS_ACTIVE();
MENU_ITEM_EDIT_CALLBACK(bool, MSG_BED_LEVELING, &_level_state, _lcd_toggle_bed_leveling);
}

View File

@ -795,7 +795,7 @@ static void lcd_implementation_status_screen() {
lcd.print(ftostr52sp(FIXFLOAT(current_position[Z_AXIS])));
#if HAS_LEVELING
lcd.write(leveling_is_active() || blink ? '_' : ' ');
lcd.write(LEVELING_IS_ACTIVE() || blink ? '_' : ' ');
#endif
#endif // LCD_HEIGHT > 2