Uppercase macro
authorJoseph Coffland <joseph@cauldrondevelopment.com>
Thu, 23 Jun 2016 23:44:09 +0000 (16:44 -0700)
committerJoseph Coffland <joseph@cauldrondevelopment.com>
Thu, 23 Jun 2016 23:44:09 +0000 (16:44 -0700)
src/cycle_homing.c
src/cycle_probing.c
src/gcode_parser.c
src/plan/arc.c
src/plan/exec.c
src/status.c
src/status.h

index db5d48379c3bb068151b4b4f7fd5ff1abfb1a3e5..bb9234c8a28f1b0bf462f77d9cec367e5c2c92c4 100644 (file)
@@ -347,7 +347,7 @@ static stat_t _homing_axis_move(int8_t axis, float target, float velocity) {
   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;
 }
index 3ea5cb2b1548ca2895ec8cdc5a7e260d4d233f66..d48accabac8bfe1d53de1ad42f96e04de567c34d 100644 (file)
@@ -198,7 +198,7 @@ static stat_t _probing_start() {
   // 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);
 }
index ea69740682b2c986931fbd9ac67bfba2e6e2e39e..8343c7916ce5c6c625d4af91147fe263786349da 100644 (file)
@@ -249,7 +249,7 @@ static stat_t _execute_gcode_block() {
   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);
@@ -517,7 +517,7 @@ static stat_t _parse_gcode_block(char *buf) {
   }
 
   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
 }
index 477e690d49b99a47901e1b1f933d60d4335735b4..8b01e40a0a65c31be10418715f11baf9eea1d365 100644 (file)
@@ -456,7 +456,7 @@ stat_t cm_arc_feed(float target[], float flags[], // arc endpoints
     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;
index ff041ddc2b4ed44cb435c29acee073632a6bb157..2159babb68c82fd3cfc5900af8d379a65c68aa59 100644 (file)
@@ -105,7 +105,7 @@ static stat_t _exec_aline_segment() {
     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);
index 2f63af459e4e07fe409a99b926ba428f5067699c..ed691cc8b6f8aefc37367c3aa78ec07e61bdb932 100644 (file)
@@ -29,7 +29,7 @@
 
 #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"
index 1f80417ccf3e8fa0af2af60771a7738d4fd7596b..10477169b2c245c1973f5c3294db37a9df748486 100644 (file)
@@ -30,9 +30,9 @@
 #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,