00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef CHECKPOINT1_H
00022 #define CHECKPOINT1_H
00023 #include <types.h>
00024 #define CHECKPOINT_MAX 500
00025
00026
00029 struct checkpoint
00030 {
00032 word timestamp;
00034 short IRangle;
00036 uint8 x;
00038 uint8 y;
00039
00040
00042 short distance;
00044 short angle;
00045 };
00047
00065 class logger
00066 {
00067 public:
00068 logger(void);
00070 static void operate(bool);
00072 static bool operate(void);
00074 static void frequency(short);
00076 static short frequency(void);
00078
00084 static bool write();
00086 static word top(void);
00088
00095 static void checkpoint(MILLIMETER x, MILLIMETER y, DEGREE angle, CENTIMETER d, DEGREE irangle);
00097 static void upload(void);
00098 #ifdef DOS
00099
00100
00108 static void play(unsigned short time,uint8& x, uint8& y, RADIAN& angle, CENTIMETER& d, RADIAN& irangle);
00110
00113 static short time(unsigned short t);
00115
00123 static void add_checkpoint(short time, short x, short y, DEGREE angle, CENTIMETER d, DEGREE irangle);
00124 #endif
00125
00126 private:
00127 static struct checkpoint _checkpoints[CHECKPOINT_MAX];
00128 static word _top;
00129 static bool _operate;
00130 static short _frequency;
00131 static short _counter;
00132 };
00133 #endif
00134