-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added: VikingPigeon, more documentation, and deadband to controllers.…
… Changed: Variable names and position of code within some classes
- Loading branch information
Showing
5 changed files
with
271 additions
and
137 deletions.
There are no files selected for viewing
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
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
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,30 @@ | ||
package viking.controllers.ctre; | ||
|
||
import com.ctre.phoenix.sensors.PigeonIMU; | ||
|
||
public class VikingPigeon { | ||
|
||
private PigeonIMU gyro; | ||
|
||
/** | ||
* @param controller the master VikingSRX controller | ||
*/ | ||
public VikingPigeon(VikingSRX controller) { | ||
gyro = new PigeonIMU(controller.getTalonSRX()); | ||
|
||
gyro.configFactoryDefault(); | ||
} | ||
|
||
/** | ||
* Get the current yaw | ||
* @return the current yaw from 0 to 360 | ||
*/ | ||
public double getYaw() { | ||
return gyro.getAbsoluteCompassHeading(); | ||
} | ||
|
||
public PigeonIMU getPigeonIMU() { | ||
return gyro; | ||
} | ||
} | ||
|
Oops, something went wrong.