From d3a38d6cce69bc7debce828b4ecd3a9c0c866e96 Mon Sep 17 00:00:00 2001 From: zer0 Date: Mon, 3 May 2010 17:25:15 +0200 Subject: [PATCH] add a get_State() func --- .../devices/robot/trajectory_manager/trajectory_manager.h | 5 +++++ .../robot/trajectory_manager/trajectory_manager_utils.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/modules/devices/robot/trajectory_manager/trajectory_manager.h b/modules/devices/robot/trajectory_manager/trajectory_manager.h index 3e22502..7cab785 100644 --- a/modules/devices/robot/trajectory_manager/trajectory_manager.h +++ b/modules/devices/robot/trajectory_manager/trajectory_manager.h @@ -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. */ diff --git a/modules/devices/robot/trajectory_manager/trajectory_manager_utils.c b/modules/devices/robot/trajectory_manager/trajectory_manager_utils.c index c48b592..5ec5755 100644 --- a/modules/devices/robot/trajectory_manager/trajectory_manager_utils.c +++ b/modules/devices/robot/trajectory_manager/trajectory_manager_utils.c @@ -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) -- 2.39.5