strongback / strongback-java

A library for FIRST Robotics Competition robots that makes it easier to write and test your robot code.
MIT License
41 stars 38 forks source link

Added component for pneumatics control module #28

Closed rhauch closed 9 years ago

rhauch commented 9 years ago

Added the PneumaticsModule, which represents the Pneumatics Control Module (PCM) on the 2015+ hardware and which uses the WPILib Compressor class for the hardware-based implementation. This commit also adds a mock implementation that behaves like the actual hardware-based implementation, except that the low-pressure switch can be manually triggered and untriggered, and the compressor faults can be manually tripped (they do reset immediately but do alter the sticky faults correctly). When the compressor runs (whether in auto or manual mode), the current sensor shows a constant 10A reading (which should be similar to what the actual Viair 090C Air Compressor consumes. When the compressor is off (for any reason), the current is set to 0.

This change does support using 0 or more PCMs on a single robot, since one of the hardware-based factory methods takes the CAN identifier of the PCM.

Closes #26

rhauch commented 9 years ago

@granjef3: please review to see if this has everything you need for the PCM.

xortive commented 9 years ago

Looks great @rhauch. As far as I know, this implements all of the PCM features.

rhauch commented 9 years ago

@granjef3, thanks for the review.