Parcourir la source

🐛 Fix and improve Polargraph (#24847)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Dan Royer il y a 2 ans
Parent
révision
5a80fc2617
Aucun compte lié à l'adresse e-mail de l'auteur

+ 24
- 3
Marlin/src/feature/host_actions.cpp Voir le fichier

111
     if (eol) SERIAL_EOL();
111
     if (eol) SERIAL_EOL();
112
   }
112
   }
113
 
113
 
114
-  void HostUI::prompt_plus(FSTR_P const ptype, FSTR_P const fstr, const char extra_char/*='\0'*/) {
114
+  void HostUI::prompt_plus(const bool pgm, FSTR_P const ptype, const char * const str, const char extra_char/*='\0'*/) {
115
     prompt(ptype, false);
115
     prompt(ptype, false);
116
     PORT_REDIRECT(SerialMask::All);
116
     PORT_REDIRECT(SerialMask::All);
117
     SERIAL_CHAR(' ');
117
     SERIAL_CHAR(' ');
118
-    SERIAL_ECHOF(fstr);
118
+    if (pgm)
119
+      SERIAL_ECHOPGM_P(str);
120
+    else
121
+      SERIAL_ECHO(str);
119
     if (extra_char != '\0') SERIAL_CHAR(extra_char);
122
     if (extra_char != '\0') SERIAL_CHAR(extra_char);
120
     SERIAL_EOL();
123
     SERIAL_EOL();
121
   }
124
   }
125
+
122
   void HostUI::prompt_begin(const PromptReason reason, FSTR_P const fstr, const char extra_char/*='\0'*/) {
126
   void HostUI::prompt_begin(const PromptReason reason, FSTR_P const fstr, const char extra_char/*='\0'*/) {
123
     prompt_end();
127
     prompt_end();
124
     host_prompt_reason = reason;
128
     host_prompt_reason = reason;
125
     prompt_plus(F("begin"), fstr, extra_char);
129
     prompt_plus(F("begin"), fstr, extra_char);
126
   }
130
   }
127
-  void HostUI::prompt_button(FSTR_P const fstr) { prompt_plus(F("button"), fstr); }
131
+  void HostUI::prompt_begin(const PromptReason reason, const char * const cstr, const char extra_char/*='\0'*/) {
132
+    prompt_end();
133
+    host_prompt_reason = reason;
134
+    prompt_plus(F("begin"), cstr, extra_char);
135
+  }
136
+
128
   void HostUI::prompt_end() { prompt(F("end")); }
137
   void HostUI::prompt_end() { prompt(F("end")); }
129
   void HostUI::prompt_show() { prompt(F("show")); }
138
   void HostUI::prompt_show() { prompt(F("show")); }
130
 
139
 
133
     if (btn2) prompt_button(btn2);
142
     if (btn2) prompt_button(btn2);
134
     prompt_show();
143
     prompt_show();
135
   }
144
   }
145
+
146
+  void HostUI::prompt_button(FSTR_P const fstr) { prompt_plus(F("button"), fstr); }
147
+  void HostUI::prompt_button(const char * const cstr) { prompt_plus(F("button"), cstr); }
148
+
136
   void HostUI::prompt_do(const PromptReason reason, FSTR_P const fstr, FSTR_P const btn1/*=nullptr*/, FSTR_P const btn2/*=nullptr*/) {
149
   void HostUI::prompt_do(const PromptReason reason, FSTR_P const fstr, FSTR_P const btn1/*=nullptr*/, FSTR_P const btn2/*=nullptr*/) {
137
     prompt_begin(reason, fstr);
150
     prompt_begin(reason, fstr);
138
     _prompt_show(btn1, btn2);
151
     _prompt_show(btn1, btn2);
139
   }
152
   }
