🐛 Fix and improve Polargraph (#24847)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Dan Royer
2022-10-15 22:03:42 -07:00
committed by GitHub
parent 6d2b792a29
commit 5a80fc2617
13 changed files with 113 additions and 37 deletions

View File

@@ -257,7 +257,7 @@ typedef struct SettingsDataStruct {
// HAS_BED_PROBE
//
xyz_pos_t probe_offset;
xyz_pos_t probe_offset; // M851 X Y Z
//
// 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
@@ -3492,9 +3518,7 @@ void MarlinSettings::reset() {
//
// LCD Preheat Settings
//
#if HAS_PREHEAT
gcode.M145_report(forReplay);
#endif
TERN_(HAS_PREHEAT, gcode.M145_report(forReplay));
//
// PID