Skip to content

Commit

Permalink
Merge pull request #4 from WBHSRobotics4737/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
briansemrau authored Mar 3, 2018
2 parents 87d9069 + 10772a7 commit 1afc563
Show file tree
Hide file tree
Showing 39 changed files with 1,919 additions and 122 deletions.
3 changes: 1 addition & 2 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
<classpathentry kind="var" path="cscore" sourcepath="cscore.sources"/>
<classpathentry kind="var" path="wpiutil" sourcepath="wpiutil.sources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="var" path="USERLIBS_DIR/CTRE_Phoenix.jar" sourcepath="/USERLIBS_DIR/CTRE_Phoenix-sources.jar"/>
<classpathentry kind="var" path="USERLIBS_DIR/CTRE_Phoenix-sources.jar"/>
<classpathentry kind="var" path="USERLIBS_DIR/CTRE_Phoenix.jar"/>
<classpathentry kind="var" path="USERLIBS_DIR/navx_frc.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
124 changes: 118 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

# =========================
# Operating System Files
# =========================

# OSX
# =========================
### OSX ###

.DS_Store
.AppleDouble
Expand All @@ -45,3 +40,120 @@ $RECYCLE.BIN/
Network Trash Folder
Temporary Items
.apdisk

# Following created by https://www.gitignore.io/api/eclipse,intellij

### Eclipse ###

.metadata
bin/
build/
dist/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders

# Eclipse Core
.project

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# PyDev specific (Python IDE for Eclipse)
*.pydevproject

# CDT-specific (C/C++ Development Tooling)
.cproject

# JDT-specific (Eclipse Java Development Tools)
.classpath

# Java annotation processor (APT)
.factorypath

# PDT-specific (PHP Development Tools)
.buildpath

# sbteclipse plugin
.target

# Tern plugin
.tern-project

# TeXlipse plugin
.texlipse

# STS (Spring Tool Suite)
.springBeans

# Code Recommenders
.recommenders/


### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml

# Sensitive or high-churn files:
.idea/dataSources/
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml

# Gradle:
.idea/gradle.xml
.idea/libraries

# Mongo Explorer plugin:
.idea/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
sysProps.xml

.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/vcs.xml
FRC-4737-2018.iml
Binary file removed bin/org/usfirst/frc/team4737/robot/OI.class
Binary file not shown.
Binary file removed bin/org/usfirst/frc/team4737/robot/Robot.class
Binary file not shown.
Binary file removed bin/org/usfirst/frc/team4737/robot/RobotMap.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
80 changes: 80 additions & 0 deletions src/org/usfirst/frc/team4737/lib/F310Gamepad.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
package org.usfirst.frc.team4737.lib;

public class F310Gamepad extends Gamepad {

// private class LogitechGamepadTriggerAxis extends GamepadAxis {
//
// private final boolean positive;
//
// public LogitechGamepadTriggerAxis(Gamepad gamepad, String name, int axis, boolean positive) {
// super(gamepad, name, axis);
//
// this.positive = positive;
// }
//
// @Override
// public double get() {
// double value = super.get();
// if (value > 0 && positive)
// return value;
// else if (value < 0 && !positive)
// return -value;
// else
// return 0;
// }
//
// }

public final GamepadButton A;
public final GamepadButton B;
public final GamepadButton X;
public final GamepadButton Y;
public final GamepadButton LB;
public final GamepadButton RB;
public final GamepadButton BACK;
public final GamepadButton START;
public final GamepadButton L3;
public final GamepadButton R3;

public final Thumbstick LS;
public final Thumbstick RS;

// public final LogitechGamepadTriggerAxis LT;
// public final LogitechGamepadTriggerAxis RT;
public final GamepadAxis LT;
public final GamepadAxis RT;

public final DPad DPAD;

public F310Gamepad(int usbPort) {
super(usbPort, "LogitechGamepad");
A = new GamepadButton(this, "A", 1);
B = new GamepadButton(this, "B", 2);
X = new GamepadButton(this, "X", 3);
Y = new GamepadButton(this, "Y", 4);
LB = new GamepadButton(this, "LB", 5);
RB = new GamepadButton(this, "RB", 6);
BACK = new GamepadButton(this, "BACK", 7);
registerButton(BACK, "SELECT");
START = new GamepadButton(this, "START", 8);
L3 = new GamepadButton(this, "L3", 9);
registerButton(L3, "LS");
R3 = new GamepadButton(this, "R3", 10);
registerButton(R3, "RS");

LS = new Thumbstick(this, "LS", 0, 1, false, true);
LS.X.setDeadzone(0.1);
LS.Y.setDeadzone(0.1);
RS = new Thumbstick(this, "RS", 4, 5, false, true);
RS.X.setDeadzone(0.1);
RS.Y.setDeadzone(0.1);

// LT = new LogitechGamepadTriggerAxis(this, "LT", 2, true);
// RT = new LogitechGamepadTriggerAxis(this, "RT", 3, false);
LT = new GamepadAxis(this, "LT", 2, false);
RT = new GamepadAxis(this, "RT", 3, false);

DPAD = new DPad(this, "DPAD", 0);
}

}
Loading

0 comments on commit 1afc563

Please sign in to comment.