153
+  void HostUI::prompt_do(const PromptReason reason, const char * const cstr, FSTR_P const btn1/*=nullptr*/, FSTR_P const btn2/*=nullptr*/) {
154
+    prompt_begin(reason, cstr);
155
+    _prompt_show(btn1, btn2);
156
+  }
140
   void HostUI::prompt_do(const PromptReason reason, FSTR_P const fstr, const char extra_char, FSTR_P const btn1/*=nullptr*/, FSTR_P const btn2/*=nullptr*/) {
157
   void HostUI::prompt_do(const PromptReason reason, FSTR_P const fstr, const char extra_char, FSTR_P const btn1/*=nullptr*/, FSTR_P const btn2/*=nullptr*/) {
141
     prompt_begin(reason, fstr, extra_char);
158
     prompt_begin(reason, fstr, extra_char);
142
     _prompt_show(btn1, btn2);
159
     _prompt_show(btn1, btn2);
143
   }
160
   }
161
+  void HostUI::prompt_do(const PromptReason reason, const char * const cstr, const char extra_char, FSTR_P const btn1/*=nullptr*/, FSTR_P const btn2/*=nullptr*/) {
162
+    prompt_begin(reason, cstr, extra_char);
163
+    _prompt_show(btn1, btn2);
164
+  }
144
 
165
 
145
   #if ENABLED(ADVANCED_PAUSE_FEATURE)
166
   #if ENABLED(ADVANCED_PAUSE_FEATURE)
146
     void HostUI::filament_load_prompt() {
167
     void HostUI::filament_load_prompt() {

+ 16
- 2
Marlin/src/feature/host_actions.h Voir le fichier

79
   #if ENABLED(HOST_PROMPT_SUPPORT)
79
   #if ENABLED(HOST_PROMPT_SUPPORT)
80
     private:
80
     private:
81
     static void prompt(FSTR_P const ptype, const bool eol=true);
81
     static void prompt(FSTR_P const ptype, const bool eol=true);
82
-    static void prompt_plus(FSTR_P const ptype, FSTR_P const fstr, const char extra_char='\0');
82
+    static void prompt_plus(const bool pgm, FSTR_P const ptype, const char * const str, const char extra_char='\0');
83
+    static void prompt_plus(FSTR_P const ptype, FSTR_P const fstr, const char extra_char='\0') {
84
+      prompt_plus(true, ptype, FTOP(fstr), extra_char);
85
+    }
86
+    static void prompt_plus(FSTR_P const ptype, const char * const cstr, const char extra_char='\0') {
87
+      prompt_plus(false, ptype, cstr, extra_char);
88
+    }
89
+
83
     static void prompt_show();
90
     static void prompt_show();
84
     static void _prompt_show(FSTR_P const btn1, FSTR_P const btn2);
91
     static void _prompt_show(FSTR_P const btn1, FSTR_P const btn2);
85
 
92
 
93
     static void notify(const char * const message);
100
     static void notify(const char * const message);
94
 
101
 
95
     static void prompt_begin(const PromptReason reason, FSTR_P const fstr, const char extra_char='\0');
102
     static void prompt_begin(const PromptReason reason, FSTR_P const fstr, const char extra_char='\0');
96
-    static void prompt_button(FSTR_P const fstr);
103
+    static void prompt_begin(const PromptReason reason, const char * const cstr, const char extra_char='\0');
97
     static void prompt_end();
104
     static void prompt_end();
105
+
106
+    static void prompt_button(FSTR_P const fstr);
107
+    static void prompt_button(const char * const cstr);
108
+
98
     static void prompt_do(const PromptReason reason, FSTR_P const pstr, FSTR_P const btn1=nullptr, FSTR_P const btn2=nullptr);
109
     static void prompt_do(const PromptReason reason, FSTR_P const pstr, FSTR_P const btn1=nullptr, FSTR_P const btn2=nullptr);
110
+    static void prompt_do(const PromptReason reason, const char * const cstr, FSTR_P const btn1=nullptr, FSTR_P const btn2=nullptr);
99
     static void prompt_do(const PromptReason reason, FSTR_P const pstr, const char extra_char, FSTR_P const btn1=nullptr, FSTR_P const btn2=nullptr);
111
     static void prompt_do(const PromptReason reason, FSTR_P const pstr, const char extra_char, FSTR_P const btn1=nullptr, FSTR_P const btn2=nullptr);
112
+    static void prompt_do(const PromptReason reason, const char * const cstr, const char extra_char, FSTR_P const btn1=nullptr, FSTR_P const btn2=nullptr);
113
+
100
     static void prompt_open(const PromptReason reason, FSTR_P const pstr, FSTR_P const btn1=nullptr, FSTR_P const btn2=nullptr) {
114
     static void prompt_open(const PromptReason reason, FSTR_P const pstr, FSTR_P const btn1=nullptr, FSTR_P const btn2=nullptr) {
101
       if (host_prompt_reason == PROMPT_NOT_DEFINED) prompt_do(reason, pstr, btn1, btn2);
115
       if (host_prompt_reason == PROMPT_NOT_DEFINED) prompt_do(reason, pstr, btn1, btn2);
102
     }
116
     }

+ 0
- 2
Marlin/src/gcode/calibrate/M665.cpp Voir le fichier

167
     if (parser.seenval('T')) draw_area_max.y = parser.value_linear_units();
167
     if (parser.seenval('T')) draw_area_max.y = parser.value_linear_units();
168
     if (parser.seenval('B')) draw_area_min.y = parser.value_linear_units();
168
     if (parser.seenval('B')) draw_area_min.y = parser.value_linear_units();
169
     if (parser.seenval('H')) polargraph_max_belt_len = parser.value_linear_units();
169
     if (parser.seenval('H')) polargraph_max_belt_len = parser.value_linear_units();
170
-    draw_area_size.x = draw_area_max.x - draw_area_min.x;
171
-    draw_area_size.y = draw_area_max.y - draw_area_min.y;
172
   }
170
   }
