-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CBAxisRef and CBButtonRef. Unify CBArcadeDriveMapper and migrate …
…into core.
- Loading branch information
Showing
7 changed files
with
61 additions
and
94 deletions.
There are no files selected for viewing
Submodule core
updated
2 files
+1 −1 | assemblies/CBDriveModule.java | |
+78 −0 | mappers/CBArcadeDriveMapper.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/org/montclairrobotics/cyborg/devices/CBAxisRef.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.montclairrobotics.cyborg.devices; | ||
|
||
public class CBAxisRef { | ||
public int stickID; | ||
public int index; | ||
|
||
public CBAxisRef() { | ||
stickID = -1; | ||
index = -1; | ||
} | ||
|
||
public CBAxisRef(int stickID, int index) { | ||
this.stickID = stickID; | ||
this.index = index; | ||
} | ||
|
||
public boolean isDefined() { | ||
return stickID>=0; | ||
} | ||
|
||
public static CBAxisRef undefined() { | ||
return new CBAxisRef(-1,-1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/org/montclairrobotics/cyborg/devices/CBButtonRef.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.montclairrobotics.cyborg.devices; | ||
|
||
public class CBButtonRef{ | ||
public int stickID; | ||
public int index; | ||
|
||
public CBButtonRef() { | ||
stickID = -1; | ||
index = -1; | ||
} | ||
|
||
public CBButtonRef(int stickID, int index) { | ||
this.stickID = stickID; | ||
this.index = index; | ||
} | ||
|
||
public boolean isDefined() { | ||
return stickID>=0; | ||
} | ||
|
||
public static CBButtonRef undefined() { | ||
return new CBButtonRef(-1,-1); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/java/org/montclairrobotics/cyborg/devices/CBJoystickIndex.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 0 additions & 81 deletions
81
src/main/java/org/montclairrobotics/cyborg/mappers/CBArcadeDriveMapper.java
This file was deleted.
Oops, something went wrong.