kopia lustrzana https://github.com/Schildkroet/GRBL-Advanced
G83 bug fix
rodzic
ac4833b3a3
commit
f097d18ab6
18
grbl/GCode.c
18
grbl/GCode.c
|
@ -1661,13 +1661,15 @@ uint8_t GC_ExecuteLine(char *line)
|
|||
}
|
||||
else
|
||||
{
|
||||
uint8_t exit = 0;
|
||||
//-- G83 --//
|
||||
for(float curr_z = clear_z - gc_block.values.q; curr_z >= gc_block.values.xyz[Z_AXIS] - 0.001; curr_z -= gc_block.values.q)
|
||||
for(float curr_z = clear_z - gc_block.values.q; exit == 0; curr_z -= gc_block.values.q)
|
||||
{
|
||||
// Check if target depth exceeds final depth
|
||||
if(curr_z < gc_block.values.xyz[Z_AXIS])
|
||||
if(curr_z <= gc_block.values.xyz[Z_AXIS])
|
||||
{
|
||||
curr_z = gc_block.values.xyz[Z_AXIS];
|
||||
exit = 1;
|
||||
}
|
||||
|
||||
// Move the Z-axis at the current feed rate to the Z position.
|
||||
|
@ -1680,10 +1682,14 @@ uint8_t GC_ExecuteLine(char *line)
|
|||
pl_data->condition |= PL_COND_FLAG_RAPID_MOTION; // Set rapid motion condition flag.
|
||||
MC_Line(xyz, pl_data);
|
||||
|
||||
// Rapid move to bottom of hole (backed off a bit)
|
||||
xyz[Z_AXIS] = curr_z + 0.4;
|
||||
pl_data->condition |= PL_COND_FLAG_RAPID_MOTION; // Set rapid motion condition flag.
|
||||
MC_Line(xyz, pl_data);
|
||||
if(exit == 0)
|
||||
{
|
||||
// Prepare next hole
|
||||
// Rapid move to bottom of hole (backed off a bit)
|
||||
xyz[Z_AXIS] = curr_z + 0.4;
|
||||
pl_data->condition |= PL_COND_FLAG_RAPID_MOTION; // Set rapid motion condition flag.
|
||||
MC_Line(xyz, pl_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -755,6 +755,8 @@ void Report_RealtimeStatus(void)
|
|||
if (BIT_IS_TRUE(lim_pin_state, BIT(X_AXIS))) { Putc('X'); }
|
||||
if (BIT_IS_TRUE(lim_pin_state, BIT(Y_AXIS))) { Putc('Y'); }
|
||||
if (BIT_IS_TRUE(lim_pin_state, BIT(Z_AXIS))) { Putc('Z'); }
|
||||
if (BIT_IS_TRUE(lim_pin_state, BIT(A_AXIS))) { Putc('A'); }
|
||||
if (BIT_IS_TRUE(lim_pin_state, BIT(B_AXIS))) { Putc('B'); }
|
||||
}
|
||||
|
||||
if(ctrl_pin_state) {
|
||||
|
|
|
@ -126,8 +126,8 @@ void TC_ProbeTLS(void)
|
|||
Protocol_BufferSynchronize();
|
||||
|
||||
// Set up fast probing
|
||||
pl_data.feed_rate = 180.0;
|
||||
pl_data.condition = 0; // Set rapid motion condition flag.
|
||||
pl_data.feed_rate = 200.0;
|
||||
pl_data.condition = 0; // Reset rapid motion condition flag.
|
||||
|
||||
// Probe TLS fast
|
||||
position[Z_AXIS] -= 200.0;
|
||||
|
@ -140,7 +140,7 @@ void TC_ProbeTLS(void)
|
|||
|
||||
// Get current position
|
||||
System_ConvertArraySteps2Mpos(position, sys_position);
|
||||
position[Z_AXIS] += 1.5;
|
||||
position[Z_AXIS] += 1.8;
|
||||
|
||||
// Move up a little bit for slow probing
|
||||
pl_data.feed_rate = 200.0;
|
||||
|
|
Ładowanie…
Reference in New Issue