mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[wpilib] Rename PneumaticsModuleType constants
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user