cm.gm.feed_rate = velocity;
mp_flush_planner(); // don't use cm_request_queue_flush() here
cm_request_cycle_start();
- ritorno(cm_straight_feed(vect, flags));
+ RITORNO(cm_straight_feed(vect, flags));
return STAT_EAGAIN;
}
// initial probe state, don't probe if we're already contacted!
bool closed = switch_get_active(pb.probe_switch);
- if (!closed) ritorno(cm_straight_feed(pb.target, pb.flags));
+ if (!closed) RITORNO(cm_straight_feed(pb.target, pb.flags));
return _set_pb_func(_probing_finish);
}
EXEC_FUNC(cm_override_enables, override_enables);
if (cm.gn.next_action == NEXT_ACTION_DWELL) // G4 - dwell
- ritorno(cm_dwell(cm.gn.parameter));
+ RITORNO(cm_dwell(cm.gn.parameter));
EXEC_FUNC(cm_set_plane, select_plane);
EXEC_FUNC(cm_set_units_mode, units_mode);
}
if (status != STAT_OK && status != STAT_COMPLETE) return status;
- ritorno(_validate_gcode_block());
+ RITORNO(_validate_gcode_block());
return _execute_gcode_block(); // if successful execute the block
}
fp_ZERO(flags[arc.plane_axis_0]) & fp_ZERO(flags[arc.plane_axis_1]);
// compute arc runtime values
- ritorno(_compute_arc());
+ RITORNO(_compute_arc());
// trap zero length arcs that _compute_arc can throw
if (fp_ZERO(arc.length)) return STAT_MINIMUM_LENGTH_MOVE;
travel_steps[i] = mr.target_steps[i] - mr.position_steps[i];
// Call the stepper prep function
- ritorno(st_prep_line(travel_steps, mr.following_error, mr.segment_time));
+ RITORNO(st_prep_line(travel_steps, mr.following_error, mr.segment_time));
// update position from target
copy_vector(mr.position, mr.ms.target);
#include <stdio.h>
-stat_t status_code; // allocate a variable for the ritorno macro
+stat_t status_code; // allocate a variable for the RITORNO macro
#define STAT_MSG(NAME, TEXT) static const char stat_##NAME[] PROGMEM = TEXT;
#include "messages.def"
#include <avr/pgmspace.h>
-// ritorno is a handy way to provide exception returns
+// RITORNO is a handy way to provide exception returns
// It returns only if an error occurred. (ritorno is Italian for return)
-#define ritorno(a) if ((status_code = a) != STAT_OK) {return status_code;}
+#define RITORNO(a) if ((status_code = a) != STAT_OK) {return status_code;}
typedef enum {
#define STAT_MSG(NAME, TEXT) STAT_##NAME,