beta_homing_retract_mm 5 # "
gamma_homing_retract_mm 1 # "
+#endstop_debounce_count 100 # uncomment if you get noise on your endstops, default is 100
+
+# optional Z probe
+zprobe.enable false # set to true to enable a zprobe
+zprobe.probe_pin 1.29!^ # pin probe is attached to if NC remove the !
+zprobe.slow_feedrate 5 # mm/sec probe feed rate
+#zprobe.debounce_count 100 # set if noisy
+zprobe.fast_feedrate 100 # move feedrate mm/sec
+zprobe.probe_height 5 # how much above bed to start probe
+
+# associated with zprobe the leveling strategy to use
+#leveling-strategy.three-point-leveling.enable true # a leveling strategy that probes three points to define a plane and keeps the Z parallel to that plane
+#leveling-strategy.three-point-leveling.point1 100.0,0.0 # the first probe point (x,y) optional may be defined with M557
+#leveling-strategy.three-point-leveling.point2 200.0,200.0 # the second probe point (x,y)
+#leveling-strategy.three-point-leveling.point3 0.0,200.0 # the third probe point (x,y)
+#leveling-strategy.three-point-leveling.home_first true # home the XY axis before probing
+#leveling-strategy.three-point-leveling.tolerance 0.03 # the probe tolerance in mm, anything less that this will be ignored, default is 0.03mm
+
+
# Pause button
pause_button_enable true #
beta_homing_retract_mm 5 # "
gamma_homing_retract_mm 1 # "
-#endstop_debounce_count 100 # uncomment if you get noise on your endstops
+#endstop_debounce_count 100 # uncomment if you get noise on your endstops, default is 100
# optional Z probe
zprobe.enable false # set to true to enable a zprobe
#leveling-strategy.three-point-leveling.point2 200.0,200.0 # the second probe point (x,y)
#leveling-strategy.three-point-leveling.point3 0.0,200.0 # the third probe point (x,y)
#leveling-strategy.three-point-leveling.home_first true # home the XY axis before probing
+#leveling-strategy.three-point-leveling.tolerance 0.03 # the probe tolerance in mm, anything less that this will be ignored, default is 0.03mm
# Pause button
// first wait for an empty queue i.e. no moves left
THEKERNEL->conveyor->wait_for_empty_queue();
if(!doProbing(gcode->stream)) {
- gcode->stream->printf("Probe failed to complete, probe not triggered\n");
+ gcode->stream->printf("Probe failed to complete, probe not triggered or other error\n");
} else {
gcode->stream->printf("Probe completed, bed plane defined\n");
}
if(gcode->has_letter('Y')) y = gcode->get_value('Y');
if(idx >= 0 && idx <= 2) {
probe_points[idx] = std::make_tuple(x, y);
+ }else{
+ gcode->stream->printf("only 3 probe points allowed P0-P2\n");
}
return true;
std::tie(x, y) = probe_points[2]; v[2].set(x, y, c);
delete this->plane;
this->plane = new Plane3D(v[0], v[1], v[2]);
+ gcode->stream->printf("plane normal= %f, %f, %f\n", plane->getNormal()[0], plane->getNormal()[1], plane->getNormal()[2]);
x= 0; y=0;
if(gcode->has_letter('X')) x = gcode->get_value('X');
if(gcode->has_letter('Y')) y = gcode->get_value('Y');
Gcode *gcode = static_cast<Gcode *>(argument);
if( gcode->has_g && gcode->g >= 29 && gcode->g <= 32) {
- // G code processing
+ // make sure the probe is defined and not already triggered before moving motors
+ if(!this->pin.connected()) {
+ gcode->stream->printf("ZProbe not connected.\n");
+ return;
+ }
+ if(this->pin.get()) {
+ gcode->stream->printf("ZProbe triggered before move, aborting command.\n");
+ return;
+ }
+
if( gcode->g == 30 ) { // simple Z probe
gcode->mark_as_taken();
// first wait for an empty queue i.e. no moves left
THEKERNEL->conveyor->wait_for_empty_queue();
- // make sure the probe is not already triggered before moving motors
- if(this->pin.get()) {
- gcode->stream->printf("ZProbe triggered before move, aborting command.\n");
- return;
- }
-
int steps;
if(run_probe(steps)) {
gcode->stream->printf("Z:%1.4f C:%d\n", steps / Z_STEPS_PER_MM, steps);