blob: 95cfc278b3c1290b0deaada0739bc26b97ece3b6 [file] [log] [blame]
Brian Silverman687f5242013-03-16 13:57:59 -07001#ifndef FRC971_QUEUES_SENSOR_VALUES_H_
2#define FRC971_QUEUES_SENSOR_VALUES_H_
brians343bc112013-02-10 01:53:46 +00003
4#include <stdint.h>
5
6namespace frc971 {
7
8struct sensor_values {
Brian Silverman687f5242013-03-16 13:57:59 -07009 // Anonymous union to make fixing the byte order on all of the 4-byte long
10 // values easier.
11 // TODO(brians) name this better
12 union {
13 struct {
14 int32_t drive_left_encoder, drive_right_encoder;
15 int32_t shooter_encoder;
16 int32_t index_encoder, bottom_disc_negedge_wait_position;
17 int32_t bottom_disc_posedge_count, bottom_disc_negedge_count;
18 int32_t bottom_disc_negedge_wait_count;
19 int32_t top_disc_posedge_count, top_disc_negedge_count;
20 int32_t top_disc_posedge_position, top_disc_negedge_position;
21 int32_t wrist_position, wrist_edge_position;
22 int32_t angle_adjust_position;
23 int32_t angle_adjust_middle_edge_position;
24 int32_t angle_adjust_bottom_edge_position;
25 };
26 uint32_t encoders[17];
27 };
brians343bc112013-02-10 01:53:46 +000028
Brian Silverman687f5242013-03-16 13:57:59 -070029 bool wrist_hall_effect;
30 bool angle_adjust_middle_hall_effect;
31 bool angle_adjust_bottom_hall_effect;
32
33 bool top_disc, bottom_disc;
brians343bc112013-02-10 01:53:46 +000034};
35
Brian Silverman687f5242013-03-16 13:57:59 -070036} // namespace frc971
brians343bc112013-02-10 01:53:46 +000037
Brian Silverman687f5242013-03-16 13:57:59 -070038#endif // FRC971_QUEUES_SENSOR_VALUES_H_