♻️ Rename XATC z_values => z_offset

This commit is contained in:
Scott Lahteine
2022-02-15 15:09:09 -06:00
parent 7da28768f7
commit 4199191e99
4 changed files with 11 additions and 14 deletions

View File

@ -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);
}