-
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.
- Loading branch information
Showing
8 changed files
with
101 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[auth] | ||
hostname = roborio-192-frc.local | ||
|
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,17 @@ | ||
class ManualShooter: | ||
|
||
def __init__(self, flywheel_motor, shooter_act, turntable_motor): | ||
self.flywheel_motor = flywheel_motor | ||
self.shooter_act = shooter_act | ||
self.turntable_motor = turntable_motor | ||
|
||
def turn(self, power): | ||
self.turntable_motor.set(power) | ||
|
||
def spin_flywheel(self, power): | ||
self.flywheel_motor.set(power) | ||
def shooter_down(self): | ||
self.shooter_act.set(True) | ||
def shooter_up(self): | ||
self.shooter_act.set(False) | ||
|
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,26 +1,43 @@ | ||
from robotpy_ext.common_drivers.navx.ahrs import AHRS | ||
from grt.core import Sensor | ||
|
||
|
||
class NavX(Sensor): | ||
def __init__(self): | ||
super().__init__() | ||
try: | ||
from robotpy_ext.common_drivers.navx.ahrs import AHRS | ||
class NavX(Sensor): | ||
def __init__(self): | ||
super().__init__() | ||
|
||
self.ahrs = AHRS.create_spi() | ||
self.ahrs = AHRS.create_spi() | ||
|
||
self.pitch = None | ||
self.yaw = None | ||
self.roll = None | ||
self.compass_heading = None | ||
self.fused_heading = None | ||
self.pitch = None | ||
self.yaw = None | ||
self.roll = None | ||
self.compass_heading = None | ||
self.fused_heading = None | ||
|
||
def poll(self): | ||
self.pitch = self.ahrs.getPitch() | ||
def poll(self): | ||
self.pitch = self.ahrs.getPitch() | ||
|
||
self.yaw = self.ahrs.getYaw() | ||
self.yaw = self.ahrs.getYaw() | ||
|
||
self.roll = self.ahrs.getRoll() | ||
self.roll = self.ahrs.getRoll() | ||
|
||
self.compass_heading = self.ahrs.getCompassHeading() | ||
self.compass_heading = self.ahrs.getCompassHeading() | ||
|
||
self.fused_heading = self.ahrs.getFusedHeading() | ||
self.fused_heading = self.ahrs.getFusedHeading() | ||
|
||
except ImportError: | ||
class NavX(Sensor): | ||
def __init__(self): | ||
super().__init__() | ||
|
||
self.ahrs = None | ||
|
||
self.pitch = None | ||
self.yaw = None | ||
self.roll = None | ||
self.compass_heading = None | ||
self.fused_heading = None | ||
|
||
def poll(self): | ||
pass |