-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathActuators.h
More file actions
52 lines (38 loc) · 1.45 KB
/
Actuators.h
File metadata and controls
52 lines (38 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#pragma once
#include <memory>
#include <rev/CANSparkMax.h>
#include "frc/DigitalInput.h"
// Brushless Motor
#define BRUSHLESS rev::CANSparkMax::MotorType::kBrushless
// Coast
#define COAST rev::CANSparkMax::IdleMode::kCoast
#define LEFT_FRONT_DRIVE_MOTOR 1
#define LEFT_BACK_DRIVE_MOTOR 3
#define RIGHT_FRONT_DRIVE_MOTOR 5
#define RIGHT_BACK_DRIVE_MOTOR 7
#define LEFT_FRONT_STEER_MOTOR 2
#define LEFT_BACK_STEER_MOTOR 4
#define RIGHT_FRONT_STEER_MOTOR 6
#define RIGHT_BACK_STEER_MOTOR 8
#define ARM_LIFT_MOTOR 9
#define ARM_UP_MOTOR 10
#define ARM_EXTEND_MOTOR 11
typedef struct actuators_t {
// Left drivetrain motors
std::unique_ptr<rev::CANSparkMax> left_front_drive_motor;
std::unique_ptr<rev::CANSparkMax> left_back_drive_motor;
std::unique_ptr<rev::CANSparkMax> right_front_drive_motor;
std::unique_ptr<rev::CANSparkMax> right_back_drive_motor;
// Right drivetrain motors
std::unique_ptr<rev::CANSparkMax> left_front_steer_motor;
std::unique_ptr<rev::CANSparkMax> left_back_steer_motor;
std::unique_ptr<rev::CANSparkMax> right_front_steer_motor;
std::unique_ptr<rev::CANSparkMax> right_back_steer_motor;
// arm motors
std::unique_ptr<rev::CANSparkMax> arm_lift_motor;
std::unique_ptr<rev::CANSparkMax> arm_up_motor;
std::unique_ptr<rev::CANSparkMax> arm_extend_motor;
// Claw things
std::unique_ptr<rev::CANSparkMax> claw_motor;
std::unique_ptr<frc::DigitalInput> claw_IR_sensor;
} Actuators;