-
Notifications
You must be signed in to change notification settings - Fork 0
/
RobotMap.cpp
54 lines (41 loc) · 2.1 KB
/
RobotMap.cpp
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
53
54
// RobotBuilder Version: 1.0
//
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you export to
// C++ from RobotBuilder. Do not put any code or make any change in
// the blocks indicating autogenerated code or it will be lost on an
// update. Deleting the comments indicating the section will prevent
// it from being updated in th future.
#include "RobotMap.h"
#include "LiveWindow/LiveWindow.h"
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=ALLOCATION
CANJaguar* RobotMap::driveTrainFrontLeftWheel = NULL;
CANJaguar* RobotMap::driveTrainFrontRightWheel = NULL;
CANJaguar* RobotMap::driveTrainBackLeftWheel = NULL;
CANJaguar* RobotMap::driveTrainBackRightWheel = NULL;
RobotDrive* RobotMap::driveTrainRobotDrive41 = NULL;
AnalogChannel* RobotMap::ballArmBallArmPot = NULL;
CANJaguar* RobotMap::ballArmBallArmMotor = NULL;
Relay* RobotMap::airCompressorCompressorSpike = NULL;
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=ALLOCATION
void RobotMap::init() {
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
LiveWindow* lw = LiveWindow::GetInstance();
driveTrainFrontLeftWheel = new CANJaguar(2);
driveTrainFrontRightWheel = new CANJaguar(3);
driveTrainBackLeftWheel = new CANJaguar(4);
driveTrainBackRightWheel = new CANJaguar(5);
driveTrainRobotDrive41 = new RobotDrive(driveTrainFrontLeftWheel, driveTrainBackLeftWheel,
driveTrainFrontRightWheel, driveTrainBackRightWheel);
driveTrainRobotDrive41->SetSafetyEnabled(true);
driveTrainRobotDrive41->SetExpiration(0.1);
driveTrainRobotDrive41->SetSensitivity(0.5);
driveTrainRobotDrive41->SetMaxOutput(1.0);
ballArmBallArmPot = new AnalogChannel(1, 1);
lw->AddSensor("BallArm", "BallArmPot", ballArmBallArmPot);
ballArmBallArmMotor = new CANJaguar(6);
airCompressorCompressorSpike = new Relay(1, 1);
lw->AddActuator("AirCompressor", "CompressorSpike", airCompressorCompressorSpike);
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
}