173
 
171
 
174
   void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
172
   void GcodeSuite::M665_report(const bool forReplay/*=true*/) {

+ 6
- 1
Marlin/src/gcode/lcd/M0_M1.cpp Voir le fichier

85
 
85
 
86
   #endif
86
   #endif
87
 
87
 
88
-  TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, parser.codenum ? F("M1 Stop") : F("M0 Stop"), FPSTR(CONTINUE_STR)));
88
+  #if ENABLED(HOST_PROMPT_SUPPORT)
89
+    if (parser.string_arg)
90
+      hostui.prompt_do(PROMPT_USER_CONTINUE, parser.string_arg, FPSTR(CONTINUE_STR));
91
+    else
92
+      hostui.prompt_do(PROMPT_USER_CONTINUE, parser.codenum ? F("M1 Stop") : F("M0 Stop"), FPSTR(CONTINUE_STR));
93
+  #endif
89
 
94
 
90
   TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(ms));
95
   TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(ms));
91
 
96
 

+ 1
- 1
Marlin/src/inc/Conditionals_post.h Voir le fichier

155
   #define W_BED_SIZE W_MAX_LENGTH
155
   #define W_BED_SIZE W_MAX_LENGTH
156
 #endif
156
 #endif
157
 
157
 
158
-// Require 0,0 bed center for Delta and SCARA
158
+// Require 0,0 bed center for Delta, SCARA, and Polargraph
159
 #if IS_KINEMATIC
159
 #if IS_KINEMATIC
160
   #define BED_CENTER_AT_0_0
160
   #define BED_CENTER_AT_0_0
161
 #endif
161
 #endif

+ 2
- 2
Marlin/src/inc/SanityCheck.h Voir le fichier

829
 /**
829
 /**
830
  * Granular software endstops (Marlin >= 1.1.7)
830
  * Granular software endstops (Marlin >= 1.1.7)
831
  */
831
  */
832
-#if ENABLED(MIN_SOFTWARE_ENDSTOPS) && DISABLED(MIN_SOFTWARE_ENDSTOP_Z)
832
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) && NONE(MIN_SOFTWARE_ENDSTOP_Z, POLARGRAPH)
833
   #if IS_KINEMATIC
833
   #if IS_KINEMATIC
834
     #error "MIN_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MIN_SOFTWARE_ENDSTOP_Z."
834
     #error "MIN_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MIN_SOFTWARE_ENDSTOP_Z."
