]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
Merge branch 'master' of benesp7@rtime.felk.cvut.cz:/var/git/eurobot
authorBeneš Petr <benesp7@fel.cvut.cz>
Wed, 8 Apr 2009 02:52:09 +0000 (04:52 +0200)
committerBeneš Petr <benesp7@fel.cvut.cz>
Wed, 8 Apr 2009 02:52:09 +0000 (04:52 +0200)
Conflicts:

src/robofsm/motion-control.cc

1  2 
src/robofsm/fsmmove.cc
src/robofsm/motion-control.cc
src/robofsm/motion-control.h

Simple merge
index 381da185daf518e0d7dfc911cda65e3476a2e36a,f8bd4f785f2bb624ec88df31593e5d69d2c67077..598feb929e677587f1ca6db773427457273ed08d
@@@ -73,9 -86,20 +86,17 @@@ static pthread_mutex_t actual_trajector
  // Trajectory recalculation 
  sem_t start_recalculation;
  sem_t recalculation_not_running;
- //static pthread_mutex_t switch_to_trajectory_lock = PTHREAD_MUTEX_INITIALIZER;
- //static Trajectory *switch_to_trajectory;
- //static double switch_time;
+ sem_t measurement_received;
 -static pthread_mutex_t switch_to_trajectory_lock = PTHREAD_MUTEX_INITIALIZER;
 -static Trajectory *switch_to_trajectory;
 -static double switch_time;
+ /**
+  * Determines way of thread_trajectory_follower() operation:
+  * - 0 measurement doesn't work, controller invocation based on time (formerly CONFIG_OPEN_LOOP)
+  * - 2 measurement works, controller invocation based on sem_post
+  * - 1 measurement doesn't work and stop() was called
+  */
+ int measurement_ok = 0;
  
  static void delete_actual_trajectory()
  {
index 145520ea37e35ebb70b26ef4cb815cee2d1c0e4f,6c92100b6b17001e62d49b9d793ac52b5e4c120c..7787fe676c3e0023f2764199b97dd723a1e06611
@@@ -25,11 -25,12 +25,12 @@@ void motion_control_done(void)
   * following global variables. */
  extern sem_t start_recalculation;
  extern sem_t recalculation_not_running;
+ extern sem_t measurement_received;
  
 -void go(Trajectory *t);
 +void go(Trajectory *t, double append_time);
  void get_future_pos(double rel_time_sec, Pos &pos, double &switch_time);
  void stop();
--void switch_trajectory_at(Trajectory *t, double time);
++//void switch_trajectory_at(Trajectory *t, double time);
  #endif /* MOTION_CONTROL_INIT_ONLY */
  
  #ifdef __cplusplus