|
|
|
|
91
|
|
91
|
|
92
|
public:
|
92
|
public:
|
93
|
|
93
|
|
94
|
-//
|
|
|
95
|
-// Please do not put STATIC qualifiers in front of ANYTHING in this file. You WILL cause problems by doing that.
|
|
|
96
|
-// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of
|
|
|
97
|
-// functions that call STATIC functions.
|
|
|
98
|
-//
|
|
|
99
|
void find_mean_mesh_height();
|
94
|
void find_mean_mesh_height();
|
100
|
void shift_mesh_height();
|
95
|
void shift_mesh_height();
|
101
|
void probe_entire_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map, const bool stow_probe, bool do_furthest);
|
96
|
void probe_entire_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map, const bool stow_probe, bool do_furthest);
|
|
|
|
|
104
|
void manually_probe_remaining_mesh(const float &lx, const float &ly, const float &z_clearance, const float &card_thickness, const bool do_ubl_mesh_map);
|
99
|
void manually_probe_remaining_mesh(const float &lx, const float &ly, const float &z_clearance, const float &card_thickness, const bool do_ubl_mesh_map);
|
105
|
void save_ubl_active_state_and_disable();
|
100
|
void save_ubl_active_state_and_disable();
|
106
|
void restore_ubl_active_state_and_leave();
|
101
|
void restore_ubl_active_state_and_leave();
|
107
|
- void g29_what_command();
|
|
|
108
|
-//
|
|
|
109
|
-// Please do not put STATIC qualifiers in front of ANYTHING in this file. You WILL cause problems by doing that.
|
|
|
110
|
-// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of
|
|
|
111
|
-// functions that call STATIC functions.
|
|
|
112
|
-//
|
|
|
|
|
102
|
+ void g29_what_command();
|
113
|
void g29_eeprom_dump() ;
|
103
|
void g29_eeprom_dump() ;
|
114
|
void g29_compare_current_mesh_to_stored_mesh();
|
104
|
void g29_compare_current_mesh_to_stored_mesh();
|
115
|
void fine_tune_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map);
|
105
|
void fine_tune_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map);
|
116
|
void smart_fill_mesh();
|
106
|
void smart_fill_mesh();
|
117
|
void display_map(const int);
|
107
|
void display_map(const int);
|
118
|
void reset();
|
108
|
void reset();
|
119
|
-//
|
|
|
120
|
-// Please do not put STATIC qualifiers in front of ANYTHING in this file. You WILL cause problems by doing that.
|
|
|
121
|
-// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of
|
|
|
122
|
-// functions that call STATIC functions.
|
|
|
123
|
-//
|
|
|
124
|
void invalidate();
|
109
|
void invalidate();
|
125
|
void store_state();
|
110
|
void store_state();
|
126
|
void load_state();
|
111
|
void load_state();
|
|
|
|
|
165
|
|
150
|
|
166
|
unified_bed_leveling();
|
151
|
unified_bed_leveling();
|
167
|
|
152
|
|
168
|
-//
|
|
|
169
|
-// Please do not put STATIC qualifiers in front of ANYTHING in this file. You WILL cause problems by doing that.
|
|
|
170
|
-// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of
|
|
|
171
|
-// functions that call STATIC functions.
|
|
|
172
|
-//
|
|
|
173
|
FORCE_INLINE void set_z(const int8_t px, const int8_t py, const float &z) { z_values[px][py] = z; }
|
153
|
FORCE_INLINE void set_z(const int8_t px, const int8_t py, const float &z) { z_values[px][py] = z; }
|
174
|
int8_t get_cell_index_x(const float &x) {
|
154
|
int8_t get_cell_index_x(const float &x) {
|
175
|
const int8_t cx = (x - (UBL_MESH_MIN_X)) * (1.0 / (MESH_X_DIST));
|
155
|
const int8_t cx = (x - (UBL_MESH_MIN_X)) * (1.0 / (MESH_X_DIST));
|
|
|
|
|
186
|
// that is OK because something else should be keeping that from
|
166
|
// that is OK because something else should be keeping that from
|
187
|
// happening and should not be worried about at this level.
|
167
|
// happening and should not be worried about at this level.
|
188
|
|
168
|
|
189
|
-//
|
|
|
190
|
-// Please do not put STATIC qualifiers in front of ANYTHING in this file. You WILL cause problems by doing that.
|
|
|
191
|
-// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of
|
|
|
192
|
-// functions that call STATIC functions.
|
|
|
193
|
-//
|
|
|
194
|
int8_t find_closest_x_index(const float &x) {
|
169
|
int8_t find_closest_x_index(const float &x) {
|
195
|
const int8_t px = (x - (UBL_MESH_MIN_X) + (MESH_X_DIST) * 0.5) * (1.0 / (MESH_X_DIST));
|
170
|
const int8_t px = (x - (UBL_MESH_MIN_X) + (MESH_X_DIST) * 0.5) * (1.0 / (MESH_X_DIST));
|
196
|
return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1;
|
171
|
return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1;
|
|
|
|
|
219
|
FORCE_INLINE float calc_z0(const float &a0, const float &a1, const float &z1, const float &a2, const float &z2) {
|
194
|
FORCE_INLINE float calc_z0(const float &a0, const float &a1, const float &z1, const float &a2, const float &z2) {
|
220
|
return z1 + (z2 - z1) * (a0 - a1) / (a2 - a1);
|
195
|
return z1 + (z2 - z1) * (a0 - a1) / (a2 - a1);
|
221
|
}
|
196
|
}
|
222
|
-//
|
|
|
223
|
-// Please do not put STATIC qualifiers in front of ANYTHING in this file. You WILL cause problems by doing that.
|
|
|
224
|
-// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of
|
|
|
225
|
-// functions that call STATIC functions.
|
|
|
226
|
-//
|
|
|
227
|
|
197
|
|
228
|
/**
|
198
|
/**
|
229
|
* z_correction_for_x_on_horizontal_mesh_line is an optimization for
|
199
|
* z_correction_for_x_on_horizontal_mesh_line is an optimization for
|