Переглянути джерело

Clean up G26 external references, private vars

Scott Lahteine 7 роки тому
джерело
коміт
a64e5659ce
3 змінених файлів з 21 додано та 19 видалено
  1. 19
    17
      Marlin/G26_Mesh_Validation_Tool.cpp
  2. 0
    2
      Marlin/Marlin_main.cpp
  3. 2
    0
      Marlin/planner.h

+ 19
- 17
Marlin/G26_Mesh_Validation_Tool.cpp Переглянути файл

@@ -115,24 +115,29 @@
115 115
    *   Y #  Y coordinate  Specify the starting location of the drawing activity.
116 116
    */
117 117
 
118
+  // External references
119
+
118 120
   extern float feedrate;
119 121
   extern Planner planner;
120
-  //#if ENABLED(ULTRA_LCD)
122
+  #if ENABLED(ULTRA_LCD)
121 123
     extern char lcd_status_message[];
122
-  //#endif
124
+  #endif
123 125
   extern float destination[XYZE];
124
-  extern void set_destination_to_current();
125
-  extern void set_current_to_destination();
126
-  extern float code_value_float();
127
-  extern bool code_value_bool();
128
-  extern bool code_has_value();
129
-  extern void lcd_init();
130
-  extern void lcd_setstatuspgm(const char* const message, const uint8_t level);
131
-  #define PLANNER_XY_FEEDRATE() (min(planner.max_feedrate_mm_s[X_AXIS], planner.max_feedrate_mm_s[Y_AXIS])) //bob
126
+  void set_destination_to_current();
127
+  void set_current_to_destination();
128
+  float code_value_float();
129
+  bool code_value_bool();
130
+  bool code_has_value();
131
+  void lcd_init();
132
+  void lcd_setstatuspgm(const char* const message, const uint8_t level);
132 133
   bool prepare_move_to_destination_cartesian();
133 134
   void line_to_destination();
134 135
   void line_to_destination(float);
135 136
   void sync_plan_position_e();
137
+  void chirp_at_user();
138
+
139
+  // Private functions
140
+
136 141
   void un_retract_filament(float where[XYZE]);
137 142
   void retract_filament(float where[XYZE]);
138 143
   void look_for_lines_to_connect();
@@ -141,17 +146,14 @@
141 146
   void print_line_from_here_to_there(const float&, const float&, const float&, const float&, const float&, const float&);
142 147
   bool turn_on_heaters();
143 148
   bool prime_nozzle();
144
-  void chirp_at_user();
145 149
 
146 150
   static uint16_t circle_flags[16], horizontal_mesh_line_flags[16], vertical_mesh_line_flags[16], continue_with_closest = 0;
147 151
   float g26_e_axis_feedrate = 0.020,
148 152
         random_deviation = 0.0,
149 153
         layer_height = LAYER_HEIGHT;
150 154
 
151
-  bool g26_retracted = false; // We keep track of the state of the nozzle to know if it
152
-                              // is currently retracted or not.  This allows us to be
153
-                              // less careful because mis-matched retractions and un-retractions
154
-                              // won't leave us in a bad state.
155
+  static bool g26_retracted = false; // Track the retracted state of the nozzle so mismatched
156
+                                     // retracts/recovers won't result in a bad state.
155 157
 
156 158
   float valid_trig_angle(float);
157 159
   mesh_index_pair find_closest_circle_to_print(const float&, const float&);
@@ -166,9 +168,9 @@
166 168
                hotend_temp = HOTEND_TEMP,
167 169
                ooze_amount = OOZE_AMOUNT;
168 170
 
169
-  int8_t prime_flag = 0;
171
+  static int8_t prime_flag = 0;
170 172
 
171
-  bool keep_heaters_on = false;
173
+  static bool keep_heaters_on = false;
172 174
 
173 175
   /**
174 176
    * G26: Mesh Validation Pattern generation.

+ 0
- 2
Marlin/Marlin_main.cpp Переглянути файл

@@ -490,8 +490,6 @@ static uint8_t target_extruder;
490 490
   float zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER;
491 491
 #endif
492 492
 
493
-#define PLANNER_XY_FEEDRATE() (min(planner.max_feedrate_mm_s[X_AXIS], planner.max_feedrate_mm_s[Y_AXIS]))
494
-
495 493
 #if HAS_ABL
496 494
   float xy_probe_feedrate_mm_s = MMM_TO_MMS(XY_PROBE_SPEED);
497 495
   #define XY_PROBE_FEEDRATE_MM_S xy_probe_feedrate_mm_s

+ 2
- 0
Marlin/planner.h Переглянути файл

@@ -469,6 +469,8 @@ class Planner {
469 469
 
470 470
 };
471 471
 
472
+#define PLANNER_XY_FEEDRATE() (min(planner.max_feedrate_mm_s[X_AXIS], planner.max_feedrate_mm_s[Y_AXIS]))
473
+
472 474
 extern Planner planner;
473 475
 
474 476
 #endif // PLANNER_H

Завантаження…
Відмінити
Зберегти