835
   #elif NONE(MIN_SOFTWARE_ENDSTOP_X, MIN_SOFTWARE_ENDSTOP_Y)
835
   #elif NONE(MIN_SOFTWARE_ENDSTOP_X, MIN_SOFTWARE_ENDSTOP_Y)
837
   #endif
837
   #endif
838
 #endif
838
 #endif
839
 
839
 
840
-#if ENABLED(MAX_SOFTWARE_ENDSTOPS) && DISABLED(MAX_SOFTWARE_ENDSTOP_Z)
840
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS) && NONE(MAX_SOFTWARE_ENDSTOP_Z, POLARGRAPH)
841
   #if IS_KINEMATIC
841
   #if IS_KINEMATIC
842
     #error "MAX_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MAX_SOFTWARE_ENDSTOP_Z."
842
     #error "MAX_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MAX_SOFTWARE_ENDSTOP_Z."
843
   #elif NONE(MAX_SOFTWARE_ENDSTOP_X, MAX_SOFTWARE_ENDSTOP_Y)
843
   #elif NONE(MAX_SOFTWARE_ENDSTOP_X, MAX_SOFTWARE_ENDSTOP_Y)

+ 6
- 0
Marlin/src/lcd/language/language_en.h Voir le fichier

418
   LSTR MSG_FILAMENT_DIAM_E                = _UxGT("Fil. Dia. *");
418
   LSTR MSG_FILAMENT_DIAM_E                = _UxGT("Fil. Dia. *");
419
   LSTR MSG_FILAMENT_UNLOAD                = _UxGT("Unload mm");
419
   LSTR MSG_FILAMENT_UNLOAD                = _UxGT("Unload mm");
420
   LSTR MSG_FILAMENT_LOAD                  = _UxGT("Load mm");
420
   LSTR MSG_FILAMENT_LOAD                  = _UxGT("Load mm");
421
+  LSTR MSG_SEGMENTS_PER_SECOND            = _UxGT("Segments/Sec");
422
+  LSTR MSG_DRAW_MIN_X                     = _UxGT("Draw Min X");
423
+  LSTR MSG_DRAW_MAX_X                     = _UxGT("Draw Max X");
424
+  LSTR MSG_DRAW_MIN_Y                     = _UxGT("Draw Min Y");
425
+  LSTR MSG_DRAW_MAX_Y                     = _UxGT("Draw Max Y");
426
+  LSTR MSG_MAX_BELT_LEN                   = _UxGT("Max Belt Len");
421
   LSTR MSG_ADVANCE_K                      = _UxGT("Advance K");
427
   LSTR MSG_ADVANCE_K                      = _UxGT("Advance K");
422
   LSTR MSG_ADVANCE_K_E                    = _UxGT("Advance K *");
428
   LSTR MSG_ADVANCE_K_E                    = _UxGT("Advance K *");
423
   LSTR MSG_CONTRAST                       = _UxGT("LCD Contrast");
429
   LSTR MSG_CONTRAST                       = _UxGT("LCD Contrast");

+ 13
- 3
Marlin/src/lcd/menu/menu_advanced.cpp Voir le fichier

632
 
632
 
633
   #if DISABLED(SLIM_LCD_MENUS)
633
   #if DISABLED(SLIM_LCD_MENUS)
634
 
634
 
635
+    #if ENABLED(POLARGRAPH)
636
+      // M665 - Polargraph Settings
637
+      if (!is_busy) {
638
+        EDIT_ITEM_FAST(float4, MSG_SEGMENTS_PER_SECOND, &segments_per_second, 100, 9999);               // M665 S
639
+        EDIT_ITEM_FAST(float51sign, MSG_DRAW_MIN_X, &draw_area_min.x, X_MIN_POS, draw_area_max.x - 10); // M665 L
640
+        EDIT_ITEM_FAST(float51sign, MSG_DRAW_MAX_X, &draw_area_max.x, draw_area_min.x + 10, X_MAX_POS); // M665 R
641
+        EDIT_ITEM_FAST(float51sign, MSG_DRAW_MIN_Y, &draw_area_min.y, Y_MIN_POS, draw_area_max.y - 10); // M665 T
642
+        EDIT_ITEM_FAST(float51sign, MSG_DRAW_MAX_Y, &draw_area_max.y, draw_area_min.y + 10, Y_MAX_POS); // M665 B
643
+        EDIT_ITEM_FAST(float51sign, MSG_MAX_BELT_LEN, &polargraph_max_belt_len, 500, 2000);             // M665 H
644
+      }
645
+    #endif
646
+
635
     #if HAS_M206_COMMAND
