More testing. Passes regressions; adjusted minimum line test to 0.00002 mm (up from 0.00001)

This commit is contained in:
Alden Hart
2017-02-19 16:59:20 -05:00
parent 61704e9eb3
commit d67dc6540e
4 changed files with 17 additions and 16 deletions

View File

@@ -166,7 +166,6 @@ static void _controller_HSM()
DISPATCH(cm_probing_cycle_callback()); // probing cycle operation (G38.2)
DISPATCH(cm_jogging_cycle_callback()); // jog cycle operation
DISPATCH(cm_deferred_write_callback()); // persist G10 changes when not in machining cycle
// DISPATCH(cm_feedhold_sequencing_callback());// feedhold state machine runner
DISPATCH(cm_feedhold_command_blocker()); // blocks new Gcode from arriving while in feedhold
//----- command readers and parsers --------------------------------------------------//

View File

@@ -913,8 +913,8 @@ static stat_t _exec_aline_head(mpBuf_t *bf)
/*********************************************************************************************
* _exec_aline_body()
*
* The body is broken into little segments even though it is a straight line so that
* feed holds can happen in the middle of a line with a minimum of latency
* The body is broken into little segments even though it is a straight line
* so that feed holds can happen in the middle of a line with minimum latency
*/
static stat_t _exec_aline_body(mpBuf_t *bf)
{
@@ -935,11 +935,11 @@ static stat_t _exec_aline_body(mpBuf_t *bf)
}
mr->section = SECTION_BODY;
mr->section_state = SECTION_RUNNING; // uses PERIOD_2 so last segment detection works
mr->section_state = SECTION_RUNNING; // uses PERIOD_2 so last segment detection works
}
if (_exec_aline_segment() == STAT_OK) { // OK means this section is done
if (fp_ZERO(mr->r->tail_length)) {
return(STAT_OK); // ends the move
return(STAT_OK); // ends the move
}
mr->section = SECTION_TAIL;
mr->section_state = SECTION_NEW;
@@ -954,16 +954,16 @@ static stat_t _exec_aline_body(mpBuf_t *bf)
static stat_t _exec_aline_tail(mpBuf_t *bf)
{
bool first_pass = false;
if (mr->section_state == SECTION_NEW) { // INITIALIZATION
if (mr->section_state == SECTION_NEW) { // INITIALIZATION
first_pass = true;
// Mark the block as unplannable
bf->plannable = false;
if (fp_ZERO(mr->r->tail_length)) { return(STAT_OK);} // end the move
if (fp_ZERO(mr->r->tail_length)) { return(STAT_OK);} // end the move
mr->segments = ceil(uSec(mr->r->tail_time) / NOM_SEGMENT_USEC);// # of segments for the section
mr->segment_count = (uint32_t)mr->segments;
mr->segment_time = mr->r->tail_time / mr->segments; // time to advance for each segment
mr->segment_time = mr->r->tail_time / mr->segments; // time to advance for each segment
if (mr->segment_count == 1) {
mr->segment_velocity = mr->r->tail_length / mr->segment_time;
@@ -972,8 +972,8 @@ static stat_t _exec_aline_tail(mpBuf_t *bf)
}
if (mr->segment_time < MIN_SEGMENT_TIME) {
_debug_trap("mr->segment_time < MIN_SEGMENT_TIME");
return(STAT_OK); // exit without advancing position, say we're done
// return(STAT_MINIMUM_TIME_MOVE); // exit without advancing position
return(STAT_OK); // exit without advancing position, say we're done
// return(STAT_MINIMUM_TIME_MOVE); // exit without advancing position
}
mr->section = SECTION_TAIL;
mr->section_state = SECTION_RUNNING;

View File

@@ -198,7 +198,8 @@ stat_t mp_aline(GCodeState_t* gm_in)
length = sqrt(length_square);
// exit if the move has zero movement. At all.
if (fp_ZERO(length)) {
// if (fp_ZERO(length)) {
if (length < 0.00002) { // this value is 2x EPSILON and prevents trap failures in _plan_aline()
sr_request_status_report(SR_REQUEST_TIMED_FULL); // Was SR_REQUEST_IMMEDIATE_FULL
return (STAT_MINIMUM_LENGTH_MOVE); // STAT_MINIMUM_LENGTH_MOVE needed to end cycle
}

View File

@@ -312,13 +312,14 @@ stat_t mp_calculate_ramps(mpBlockRuntimeBuf_t* block, mpBuf_t* bf, const float e
// Rate-limited asymmetric cases (3)
// compute meet velocity to see if the cruise velocity rises above the entry and/or exit velocities
block->cruise_velocity = _get_meet_velocity(entry_velocity, block->exit_velocity, bf->length, bf, block);
// TRAP_ZERO(block->cruise_velocity, "zoid() Vc=0 asymmetric HT case");
#if (0)
TRAP_ZERO(block->cruise_velocity, "zoid() Vc=0 asymmetric HT case");
#else
if (fp_ZERO(block->cruise_velocity)) {
return (STAT_MINIMUM_LENGTH_MOVE); // This error case needs to be recovered upstream
// rpt_exception(STAT_MINIMUM_LENGTH_MOVE, "mp_calculate_ramps() case (3)");
// __asm__("BKPT");
// return (STAT_MINIMUM_LENGTH_MOVE); // This error case needs to be recovered upstream
__asm__("BKPT");
}
#endif
// We now store the head/tail lengths we computed in _get_meet_velocity.
// treat as a full up and down (head and tail)
bf->hint = ASYMMETRIC_BUMP;