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

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 DECODE | ( | b, | |||
| i | ) | ((short)( ( ((b)[i+1] << 7 ) | ((b)[i] & 0x7f) ) << 2 )) |
| #define DECODE_UNPHASED | ( | b, | |||
| i | ) | ((short)( ((b)[i+1] << 8 ) | (b)[i])) |
1.5.3