Commit Graph

10 Commits

Author SHA1 Message Date
Peter Johnson
764ada9b66 [hal] Change usage reporting to string-based (#7763) 2025-02-07 13:37:23 -07:00
sciencewhiz
5c2addda0f [doc] Add missing pneumatics docs (NFC) (#5389)
Add missing HAL docs for PCM and PH
Fix references to PCM
Document different one shot durations for PCM and PH
2023-06-15 08:14:35 -07:00
Ryan Blue
83f1860047 [wpilib] Add/update documentation to PneumaticBase and subclasses (NFC) (#4881)
Co-authored-by: Starlight220 <53231611+Starlight220@users.noreply.github.com>
2023-01-02 10:23:59 -08:00
Jan-Felix Abellera
7c09f44898 [wpilib] Use PSI for compressor config and sensor reading (#3847)
This adds the REV Analog Pressure Sensor PSI to volt (and vice versa) conversion to allow setting the compressor config in PSI and getting the sensor reading in PSI. Also adds input validation for pressure values at the higher level.

Co-authored-by: Tyler Veness <calcmogul@gmail.com>
2021-12-31 21:04:56 -08:00
Thad House
34b2d0dae1 [wpilib, hal] High Level REV PH changes (#3792)
More functionality was implemented at the HAL level, so expose that to the wpilib level.

This also does units changes for all the PH related functionality.
2021-12-19 13:41:35 -08:00
Thad House
b156db400d [hal, wpilib] Incorporate pneumatic control type into wpilibc/j (#3728) 2021-11-23 20:32:02 -08:00
Thad House
60ede67abd [hal, wpilib] Switch PCM to be a single object that is allowed to be duplicated (#3475)
Having PCM as a singleton is a problem, as multiple things need to use it, and that gets really ugly. This changes PCM's to be a reference counted object, that can be passed around and constructed from multiple places.

In Java, this is using a map to hold a data store with a ref count, and allocating new objects any time a duplicate is requested.

In C++, this uses a trick constructor to store a PCM instance in the data store itself. This instance can then be passed to base objects using std::shared_ptr's aliasing constructor, which means constructing a solenoid from a PCM is not allocating after the 1st one.

This did require removing sendable from PCM. A compressor class was added back in to act as sendable for the PCM.

After this change is finished, the only change RobotBuilder and Team Code would require is passing a module type to solenoid constructors.

Co-authored-by: sciencewhiz <sciencewhiz@users.noreply.github.com>
2021-09-16 18:50:27 -07:00
PJ Reiniger
94e0db7963 [wpilibc] Add more unit tests (#3494) 2021-08-05 19:04:51 -07:00
Thad House
c154e5262e [wpilib] Make solenoids exclusive use, PCM act like old sendable compressor (#3464) 2021-07-09 15:11:12 -07:00
Thad House
0e702eb799 [hal] Add a unified PCM object (#3331) 2021-06-05 22:36:39 -07:00