FRC1076 / 2019-Competition

Code for 2019 Competition
2 stars 1 forks source link

Change all PCM (Pneumatic Control Module) IDs to 0 when creating solenoids #61

Closed mcolinj closed 5 years ago

mcolinj commented 5 years ago

We have only a single PCM module with CAN ID 0. First argument to create doubleSolenoid is the module ID. Need to fix it. Maybe create a module constant PCM_CAN_ID = 0 and use that to be clear?

HATCH GRABBER

    self.grabber = Grabber(
        hatch = wpilib.DoubleSolenoid(5, EXTEND_ID, RETRACT_ID))

    #ball manipulator and controller
    self.ballManipulator = BallManipulator(ctre.WPI_TalonSRX(BALL_MANIP_ID))
    self.ballManipulatorController = BallManipulatorController(self.operator, self.logger)

    #EXTEND HATCH GRABBER 
    self.piston = extendPiston(piston=wpilib.DoubleSolenoid(4, PISTON_EXTEND_ID, PISTON_RETRACT_ID))
mcolinj commented 5 years ago

Read up about doublesolenoid objects here:

https://robotpy.readthedocs.io/projects/wpilib/en/latest/wpilib/DoubleSolenoid.html