ASMESDC2018
/home/swerve/Github/sdc_2018/omni_robot/OffenseRobot.h
Go to the documentation of this file.
1 
8 #ifndef OFFENSE_ROBOT_H_
9 #define OFFENSE_ROBOT_H_
10 
11 #include "OmniRobot.h"
12 
13 #define BLDC_DELAY 10 // time to wait in milliseconds between actuating BLDC's
14 
15 #define PIN_PWM_SHOOT_LEFT 6
16 #define PIN_PWM_SHOOT_RIGHT 5
17 #define PIN_PWM_PUSHER 7
18 
19 #define PUSHER_INPUT_MIN -50
20 #define PUSHER_OUTPUT_MIN 1450
21 #define PUSHER_OUTPUT_MAX 1700
22 
23 #define SHOOT_INPUT_CAPTURE_THRESH 75
24 #define SHOOT_INPUT_OFF_THRESH 0
25 #define SHOOT_INPUT_SHOOT_THRESH -75
26 
27 #define SHOOT_OUTPUT_CAPTURE 1550
28 #define SHOOT_OUTPUT_OFF 1500
29 #define SHOOT_OUTPUT_SHOOT 1200
30 
31 struct ShooterState {
32  volatile int position;
33  volatile int speed;
34 };
35 
36 class OffenseRobot : public OmniRobot {
37 public:
38 
39  /* Constructor Functions */
40  OffenseRobot(void);
47  /* Public Functions */
48  void runShooter(void);
55  void displayShooterState(void);
62  void updateLED(void);
69 protected:
70 
72 
76 
77 };
78 
79 #endif /* OFFENSE_ROBOT_H_ */
80 
81 
Motor shoot_left
Definition: OffenseRobot.h:73
volatile int speed
Definition: OffenseRobot.h:33
ShooterState shooter_state
Definition: OffenseRobot.h:71
Definition: Motor.h:53
Header file for OmniRobot class
Motor shoot_right
Definition: OffenseRobot.h:74
volatile int position
Definition: OffenseRobot.h:32