From 6bcd4eb12de93af314765b469fe18525e4849647 Mon Sep 17 00:00:00 2001 From: milkpirate Date: Thu, 24 Oct 2019 19:07:17 +0200 Subject: [PATCH] Fix M420 (UBL) undefined variables (#15621) --- Marlin/src/gcode/bedlevel/M420.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/M420.cpp b/Marlin/src/gcode/bedlevel/M420.cpp index 9e4de215ed..9e96b456e3 100644 --- a/Marlin/src/gcode/bedlevel/M420.cpp +++ b/Marlin/src/gcode/bedlevel/M420.cpp @@ -64,9 +64,9 @@ void GcodeSuite::M420() { #if ENABLED(MARLIN_DEV_MODE) if (parser.intval('S') == 2) { + const float x_min = probe_min_x(), x_max = probe_max_x(), + y_min = probe_min_y(), y_max = probe_max_y(); #if ENABLED(AUTO_BED_LEVELING_BILINEAR) - const float x_min = probe_min_x(), x_max = probe_max_x(), - y_min = probe_min_y(), y_max = probe_max_y(); bilinear_start.set(x_min, y_min); bilinear_grid_spacing.set((x_max - x_min) / (GRID_MAX_POINTS_X - 1), (y_max - y_min) / (GRID_MAX_POINTS_Y - 1));