647
     #if HAS_M206_COMMAND
636
-      //
637
-      // Set Home Offsets
638
-      //
648
+      // M428 - Set Home Offsets
639
       ACTION_ITEM(MSG_SET_HOME_OFFSETS, []{ queue.inject(F("M428")); ui.return_to_status(); });
649
       ACTION_ITEM(MSG_SET_HOME_OFFSETS, []{ queue.inject(F("M428")); ui.return_to_status(); });
640
     #endif
650
     #endif
641
 
651
 

+ 12
- 7
Marlin/src/module/motion.cpp Voir le fichier

341
       can_reach = (
341
       can_reach = (
342
            a < polargraph_max_belt_len + 1
342
            a < polargraph_max_belt_len + 1
343
         && b < polargraph_max_belt_len + 1
343
         && b < polargraph_max_belt_len + 1
344
-        && (a + b) > _MIN(draw_area_size.x, draw_area_size.y)
345
       );
344
       );
346
 
345
 
347
     #endif
346
     #endif
562
     const feedRate_t w_feedrate = fr_mm_s ?: homing_feedrate(W_AXIS)
561
     const feedRate_t w_feedrate = fr_mm_s ?: homing_feedrate(W_AXIS)
563
   );
562
   );
564
 
563
 
565
-  #if IS_KINEMATIC
564
+  #if IS_KINEMATIC && DISABLED(POLARGRAPH)
565
+    // kinematic machines are expected to home to a point 1.5x their range? never reachable.
566
     if (!position_is_reachable(x, y)) return;
566
     if (!position_is_reachable(x, y)) return;
567
     destination = current_position;          // sync destination at the start
567
     destination = current_position;          // sync destination at the start
568
   #endif
568
   #endif
919
         constexpr xy_pos_t offs{0};
919
         constexpr xy_pos_t offs{0};
920
       #endif
920
       #endif
921
 
921
 
922
-      if (TERN1(IS_SCARA, axis_was_homed(X_AXIS) && axis_was_homed(Y_AXIS))) {
923
-        const float dist_2 = HYPOT2(target.x - offs.x, target.y - offs.y);
924
-        if (dist_2 > delta_max_radius_2)
925
-          target *= float(delta_max_radius / SQRT(dist_2)); // 200 / 300 = 0.66
926
-      }
922
+      #if ENABLED(POLARGRAPH)
923
+        LIMIT(target.x, draw_area_min.x, draw_area_max.x);
924
+        LIMIT(target.y, draw_area_min.y, draw_area_max.y);
925
+      #else
926
+        if (TERN1(IS_SCARA, axis_was_homed(X_AXIS) && axis_was_homed(Y_AXIS))) {
927
+          const float dist_2 = HYPOT2(target.x - offs.x, target.y - offs.y);
928
+          if (dist_2 > delta_max_radius_2)
929
+            target *= float(delta_max_radius / SQRT(dist_2)); // 200 / 300 = 0.66
930
+        }
931
+      #endif
927
 
932
 
928
     #else
933
     #else
929
 
934
 

+ 0
- 1
Marlin/src/module/planner.cpp Voir le fichier

2244
 
2244
 
2245
   TERN_(MIXING_EXTRUDER, mixer.populate_block(block->b_color));
2245
   TERN_(MIXING_EXTRUDER, mixer.populate_block(block->b_color));
2246
 
2246
 
2247
-
2248
   #if HAS_FAN
2247
   #if HAS_FAN
