♻️ Rename XATC z_values => z_offset
This commit is contained in:
@ -77,7 +77,7 @@ void xatc_wizard_update_z_offset() {
|
||||
//
|
||||
void xatc_wizard_set_offset_and_go_to_next_point() {
|
||||
// Set Z-offset at probed point
|
||||
xatc.z_values[manual_probe_index++] = probe.offset.z + current_position.z - measured_z;
|
||||
xatc.z_offset[manual_probe_index++] = probe.offset.z + current_position.z - measured_z;
|
||||
// Go to next point
|
||||
ui.goto_screen(xatc_wizard_goto_next_point);
|
||||
}
|
||||
@ -160,12 +160,12 @@ void xatc_wizard_goto_next_point() {
|
||||
else {
|
||||
// Compute the z-offset by averaging the values found with this wizard
|
||||
z_offset = 0;
|
||||
LOOP_L_N(i, XATC_MAX_POINTS) z_offset += xatc.z_values[i];
|
||||
LOOP_L_N(i, XATC_MAX_POINTS) z_offset += xatc.z_offset[i];
|
||||
z_offset /= XATC_MAX_POINTS;
|
||||
|
||||
// Subtract the average from the values found with this wizard.
|
||||
// This way they are indipendent from the z-offset
|
||||
LOOP_L_N(i, XATC_MAX_POINTS) xatc.z_values[i] -= z_offset;
|
||||
LOOP_L_N(i, XATC_MAX_POINTS) xatc.z_offset[i] -= z_offset;
|
||||
|
||||
ui.goto_screen(xatc_wizard_update_z_offset);
|
||||
}
|
||||
|
Reference in New Issue
Block a user