~shadow-h511/robototes2412java/mecanum

« back to all changes in this revision

Viewing changes to src/com/shadowh511/mayor/inputs/Attack3.java

  • Committer: shadowh511
  • Date: 2010-04-03 01:33:25 UTC
  • Revision ID: shadow.h511@gmail.com-20100403013325-5qde3om3b7v5fuae
Wow, i havent commited in a long time.  There are a LOT of changes this time around, its all object-oriented, and it uses threads.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * To change this template, choose Tools | Templates
 
3
 * and open the template in the editor.
 
4
 */
 
5
 
 
6
package com.shadowh511.mayor.inputs;
 
7
 
 
8
import edu.wpi.first.wpilibj.Joystick;
 
9
 
 
10
/**
 
11
 *
 
12
 * @author sam
 
13
 */
 
14
public class Attack3 {
 
15
    private Joystick controller;
 
16
 
 
17
    public Attack3(int port) {
 
18
        controller = new Joystick (port);
 
19
    }
 
20
 
 
21
    public double getX() {
 
22
        return this.controller.getRawAxis(2);
 
23
    }
 
24
 
 
25
    public double getY() {
 
26
        return this.controller.getRawAxis(1);
 
27
    }
 
28
 
 
29
    public double getThrottle() {
 
30
        return this.controller.getRawAxis(3);
 
31
    }
 
32
 
 
33
    public boolean getTrigger() {
 
34
        return this.controller.getRawButton(1);
 
35
    }
 
36
 
 
37
    public boolean get2() {
 
38
        return this.controller.getRawButton(2);
 
39
    }
 
40
 
 
41
    public boolean get3() {
 
42
        return this.controller.getRawButton(3);
 
43
    }
 
44
 
 
45
    public boolean get4() {
 
46
        return this.controller.getRawButton(4);
 
47
    }
 
48
 
 
49
    public boolean get5() {
 
50
        return this.controller.getRawButton(5);
 
51
    }
 
52
 
 
53
    public boolean get6() {
 
54
        return this.controller.getRawButton(6);
 
55
    }
 
56
 
 
57
    public boolean get7() {
 
58
        return this.controller.getRawButton(7);
 
59
    }
 
60
 
 
61
    public boolean get8() {
 
62
        return this.controller.getRawButton(8);
 
63
    }
 
64
 
 
65
    public boolean get9() {
 
66
        return this.controller.getRawButton(9);
 
67
    }
 
68
 
 
69
    public boolean get10() {
 
70
        return this.controller.getRawButton(10);
 
71
    }
 
72
 
 
73
    public boolean get11() {
 
74
        return this.controller.getRawButton(11);
 
75
    }
 
76
}