Change set_z() parameters to uin8_t
Saves 24 bytes of flash
This commit is contained in:
parent
581188ce2c
commit
c705d4aa10
@ -2872,14 +2872,14 @@ bool sample_mesh_and_store_reference()
|
||||
}
|
||||
mbl.set_z(0, 0, current_position[Z_AXIS]);
|
||||
}
|
||||
for (int8_t mesh_point = 1; mesh_point != MESH_MEAS_NUM_X_POINTS * MESH_MEAS_NUM_Y_POINTS; ++ mesh_point) {
|
||||
for (uint8_t mesh_point = 1; mesh_point != MESH_MEAS_NUM_X_POINTS * MESH_MEAS_NUM_Y_POINTS; ++ mesh_point) {
|
||||
// Don't let the manage_inactivity() function remove power from the motors.
|
||||
refresh_cmd_timeout();
|
||||
// Print the decrasing ID of the measurement point.
|
||||
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
|
||||
go_to_current(homing_feedrate[Z_AXIS]/60);
|
||||
int8_t ix = mesh_point % MESH_MEAS_NUM_X_POINTS;
|
||||
int8_t iy = mesh_point / MESH_MEAS_NUM_X_POINTS;
|
||||
uint8_t ix = mesh_point % MESH_MEAS_NUM_X_POINTS;
|
||||
uint8_t iy = mesh_point / MESH_MEAS_NUM_X_POINTS;
|
||||
if (iy & 1) ix = (MESH_MEAS_NUM_X_POINTS - 1) - ix; // Zig zag
|
||||
current_position[X_AXIS] = BED_X(ix, MESH_MEAS_NUM_X_POINTS);
|
||||
current_position[Y_AXIS] = BED_Y(iy, MESH_MEAS_NUM_Y_POINTS);
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
// Otherwise a correction matrix is pulled from the EEPROM if available.
|
||||
static void get_meas_xy(int ix, int iy, float &x, float &y, bool use_default);
|
||||
|
||||
void set_z(int ix, int iy, float z) { z_values[iy][ix] = z; }
|
||||
void set_z(uint8_t ix, uint8_t iy, float z) { z_values[iy][ix] = z; }
|
||||
|
||||
int select_x_index(float x) {
|
||||
int i = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user