add a get_State() func
authorzer0 <zer0@carbon.local>
Mon, 3 May 2010 15:25:15 +0000 (17:25 +0200)
committerzer0 <zer0@carbon.local>
Mon, 3 May 2010 15:25:15 +0000 (17:25 +0200)
modules/devices/robot/trajectory_manager/trajectory_manager.h
modules/devices/robot/trajectory_manager/trajectory_manager_utils.c

index 3e22502..7cab785 100644 (file)
@@ -149,6 +149,11 @@ void trajectory_set_windows(struct trajectory *traj, double d_win,
  */
 void trajectory_set_circle_coef(struct trajectory *traj, double coef);
 
+/**
+ * return trajectory state
+ */
+enum trajectory_state trajectory_get_state(struct trajectory *traj);
+
 /** return true if the position consign is equal to the filtered
  * position consign (after quadramp filter), for angle and
  * distance. */
index c48b592..5ec5755 100644 (file)
@@ -155,6 +155,11 @@ uint8_t is_robot_in_angle_window(struct trajectory *traj, double a_win_rad)
        return ABS(a) < a_win_rad;
 }
 
+enum trajectory_state trajectory_get_state(struct trajectory *traj)
+{
+       return traj->state;
+}
+
 /* distance unit conversions */
 
 double pos_mm2imp(struct trajectory *traj, double pos)