/* * powerglove.h Version 2.8 * 11/19/91 * * * Syracuse University Virtual Reality Lab * David Barberi * dbarberi@sugrfx.acs.syr.edu * dbarberi@sunrise.acs.syr.edu */ #include #include #include #include #include "sys/callo.h" #include #include /* Your port must be configured correctly for it to work. Must be */ /* read/writable and have correct settings for gettty */ #define PORT_ID "/dev/ttyd2" /* These defines are for pglove.gesture */ #define OPEN 0 #define FIST 1 #define POINT 2 #define BIGPOINT 3 #define BIRD 4 #define AOK 5 #define ONEDOWN 6 #define TWODOWN 7 #define THREEDOWN 8 #define THREEUP 9 #define STRANGE 10 /* These defines are for pglove.key */ #define NO_KEY 0 #define ONE 1 #define TWO 2 #define THREE 3 #define FOUR 4 #define FIVE 5 #define SIX 6 #define SEVEN 7 #define EIGHT 8 #define NINE 9 #define ENTER 10 #define UP 11 #define DOWN 12 #define RIGHT 13 #define LEFT 14 #define A 15 #define B 16 #define SELECT 17 #define START 18 #define CENTER 19 /* Center and 0 key are same */ #define BAD 20 #define ZSCALER 3.2 /* pglove.z is not on the same scale as x and y, so use */ /* something like: foo=pglove.z*ZSCALER */ #define GOOD 1 /* data is either good or corrupt */ #define CORRUPT 0 /* This is the main Glove structure with all the data you could ask for */ /* key1 to key4 are for the Keypad on the glove */ /* gesture tells you what position the hand is in (as per the #defines) */ /* key tells you what key has been pressed (as per the #defines) */ typedef struct { int x, y, z, thumb, one, two, three, twist, key1, key2, key3, key4, gesture, key; } pglove_data; pglove_data pglove; int file_id; /* file_id is for the port */ /* int sleepval=70; sleepval is the time to wait between queries */ /* to the glove. Going below 70 is dangerous */ /* Defunct since t_sleep */ /* END powerglove.h */