ASMESDC2018
Main Page
Related Pages
Packages
Classes
Files
File List
File Members
/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
71
ShooterState
shooter_state
;
72
73
Motor
shoot_left
;
74
Motor
shoot_right
;
75
Motor
pusher
;
76
77
};
78
79
#endif
/* OFFENSE_ROBOT_H_ */
80
81
OffenseRobot::shoot_left
Motor shoot_left
Definition:
OffenseRobot.h:73
ShooterState::speed
volatile int speed
Definition:
OffenseRobot.h:33
OffenseRobot::shooter_state
ShooterState shooter_state
Definition:
OffenseRobot.h:71
OffenseRobot
Definition:
OffenseRobot.h:36
Motor
Definition:
Motor.h:53
ShooterState
Definition:
OffenseRobot.h:31
OmniRobot.h
Header file for OmniRobot class
OffenseRobot::pusher
Motor pusher
Definition:
OffenseRobot.h:75
OffenseRobot::shoot_right
Motor shoot_right
Definition:
OffenseRobot.h:74
OmniRobot
Definition:
OmniRobot.h:53
ShooterState::position
volatile int position
Definition:
OffenseRobot.h:32
Generated on Mon Apr 16 2018 09:42:37 for ASMESDC2018 by
1.8.11