From 1b3dd246fbd75a72a9cf115282c46cb7207a5323 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 15 Oct 2022 19:11:14 -0500 Subject: [PATCH] Never uses draw_area_size --- Marlin/src/gcode/calibrate/M665.cpp | 1 - Marlin/src/lcd/menu/menu_advanced.cpp | 12 ++++++------ Marlin/src/module/polargraph.cpp | 6 ------ Marlin/src/module/polargraph.h | 2 -- Marlin/src/module/settings.cpp | 2 -- 5 files changed, 6 insertions(+), 17 deletions(-) diff --git a/Marlin/src/gcode/calibrate/M665.cpp b/Marlin/src/gcode/calibrate/M665.cpp index 68c2ccf65ede..a8e02831e2a8 100644 --- a/Marlin/src/gcode/calibrate/M665.cpp +++ b/Marlin/src/gcode/calibrate/M665.cpp @@ -167,7 +167,6 @@ if (parser.seenval('T')) draw_area_max.y = parser.value_linear_units(); if (parser.seenval('B')) draw_area_min.y = parser.value_linear_units(); if (parser.seenval('H')) polargraph_max_belt_len = parser.value_linear_units(); - refresh_polargraph_size(); } void GcodeSuite::M665_report(const bool forReplay/*=true*/) { diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index e4ba1340f48a..6a42378aba79 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -635,12 +635,12 @@ void menu_advanced_settings() { #if ENABLED(POLARGRAPH) // M665 - Polargraph Settings if (!is_busy) { - EDIT_ITEM_FAST(float4, MSG_SEGMENTS_PER_SECOND, &segments_per_second, 100, 9999); // M665 S - EDIT_ITEM_FAST(float51sign, MSG_DRAW_MIN_X, &draw_area_min.x, X_MIN_POS, draw_area_max.x - 10, refresh_polargraph_size); // M665 L - EDIT_ITEM_FAST(float51sign, MSG_DRAW_MAX_X, &draw_area_max.x, draw_area_min.x + 10, X_MAX_POS, refresh_polargraph_size); // M665 R - EDIT_ITEM_FAST(float51sign, MSG_DRAW_MIN_Y, &draw_area_min.y, Y_MIN_POS, draw_area_max.y - 10, refresh_polargraph_size); // M665 T - EDIT_ITEM_FAST(float51sign, MSG_DRAW_MAX_Y, &draw_area_max.y, draw_area_min.y + 10, Y_MAX_POS, refresh_polargraph_size); // M665 B - EDIT_ITEM_FAST(float51sign, MSG_MAX_BELT_LEN, &polargraph_max_belt_len, 500, 2000); // M665 H + EDIT_ITEM_FAST(float4, MSG_SEGMENTS_PER_SECOND, &segments_per_second, 100, 9999); // M665 S + EDIT_ITEM_FAST(float51sign, MSG_DRAW_MIN_X, &draw_area_min.x, X_MIN_POS, draw_area_max.x - 10); // M665 L + EDIT_ITEM_FAST(float51sign, MSG_DRAW_MAX_X, &draw_area_max.x, draw_area_min.x + 10, X_MAX_POS); // M665 R + EDIT_ITEM_FAST(float51sign, MSG_DRAW_MIN_Y, &draw_area_min.y, Y_MIN_POS, draw_area_max.y - 10); // M665 T + EDIT_ITEM_FAST(float51sign, MSG_DRAW_MAX_Y, &draw_area_max.y, draw_area_min.y + 10, Y_MAX_POS); // M665 B + EDIT_ITEM_FAST(float51sign, MSG_MAX_BELT_LEN, &polargraph_max_belt_len, 500, 2000); // M665 H } #endif diff --git a/Marlin/src/module/polargraph.cpp b/Marlin/src/module/polargraph.cpp index fbf919a405bf..d55d36a6d654 100644 --- a/Marlin/src/module/polargraph.cpp +++ b/Marlin/src/module/polargraph.cpp @@ -40,16 +40,10 @@ // Initialized by settings.load() float segments_per_second, polargraph_max_belt_len; xy_pos_t draw_area_min, draw_area_max; -xy_float_t draw_area_size; void inverse_kinematics(const xyz_pos_t &raw) { const float x1 = raw.x - draw_area_min.x, x2 = draw_area_max.x - raw.x, y = raw.y - draw_area_max.y; delta.set(HYPOT(x1, y), HYPOT(x2, y), raw.z); } -void refresh_polargraph_size(); - draw_area_size.x = draw_area_max.x - draw_area_min.x; - draw_area_size.y = draw_area_max.y - draw_area_min.y; -} - #endif // POLARGRAPH diff --git a/Marlin/src/module/polargraph.h b/Marlin/src/module/polargraph.h index 5e00f03145af..f4904ebfe21c 100644 --- a/Marlin/src/module/polargraph.h +++ b/Marlin/src/module/polargraph.h @@ -30,8 +30,6 @@ extern float segments_per_second; extern xy_pos_t draw_area_min, draw_area_max; -extern xy_float_t draw_area_size; extern float polargraph_max_belt_len; void inverse_kinematics(const xyz_pos_t &raw); -void refresh_polargraph_size(); diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 53a5ec1c3d09..95836a5f3a2e 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -603,8 +603,6 @@ void MarlinSettings::postprocess() { // planner position so the stepper counts will be set correctly. TERN_(DELTA, recalc_delta_settings()); - TERN_(POLARGRAPH, refresh_polargraph_size()); - TERN_(PIDTEMP, thermalManager.updatePID()); #if DISABLED(NO_VOLUMETRICS)