2249
     FANS_LOOP(i) block->fan_speed[i] = thermalManager.fan_speed[i];
2248
     FANS_LOOP(i) block->fan_speed[i] = thermalManager.fan_speed[i];
2250
   #endif
2249
   #endif

+ 4
- 9
Marlin/src/module/polargraph.cpp Voir le fichier

37
 #include "../lcd/marlinui.h"
37
 #include "../lcd/marlinui.h"
38
 #include "../MarlinCore.h"
38
 #include "../MarlinCore.h"
39
 
39
 
40
-float segments_per_second; // Initialized by settings.load()
41
-
42
-xy_pos_t draw_area_min = { X_MIN_POS, Y_MIN_POS },
43
-         draw_area_max = { X_MAX_POS, Y_MAX_POS };
44
-
45
-xy_float_t draw_area_size = { X_MAX_POS - X_MIN_POS, Y_MAX_POS - Y_MIN_POS };
46
-
47
-float polargraph_max_belt_len = HYPOT(draw_area_size.x, draw_area_size.y);
40
+// Initialized by settings.load()
41
+float segments_per_second, polargraph_max_belt_len;
42
+xy_pos_t draw_area_min, draw_area_max;
48
 
43
 
49
 void inverse_kinematics(const xyz_pos_t &raw) {
44
 void inverse_kinematics(const xyz_pos_t &raw) {
50
-  const float x1 = raw.x - (draw_area_min.x), x2 = (draw_area_max.x) - raw.x, y = raw.y - (draw_area_max.y);
45
+  const float x1 = raw.x - draw_area_min.x, x2 = draw_area_max.x - raw.x, y = raw.y - draw_area_max.y;
51
   delta.set(HYPOT(x1, y), HYPOT(x2, y), raw.z);
46
   delta.set(HYPOT(x1, y), HYPOT(x2, y), raw.z);
52
 }
47
 }
53
 
48
 

+ 0
- 1
Marlin/src/module/polargraph.h Voir le fichier

30
 
30
 
31
 extern float segments_per_second;
31
 extern float segments_per_second;
32
 extern xy_pos_t draw_area_min, draw_area_max;
32
 extern xy_pos_t draw_area_min, draw_area_max;
33
-extern xy_float_t draw_area_size;
34
 extern float polargraph_max_belt_len;
33
 extern float polargraph_max_belt_len;
35
 
34
 
36
 void inverse_kinematics(const xyz_pos_t &raw);
35
 void inverse_kinematics(const xyz_pos_t &raw);

+ 29
- 5
Marlin/src/module/settings.cpp Voir le fichier

257
   // HAS_BED_PROBE
257
   // HAS_BED_PROBE
258
   //
258
   //
259
 
259
 
260
-  xyz_pos_t probe_offset;
260
+  xyz_pos_t probe_offset;                               // M851 X Y Z
261
 
261
 
262
   //
262
   //
263
   // ABL_PLANAR
263
   // ABL_PLANAR
330
             delta_diagonal_rod;                         // M665 L
330
             delta_diagonal_rod;                         // M665 L
331
       abc_float_t delta_tower_angle_trim,               // M665 X Y Z
331
       abc_float_t delta_tower_angle_trim,               // M665 X Y Z
332
                   delta_diagonal_rod_trim;              // M665 A B C
332
                   delta_diagonal_rod_trim;              // M665 A B C
333
+    #elif ENABLED(POLARGRAPH)
334
+      xy_pos_t draw_area_min, draw_area_max;            // M665 L R T B
335
+      float polargraph_max_belt_len;                    // M665 H
333
     #endif
336
     #endif
337
+
334
   #endif
338
   #endif
335
 
339
 
336
   //
340
   //
468
   //
472
   //
469
   // SKEW_CORRECTION
473
   // SKEW_CORRECTION
470
   //
474
   //
471
-  skew_factor_t planner_skew_factor;                    // M852 I J K  planner.skew_factor
475
+  skew_factor_t planner_skew_factor;                    // M852 I J K
472
 
476
 
473
   //
477
   //
474
   // ADVANCED_PAUSE_FEATURE
