Probe cycle line numbers ifdef fixes to get it to compile.
- Updated some of the ifdefs when disabling line numbers feature. Getting messy with this compile-time option. This will likely get cleaned up later. - This is just a push to get the new probing code to compile. Testing and optimization of the code will soon follow and be pushed next.
This commit is contained in:
parent
387a1b9f84
commit
4d7ca76f6c
8
gcode.c
8
gcode.c
@ -371,7 +371,11 @@ uint8_t gc_execute_line(char *line)
|
||||
FAIL(STATUS_INVALID_STATEMENT);
|
||||
break;
|
||||
}
|
||||
#ifdef USE_LINE_NUMBERS
|
||||
if(mc_probe_cycle(target, (gc.inverse_feed_rate_mode) ? inverse_feed_rate : gc.feed_rate, gc.inverse_feed_rate_mode, line_number)){
|
||||
#else
|
||||
if(mc_probe_cycle(target, (gc.inverse_feed_rate_mode) ? inverse_feed_rate : gc.feed_rate, gc.inverse_feed_rate_mode)){
|
||||
#endif
|
||||
FAIL(STATUS_PROBE_ERROR);
|
||||
}
|
||||
axis_words = 0;
|
||||
@ -381,7 +385,11 @@ uint8_t gc_execute_line(char *line)
|
||||
FAIL(STATUS_INVALID_STATEMENT);
|
||||
break;
|
||||
}
|
||||
#ifdef USE_LINE_NUMBERS
|
||||
mc_probe_cycle(target, (gc.inverse_feed_rate_mode) ? inverse_feed_rate : gc.feed_rate, gc.inverse_feed_rate_mode, line_number);
|
||||
#else
|
||||
mc_probe_cycle(target, (gc.inverse_feed_rate_mode) ? inverse_feed_rate : gc.feed_rate, gc.inverse_feed_rate_mode);
|
||||
#endif
|
||||
axis_words = 0;
|
||||
break;
|
||||
case NON_MODAL_SET_HOME_0: case NON_MODAL_SET_HOME_1:
|
||||
|
@ -269,7 +269,12 @@ void mc_homing_cycle()
|
||||
limits_init();
|
||||
}
|
||||
|
||||
|
||||
#ifdef USE_LINE_NUMBERS
|
||||
uint8_t mc_probe_cycle(float *t, float feed_rate, uint8_t invert_feed_rate, int32_t line_number)
|
||||
#else
|
||||
uint8_t mc_probe_cycle(float *t, float feed_rate, uint8_t invert_feed_rate)
|
||||
#endif
|
||||
{
|
||||
protocol_buffer_synchronize(); //finish all queued commands
|
||||
|
||||
@ -290,7 +295,12 @@ uint8_t mc_probe_cycle(float *t, float feed_rate, uint8_t invert_feed_rate, int3
|
||||
// An empty buffer is needed because we need to enable the probe pin along the same move that we're about to execute.
|
||||
|
||||
sys.state = STATE_CYCLE;
|
||||
|
||||
#ifdef USE_LINE_NUMBERS
|
||||
plan_buffer_line(target, feed_rate, invert_feed_rate, line_number); // Bypass mc_line(). Directly plan homing motion.
|
||||
#else
|
||||
plan_buffer_line(target, feed_rate, invert_feed_rate); // Bypass mc_line(). Directly plan homing motion.
|
||||
#endif
|
||||
st_prep_buffer(); // Prep and fill segment buffer from newly planned block.
|
||||
st_wake_up(); // Initiate motion
|
||||
|
||||
@ -341,7 +351,11 @@ uint8_t mc_probe_cycle(float *t, float feed_rate, uint8_t invert_feed_rate, int3
|
||||
|
||||
//report_realtime_status(); //debug
|
||||
|
||||
plan_buffer_line(target, feed_rate, invert_feed_rate, line_number); // Bypass mc_line(). Directly plan motion.
|
||||
#ifdef USE_LINE_NUMBERS
|
||||
plan_buffer_line(target, feed_rate, invert_feed_rate, line_number); // Bypass mc_line(). Directly plan homing motion.
|
||||
#else
|
||||
plan_buffer_line(target, feed_rate, invert_feed_rate); // Bypass mc_line(). Directly plan homing motion.
|
||||
#endif
|
||||
st_prep_buffer(); // Prep and fill segment buffer from newly planned block.
|
||||
st_wake_up(); // Initiate motion
|
||||
|
||||
|
@ -54,7 +54,11 @@ void mc_homing_cycle();
|
||||
// Perform tool length probe cycle. Requires probe switch.
|
||||
// Returns STATUS_OK in all cases except when the motion is completed without the probe being triggered.
|
||||
// In that case, it returns a STATUS_PROBE_ERROR
|
||||
#ifdef USE_LINE_NUMBERS
|
||||
uint8_t mc_probe_cycle(float *target, float feed_rate, uint8_t invert_feed_rate, int32_t line_number);
|
||||
#else
|
||||
uint8_t mc_probe_cycle(float *target, float feed_rate, uint8_t invert_feed_rate);
|
||||
#endif
|
||||
|
||||
// Performs system reset. If in motion state, kills all motion and sets system alarm.
|
||||
void mc_reset();
|
||||
|
Loading…
Reference in New Issue
Block a user