diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 45eccaade9591..90ed750d4a185 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -155,7 +155,7 @@ #define W_BED_SIZE W_MAX_LENGTH #endif -// Require 0,0 bed center for Delta and SCARA +// Require 0,0 bed center for Delta, SCARA, and Polargraph #if IS_KINEMATIC #define BED_CENTER_AT_0_0 #endif diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 6b1ca2a30d3ce..e4f8ef8fb7244 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -418,6 +418,12 @@ namespace Language_en { LSTR MSG_FILAMENT_DIAM_E = _UxGT("Fil. Dia. *"); LSTR MSG_FILAMENT_UNLOAD = _UxGT("Unload mm"); LSTR MSG_FILAMENT_LOAD = _UxGT("Load mm"); + LSTR MSG_SEGMENTS_PER_SECOND = _UxGT("Segments/Sec"); + LSTR MSG_DRAW_MIN_X = _UxGT("Draw Min X"); + LSTR MSG_DRAW_MAX_X = _UxGT("Draw Max X"); + LSTR MSG_DRAW_MIN_Y = _UxGT("Draw Min Y"); + LSTR MSG_DRAW_MAX_Y = _UxGT("Draw Max Y"); + LSTR MSG_MAX_BELT_LEN = _UxGT("Max Belt Len"); LSTR MSG_ADVANCE_K = _UxGT("Advance K"); LSTR MSG_ADVANCE_K_E = _UxGT("Advance K *"); LSTR MSG_CONTRAST = _UxGT("LCD Contrast"); diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index 19e38820184d0..7df74d895122d 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -632,10 +632,18 @@ void menu_advanced_settings() { #if DISABLED(SLIM_LCD_MENUS) + #if ENABLED(POLARGRAPH) + // M665 - Polargraph Settings + 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 + #if HAS_M206_COMMAND - // - // Set Home Offsets - // + // M428 - Set Home Offsets ACTION_ITEM(MSG_SET_HOME_OFFSETS, []{ queue.inject(F("M428")); ui.return_to_status(); }); #endif diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index ec1a03eb05286..e355dcb702585 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -257,7 +257,7 @@ typedef struct SettingsDataStruct { // HAS_BED_PROBE // - xyz_pos_t probe_offset; + xyz_pos_t probe_offset; // M851 XYZ // // ABL_PLANAR @@ -330,7 +330,11 @@ typedef struct SettingsDataStruct { delta_diagonal_rod; // M665 L abc_float_t delta_tower_angle_trim, // M665 X Y Z delta_diagonal_rod_trim; // M665 A B C + #elif ENABLED(POLARGRAPH) + xy_pos_t draw_area_min, draw_area_max; // M665 L R T B + float polargraph_max_belt_len; // M665 H #endif + #endif // @@ -468,7 +472,7 @@ typedef struct SettingsDataStruct { // // SKEW_CORRECTION // - skew_factor_t planner_skew_factor; // M852 I J K planner.skew_factor + skew_factor_t planner_skew_factor; // M852 I J K // // ADVANCED_PAUSE_FEATURE @@ -1001,6 +1005,11 @@ void MarlinSettings::postprocess() { EEPROM_WRITE(delta_diagonal_rod); // 1 float EEPROM_WRITE(delta_tower_angle_trim); // 3 floats EEPROM_WRITE(delta_diagonal_rod_trim); // 3 floats + #elif ENABLED(POLARGRAPH) + _FIELD_TEST(draw_area_min); + EEPROM_WRITE(draw_area_min); // 2 floats + EEPROM_WRITE(draw_area_max); // 2 floats + EEPROM_WRITE(polargraph_max_belt_len); // 1 float #endif } #endif @@ -1435,6 +1444,14 @@ void MarlinSettings::postprocess() { _FIELD_TEST(planner_skew_factor); EEPROM_WRITE(planner.skew_factor); + // + // POLARGRAPH + // + #if ENABLED(POLARGRAPH) + _FIELD_TEST(polargraph_max_belt_len); + EEPROM_WRITE(polargraph_max_belt_len); + #endif + // // Advanced Pause filament load & unload lengths // @@ -1936,6 +1953,11 @@ void MarlinSettings::postprocess() { EEPROM_READ(delta_diagonal_rod); // 1 float EEPROM_READ(delta_tower_angle_trim); // 3 floats EEPROM_READ(delta_diagonal_rod_trim); // 3 floats + #elif ENABLED(POLARGRAPH) + _FIELD_TEST(draw_area_min); + EEPROM_READ(draw_area_min); // 2 floats + EEPROM_READ(draw_area_max); // 2 floats + EEPROM_READ(polargraph_max_belt_len); // 1 float #endif } #endif @@ -2996,6 +3018,10 @@ void MarlinSettings::reset() { delta_diagonal_rod = DELTA_DIAGONAL_ROD; delta_tower_angle_trim = dta; delta_diagonal_rod_trim = ddr; + #elif ENABLED(POLARGRAPH) + draw_area_min.set(X_MIN_POS, Y_MIN_POS); + draw_area_max.set(X_MAX_POS, Y_MAX_POS); + polargraph_max_belt_len = POLARGRAPH_MAX_BELT_LEN; #endif #endif