478
   // ADVANCED_PAUSE_FEATURE
1001
         EEPROM_WRITE(delta_diagonal_rod);        // 1 float
1005
         EEPROM_WRITE(delta_diagonal_rod);        // 1 float
1002
         EEPROM_WRITE(delta_tower_angle_trim);    // 3 floats
1006
         EEPROM_WRITE(delta_tower_angle_trim);    // 3 floats
1003
         EEPROM_WRITE(delta_diagonal_rod_trim);   // 3 floats
1007
         EEPROM_WRITE(delta_diagonal_rod_trim);   // 3 floats
1008
+      #elif ENABLED(POLARGRAPH)
1009
+        _FIELD_TEST(draw_area_min);
1010
+        EEPROM_WRITE(draw_area_min);             // 2 floats
1011
+        EEPROM_WRITE(draw_area_max);             // 2 floats
1012
+        EEPROM_WRITE(polargraph_max_belt_len);   // 1 float
1004
       #endif
1013
       #endif
1005
     }
1014
     }
1006
     #endif
1015
     #endif
1436
     EEPROM_WRITE(planner.skew_factor);
1445
     EEPROM_WRITE(planner.skew_factor);
1437
 
1446
 
1438
     //
1447
     //
1448
+    // POLARGRAPH
1449
+    //
1450
+    #if ENABLED(POLARGRAPH)
1451
+      _FIELD_TEST(polargraph_max_belt_len);
1452
+      EEPROM_WRITE(polargraph_max_belt_len);
1453
+    #endif
1454
+
1455
+    //
1439
     // Advanced Pause filament load & unload lengths
1456
     // Advanced Pause filament load & unload lengths
1440
     //
1457
     //
1441
     #if HAS_EXTRUDERS
1458
     #if HAS_EXTRUDERS
1936
           EEPROM_READ(delta_diagonal_rod);        // 1 float
1953
           EEPROM_READ(delta_diagonal_rod);        // 1 float
1937
           EEPROM_READ(delta_tower_angle_trim);    // 3 floats
1954
           EEPROM_READ(delta_tower_angle_trim);    // 3 floats
1938
           EEPROM_READ(delta_diagonal_rod_trim);   // 3 floats
1955
           EEPROM_READ(delta_diagonal_rod_trim);   // 3 floats
1956
+        #elif ENABLED(POLARGRAPH)
1957
+          _FIELD_TEST(draw_area_min);
1958
+          EEPROM_READ(draw_area_min);             // 2 floats
1959
+          EEPROM_READ(draw_area_max);             // 2 floats
1960
+          EEPROM_READ(polargraph_max_belt_len);   // 1 float
1939
         #endif
1961
         #endif
1940
       }
1962
       }
1941
       #endif
1963
       #endif
2996
       delta_diagonal_rod = DELTA_DIAGONAL_ROD;
3018
       delta_diagonal_rod = DELTA_DIAGONAL_ROD;
2997
       delta_tower_angle_trim = dta;
3019
       delta_tower_angle_trim = dta;
2998
       delta_diagonal_rod_trim = ddr;
3020
       delta_diagonal_rod_trim = ddr;
3021
+    #elif ENABLED(POLARGRAPH)
3022
+      draw_area_min.set(X_MIN_POS, Y_MIN_POS);
3023
+      draw_area_max.set(X_MAX_POS, Y_MAX_POS);
3024
+      polargraph_max_belt_len = POLARGRAPH_MAX_BELT_LEN;
2999
     #endif
3025
     #endif
3000
   #endif
3026
   #endif
3001
 
3027
 
3492
     //
3518
     //
3493
     // LCD Preheat Settings
3519
     // LCD Preheat Settings
3494
     //
3520
     //
3495
-    #if HAS_PREHEAT
3496
-      gcode.M145_report(forReplay);
3497
-    #endif
3521
+    TERN_(HAS_PREHEAT, gcode.M145_report(forReplay));
3498
 
3522
 
3499
     //
3523
     //
3500
     // PID
3524
     // PID

Chargement…
Annuler
Enregistrer