blob: 7026af047ca4141461d1cc1a949a45697a55255c [file] [log] [blame]
brians0ab60bb2013-01-31 02:21:51 +00001#ifndef __ANALOG_H__
2#define __ANALOG_H__
3
Austin Schuh63d0e9b2013-03-27 04:43:14 +00004extern int64_t gyro_angle;
5struct DataStruct{
6 int64_t gyro_angle;
7
8 int32_t right_drive;
9 int32_t left_drive;
10 int32_t shooter_angle;
11 int32_t shooter;
12 int32_t indexer;
13 int32_t wrist;
14
15 int32_t capture_top_rise;
16 int32_t capture_top_fall;
17 int32_t capture_bottom_fall_delay;
18 int32_t capture_wrist_rise;
19 int32_t capture_shooter_angle_rise;
20
21 int8_t top_rise_count;
22
23 int8_t top_fall_count;
24
25 int8_t bottom_rise_count;
26
27 int8_t bottom_fall_delay_count;
28 int8_t bottom_fall_count;
29
30 int8_t wrist_rise_count;
31
32 int8_t shooter_angle_rise_count;
33}__attribute__((__packed__));
34void fillSensorPacket(struct DataStruct *packet);
35
36
brians0ab60bb2013-01-31 02:21:51 +000037void analog_init (void);
38int analog(int chan);
39int digital(int chan);
40int encoder_bits(int chan);
41void encoder_init(void);
42int32_t encoder_val(int chan);
43int dip(int chan);
44#endif // __ANALOG_H__