[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
This commit is contained in:
sciencewhiz
2023-06-15 08:14:35 -07:00
committed by GitHub
parent c3e04a6ea2
commit 5c2addda0f
9 changed files with 497 additions and 18 deletions

View File

@@ -211,16 +211,40 @@ public interface PneumaticsBase extends AutoCloseable {
*/
void unreserveSolenoids(int mask);
/**
* Reserve the compressor.
*
* @return true if successful; false if compressor already reserved
*/
boolean reserveCompressor();
/** Unreserve the compressor. */
void unreserveCompressor();
@Override
void close();
/**
* Create a solenoid object for the specified channel.
*
* @param channel solenoid channel
* @return Solenoid object
*/
Solenoid makeSolenoid(int channel);
/**
* Create a double solenoid object for the specified channels.
*
* @param forwardChannel solenoid channel for forward
* @param reverseChannel solenoid channel for reverse
* @return DoubleSolenoid object
*/
DoubleSolenoid makeDoubleSolenoid(int forwardChannel, int reverseChannel);
/**
* Create a compressor object.
*
* @return Compressor object
*/
Compressor makeCompressor();
}

View File

@@ -117,11 +117,16 @@ public class Solenoid implements Sendable, AutoCloseable {
}
/**
* Set the pulse duration in the PCM. This is used in conjunction with the startPulse method to
* allow the PCM to control the timing of a pulse. The timing can be controlled in 0.01 second
* increments.
* Set the pulse duration in the pneumatics module. This is used in conjunction with the
* startPulse method to allow the pneumatics module to control the timing of a pulse.
*
* @param durationSeconds The duration of the pulse, from 0.01 to 2.55 seconds.
* <p>On the PCM, the timing can be controlled in 0.01 second increments, with a maximum of 2.55
* seconds.
*
* <p>On the PH, the timing can be controlled in 0.001 second increments, with a maximum of 65.534
* seconds.
*
* @param durationSeconds The duration of the pulse in seconds.
* @see #startPulse()
*/
public void setPulseDuration(double durationSeconds) {
@@ -130,7 +135,7 @@ public class Solenoid implements Sendable, AutoCloseable {
}
/**
* Trigger the PCM to generate a pulse of the duration set in setPulseDuration.
* Trigger the pneumatics module to generate a pulse of the duration set in setPulseDuration.
*
* @see #setPulseDuration(double)
*/