-
Notifications
You must be signed in to change notification settings - Fork 3
/
ports.cpp
59 lines (46 loc) · 2.28 KB
/
ports.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
55
56
57
58
59
/* ports.cpp
*
* Copyright (c) 2011, 2012 Chantilly Robotics <chantilly612@gmail.com>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
* This file contains tables for the electrical layout and setup of the
* electrical components. Keep the formatting in this file very easy to read
* such that it is easy to maintain and quickly check if it is in sync with
* the actual state of affairs on the electrical board!
*/
#include "ports.h"
//just define & initialize all of the consts in ports.h
//PORTS TABLE
//PWMs SLOT PORT
Jaguar minibot_jag ( 1, 1 );
Jaguar left_rear_jag ( 1, 2 );
Jaguar right_rear_jag ( 1, 3 );
Jaguar right_front_jag ( 1, 4 );
Jaguar left_front_jag ( 1, 5 );
//DIOs SLOT PORT
//sample_dio ( 1, 1,
// 2 );
//AIOs SLOT PORT
//Relays SLOT PORT
//USBs (on driver station) PORT
Joystick left_joystick ( 1 );
Joystick right_joystick ( 2 );
Joystick gunner_joystick( 3 );
//initialization of custom structs:
//drive_jaguar JAGUAR& TYPE REVERSE
drive_jaguar left_front_motor = { left_front_jag, RobotDrive::kFrontLeftMotor, true };
drive_jaguar left_rear_motor = { left_rear_jag, RobotDrive::kRearLeftMotor, true };
drive_jaguar right_front_motor = { right_front_jag, RobotDrive::kFrontRightMotor, true };
drive_jaguar right_rear_motor = { right_rear_jag, RobotDrive::kRearRightMotor, true };