[hal,wpilib] Rename REVPH compressor constants to all caps

This commit is contained in:
Peter Johnson
2026-03-14 12:11:25 -07:00
parent c18f811ea7
commit 68ca74c129
16 changed files with 72 additions and 72 deletions

View File

@@ -9,13 +9,13 @@ import org.wpilib.hardware.hal.REVPHJNI;
/** Compressor config type. */
public enum CompressorConfigType {
/** Disabled. */
Disabled(REVPHJNI.COMPRESSOR_CONFIG_TYPE_DISABLED),
DISABLED(REVPHJNI.COMPRESSOR_CONFIG_TYPE_DISABLED),
/** Digital. */
Digital(REVPHJNI.COMPRESSOR_CONFIG_TYPE_DIGITAL),
DIGITAL(REVPHJNI.COMPRESSOR_CONFIG_TYPE_DIGITAL),
/** Analog. */
Analog(REVPHJNI.COMPRESSOR_CONFIG_TYPE_ANALOG),
ANALOG(REVPHJNI.COMPRESSOR_CONFIG_TYPE_ANALOG),
/** Hybrid. */
Hybrid(REVPHJNI.COMPRESSOR_CONFIG_TYPE_HYBRID);
HYBRID(REVPHJNI.COMPRESSOR_CONFIG_TYPE_HYBRID);
/** CompressorConfigType value. */
public final int value;
@@ -32,10 +32,10 @@ public enum CompressorConfigType {
*/
public static CompressorConfigType fromValue(int value) {
return switch (value) {
case REVPHJNI.COMPRESSOR_CONFIG_TYPE_HYBRID -> Hybrid;
case REVPHJNI.COMPRESSOR_CONFIG_TYPE_ANALOG -> Analog;
case REVPHJNI.COMPRESSOR_CONFIG_TYPE_DIGITAL -> Digital;
default -> Disabled;
case REVPHJNI.COMPRESSOR_CONFIG_TYPE_HYBRID -> HYBRID;
case REVPHJNI.COMPRESSOR_CONFIG_TYPE_ANALOG -> ANALOG;
case REVPHJNI.COMPRESSOR_CONFIG_TYPE_DIGITAL -> DIGITAL;
default -> DISABLED;
};
}

View File

@@ -338,8 +338,8 @@ public class PneumaticsControlModule implements PneumaticsBase {
@Override
public CompressorConfigType getCompressorConfigType() {
return CTREPCMJNI.getClosedLoopControl(m_handle)
? CompressorConfigType.Digital
: CompressorConfigType.Disabled;
? CompressorConfigType.DIGITAL
: CompressorConfigType.DISABLED;
}
/**