Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/modules/tools/atc/ATCHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1074,9 +1074,11 @@ void ATCHandler::fill_cali_scripts(bool is_probe, bool clear_z, int repeat_count
}

for(int i = 1; i <= repeat_count; i++){
if(i == 1){
// lift z to safe position with fast speed
snprintf(buff, sizeof(buff), "G53 G0 Z%.3f", THEROBOT->from_millimeters(clear_z ? this->clearance_z : this->safe_z_mm));
this->script_queue.push(buff);
}
// move x and y to calibrate position
// Use one-off offsets if configured, otherwise use standard probe position
float probe_x = probe_mx_mm + (this->probe_oneoff_configured ? this->probe_oneoff_x : 0.0);
Expand Down Expand Up @@ -1109,13 +1111,17 @@ void ATCHandler::fill_cali_scripts(bool is_probe, bool clear_z, int repeat_count
// save new tool offset
snprintf(buff, sizeof(buff), "M493.1 R%d", i);
this->script_queue.push(buff);
// lift z to safe position with fast speed
snprintf(buff, sizeof(buff), "G53 G0 Z%.3f", THEROBOT->from_millimeters(this->clearance_z));
this->script_queue.push(buff);
}else{
// save new tool offset
this->script_queue.push("M493.1");
// lift a bit
snprintf(buff, sizeof(buff), "G91 G0 Z%.3f", THEROBOT->from_millimeters(25.0));
this->script_queue.push(buff);
}
// lift z to safe position with fast speed
snprintf(buff, sizeof(buff), "G53 G0 Z%.3f", THEROBOT->from_millimeters(this->safe_z_mm));
this->script_queue.push(buff);

}
// check if wireless probe is will be triggered
if (is_probe) {
Expand Down
Loading