[wpilib] Rename PneumaticsModuleType constants

This commit is contained in:
Peter Johnson
2026-03-19 21:32:48 -07:00
parent f060c98992
commit ea32c247db
44 changed files with 142 additions and 137 deletions

View File

@@ -33,21 +33,21 @@ class MyRobot(wpilib.TimedRobot):
# Solenoid corresponds to a single solenoid.
# In this case, it's connected to channel 0 of a PH with the default CAN ID.
self.solenoid = wpilib.Solenoid(
busId=0, moduleType=wpilib.PneumaticsModuleType.REVPH, channel=0
busId=0, moduleType=wpilib.PneumaticsModuleType.REV_PH, channel=0
)
# DoubleSolenoid corresponds to a double solenoid.
# In this case, it's connected to channels 1 and 2 of a PH with the default CAN ID.
self.doubleSolenoid = wpilib.DoubleSolenoid(
busId=0,
moduleType=wpilib.PneumaticsModuleType.REVPH,
moduleType=wpilib.PneumaticsModuleType.REV_PH,
forwardChannel=1,
reverseChannel=2,
)
# Compressor connected to a PH with a default CAN ID (1)
self.compressor = wpilib.Compressor(
busId=0, moduleType=wpilib.PneumaticsModuleType.REVPH
busId=0, moduleType=wpilib.PneumaticsModuleType.REV_PH
)
# Publish elements to dashboard.