|
@@ -1436,31 +1436,20 @@ void process_commands()
|
1436
|
1436
|
|
1437
|
1437
|
for (int xCount=0; xCount < ACCURATE_BED_LEVELING_POINTS; xCount++)
|
1438
|
1438
|
{
|
|
1439
|
+ float z_before;
|
1439
|
1440
|
if (probePointCounter == 0)
|
1440
|
1441
|
{
|
1441
|
1442
|
// raise before probing
|
1442
|
|
- do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_BEFORE_PROBING);
|
|
1443
|
+ z_before = Z_RAISE_BEFORE_PROBING;
|
1443
|
1444
|
} else
|
1444
|
1445
|
{
|
1445
|
1446
|
// raise extruder
|
1446
|
|
- do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS);
|
|
1447
|
+ z_before = current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS;
|
1447
|
1448
|
}
|
1448
|
1449
|
|
|
1450
|
+ float measured_z = probe_pt(xProbe, yProbe, z_before);
|
1449
|
1451
|
|
1450
|
|
- do_blocking_move_to(xProbe - X_PROBE_OFFSET_FROM_EXTRUDER, yProbe - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]);
|
1451
|
|
-
|
1452
|
|
- engage_z_probe(); // Engage Z Servo endstop if available
|
1453
|
|
- run_z_probe();
|
1454
|
|
- eqnBVector[probePointCounter] = current_position[Z_AXIS];
|
1455
|
|
- retract_z_probe();
|
1456
|
|
-
|
1457
|
|
- SERIAL_PROTOCOLPGM("Bed x: ");
|
1458
|
|
- SERIAL_PROTOCOL(xProbe);
|
1459
|
|
- SERIAL_PROTOCOLPGM(" y: ");
|
1460
|
|
- SERIAL_PROTOCOL(yProbe);
|
1461
|
|
- SERIAL_PROTOCOLPGM(" z: ");
|
1462
|
|
- SERIAL_PROTOCOL(current_position[Z_AXIS]);
|
1463
|
|
- SERIAL_PROTOCOLPGM("\n");
|
|
1452
|
+ eqnBVector[probePointCounter] = measured_z;
|
1464
|
1453
|
|
1465
|
1454
|
eqnAMatrix[probePointCounter + 0*ACCURATE_BED_LEVELING_POINTS*ACCURATE_BED_LEVELING_POINTS] = xProbe;
|
1466
|
1455
|
eqnAMatrix[probePointCounter + 1*ACCURATE_BED_LEVELING_POINTS*ACCURATE_BED_LEVELING_POINTS] = yProbe;
|