/Users/craigcornelius/Projects/SPRING Mac Release 0.2/bird.cpp File Reference

#include "bird.h"
#include <strings.h>
#include <unistd.h>
#include <termio.h>
#include <fcntl.h>
#include <sys/time.h>
#include <stdio.h>

Include dependency graph for bird.cpp:

Go to the source code of this file.

Defines

#define USE_NEW_LIBRARY
#define BIRD_EXAMINE_VALUE   0x4F
#define BIRD_CHANGE_VALUE   0x50
#define BIRD_POSITION   0x56
#define BIRD_ANGLES   0x57
#define BIRD_MATRIX   0x58
#define BIRD_POSITION_ANGLES   0x59
#define BIRD_POSITION_MATRIX   0x5A
#define BIRD_POINT   0x42
#define BIRD_STREAM   0x40
#define BIRD_RUN   0x46
#define BIRD_SLEEP   0x47
#define BIRD_SYNC_CMD   0x41
#define BIRD_CRT_SYNC_LOW   0x01
#define BIRD_CRT_SYNC_HIGH   0x02
#define BIRD_HOST_SYNC   0x80
#define BIRD_RATE1   0x51
#define BIRD_RATE2   0x52
#define BIRD_RATE8   0x53
#define BIRD_RATE32   0x54
#define BIRD_BUTTON_ON   0x01
#define BIRD_BUTTON_OFF   0x00
#define BIRD_SET_BUTTON   0x4d
#define BIRD_HEMISPHERE   0x4c
#define BIRD_HEMI_AXIS   0x00
#define BIRD_HEMI_SIGN   0x01
#define BIRD_ANGLE_ALIGN2   0x71
#define BIRD_CRYSTAL_SPEED   0x02
#define POSMAX   (36.0 / 32767.0)
#define ANGMAX   (180.0 / 32767.0)
#define MATMAX   (1.0 / 32767.0)
#define BIRD_TIME_OUT   800000
#define DECODE(b, i)   ((short)( ( ((b)[i+1] << 7 ) | ((b)[i] & 0x7f) ) << 2 ))
#define ENCODE_LSB(x)   (short(x) & 0x00ff)
#define ENCODE_MSB(x)   ((short(x) & 0xff00) >> 8)
#define DECODE_UNPHASED(b, i)   ((short)( ((b)[i+1] << 8 ) | (b)[i]))


Define Documentation

#define ANGMAX   (180.0 / 32767.0)

Definition at line 303 of file bird.cpp.

#define BIRD_ANGLE_ALIGN2   0x71

Definition at line 298 of file bird.cpp.

#define BIRD_ANGLES   0x57

Definition at line 275 of file bird.cpp.

#define BIRD_BUTTON_OFF   0x00

Definition at line 292 of file bird.cpp.

#define BIRD_BUTTON_ON   0x01

Definition at line 291 of file bird.cpp.

#define BIRD_CHANGE_VALUE   0x50

Definition at line 273 of file bird.cpp.

#define BIRD_CRT_SYNC_HIGH   0x02

Definition at line 285 of file bird.cpp.

#define BIRD_CRT_SYNC_LOW   0x01

Definition at line 284 of file bird.cpp.

#define BIRD_CRYSTAL_SPEED   0x02

Definition at line 300 of file bird.cpp.

#define BIRD_EXAMINE_VALUE   0x4F

Definition at line 272 of file bird.cpp.

#define BIRD_HEMI_AXIS   0x00

Definition at line 296 of file bird.cpp.

#define BIRD_HEMI_SIGN   0x01

Definition at line 297 of file bird.cpp.

#define BIRD_HEMISPHERE   0x4c

Definition at line 295 of file bird.cpp.

#define BIRD_HOST_SYNC   0x80

Definition at line 286 of file bird.cpp.

#define BIRD_MATRIX   0x58

Definition at line 276 of file bird.cpp.

#define BIRD_POINT   0x42

Definition at line 279 of file bird.cpp.

#define BIRD_POSITION   0x56

Definition at line 274 of file bird.cpp.

#define BIRD_POSITION_ANGLES   0x59

Definition at line 277 of file bird.cpp.

#define BIRD_POSITION_MATRIX   0x5A

Definition at line 278 of file bird.cpp.

#define BIRD_RATE1   0x51

Definition at line 287 of file bird.cpp.

#define BIRD_RATE2   0x52

Definition at line 288 of file bird.cpp.

#define BIRD_RATE32   0x54

Definition at line 290 of file bird.cpp.

#define BIRD_RATE8   0x53

Definition at line 289 of file bird.cpp.

#define BIRD_RUN   0x46

Definition at line 281 of file bird.cpp.

#define BIRD_SET_BUTTON   0x4d

Definition at line 293 of file bird.cpp.

#define BIRD_SLEEP   0x47

Definition at line 282 of file bird.cpp.

#define BIRD_STREAM   0x40

Definition at line 280 of file bird.cpp.

#define BIRD_SYNC_CMD   0x41

Definition at line 283 of file bird.cpp.

#define BIRD_TIME_OUT   800000

Definition at line 306 of file bird.cpp.

#define DECODE ( b,
 )     ((short)( ( ((b)[i+1] << 7 ) | ((b)[i] & 0x7f) ) << 2 ))

Definition at line 309 of file bird.cpp.

#define DECODE_UNPHASED ( b,
 )     ((short)( ((b)[i+1] << 8 ) | (b)[i]))

#define ENCODE_LSB (  )     (short(x) & 0x00ff)

Definition at line 310 of file bird.cpp.

#define ENCODE_MSB (  )     ((short(x) & 0xff00) >> 8)

Definition at line 311 of file bird.cpp.

#define MATMAX   (1.0 / 32767.0)

Definition at line 304 of file bird.cpp.

#define POSMAX   (36.0 / 32767.0)

Definition at line 302 of file bird.cpp.

#define USE_NEW_LIBRARY

Definition at line 5 of file bird.cpp.


Generated on Thu Aug 30 11:03:17 2007 for SPRING Mac by  doxygen 1.5.3