Formatted with ruff
This commit is contained in:
parent
48855bf656
commit
f6a8adee4f
|
|
@ -1,7 +1,7 @@
|
||||||
#from .drivetrain import DriveTrain
|
# from .drivetrain import DriveTrain
|
||||||
from .controller import XboxController
|
from .controller import XboxController
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
#"DriveTrain",
|
# "DriveTrain",
|
||||||
"XboxController",
|
"XboxController",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,4 @@ CONTROLLER_CORRECT_FOR_DEADBAND = True
|
||||||
# The deadband for the controller joysticks
|
# The deadband for the controller joysticks
|
||||||
CONTROLLER_DEADBAND = 0.3
|
CONTROLLER_DEADBAND = 0.3
|
||||||
# The port the controller is connected to
|
# The port the controller is connected to
|
||||||
CONTROLLER_PORT = 0
|
CONTROLLER_PORT = 0
|
||||||
|
|
|
||||||
2
genie.py
2
genie.py
|
|
@ -19,4 +19,4 @@ class GenieRobot(magicbot.MagicRobot):
|
||||||
inst.schedule(command)
|
inst.schedule(command)
|
||||||
|
|
||||||
def disabledPeriodic(self):
|
def disabledPeriodic(self):
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
9
robot.py
9
robot.py
|
|
@ -2,19 +2,20 @@ import components
|
||||||
import constants
|
import constants
|
||||||
import genie
|
import genie
|
||||||
|
|
||||||
|
|
||||||
class MyRobot(genie.GenieRobot):
|
class MyRobot(genie.GenieRobot):
|
||||||
CONTROLLER: components.XboxController
|
CONTROLLER: components.XboxController
|
||||||
|
|
||||||
def createObjects(self):
|
def createObjects(self):
|
||||||
'''Create motors and stuff here'''
|
"""Create motors and stuff here"""
|
||||||
# Controller stuff here
|
# Controller stuff here
|
||||||
self.CONTROLLER_CORRECT_FOR_DEADBAND = constants.CONTROLLER_CORRECT_FOR_DEADBAND
|
self.CONTROLLER_CORRECT_FOR_DEADBAND = constants.CONTROLLER_CORRECT_FOR_DEADBAND
|
||||||
self.CONTROLLER_DEADBAND = constants.CONTROLLER_DEADBAND
|
self.CONTROLLER_DEADBAND = constants.CONTROLLER_DEADBAND
|
||||||
self.CONTROLLER_PORT = constants.CONTROLLER_PORT
|
self.CONTROLLER_PORT = constants.CONTROLLER_PORT
|
||||||
|
|
||||||
def teleopInit(self):
|
def teleopInit(self):
|
||||||
'''Called when teleop starts; optional'''
|
"""Called when teleop starts; optional"""
|
||||||
|
|
||||||
def teleopPeriodic(self):
|
def teleopPeriodic(self):
|
||||||
'''Called periodically during teleop'''
|
"""Called periodically during teleop"""
|
||||||
self.CONTROLLER.capture_button_presses()
|
self.CONTROLLER.capture_button_presses()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue