00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef WAYPOINT_DRIVER_H
00023 #define WAYPOINT_DRIVER_H
00024 #include <local_vector_driver.h>
00025 #include <types.h>
00026
00027 class motion_chain;
00028 enum LAUNCH { COUNTDOWN, LAUNCH_GO, NEW_TARGET, PAUSE, RESUME, ABORT };
00030
00035 class Motion_Driver : public Geometry_Driver
00036 {
00037 public:
00038 friend void task_motion_driver(void*);
00040
00054 Motion_Driver(IOLINE Pencoder, IOLINE Sencoder, IOLINE f,PORT ifp,IOLINE tpu,
00055 IOLINE Pencoder,IOLINE Sencoder, IOLINE rf,PORT rfp, IOLINE rtpu, uint8 subclass=0);
00057 void abort(bool icancel = true);
00059 bool target(void);
00061 bool waypoint(void);
00063 void relaunch(void);
00065 void launch(motion_chain* const path);
00067 void acquire_targets(motion_chain* const _target);
00068
00069 #ifdef DOS
00070 LAUNCH get_launch(void);
00071 short destx();
00072 short desty();
00073 static int32 sDestx(void);
00074 static int32 sDesty(void);
00075 static LAUNCH sLaunch(void);
00076 #endif
00077 protected:
00078 Motion_Driver(void);
00079 LAUNCH _launch;
00080 static foo2 callback(void);
00081 private:
00082 void get_dest(void);
00083 motion_chain* _target;
00084 short _ptop;
00085 short MM_destx;
00086 short MM_desty;
00087 int EU_optidestx;
00088 int EU_optidesty;
00089 bool _waypoint;
00090 int _dest_index;
00091 bool _reset;
00092 };
00093
00094 #endif