Skip to content

Commit 31ef922

Browse files
committed
Changed to fxs
1 parent 6d64cb5 commit 31ef922

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

src/main/java/frc/robot/constants/FunnelConstants.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import com.ctre.phoenix6.configs.HardwareLimitSwitchConfigs;
55
import com.ctre.phoenix6.configs.MotorOutputConfigs;
66
import com.ctre.phoenix6.configs.SoftwareLimitSwitchConfigs;
7-
import com.ctre.phoenix6.configs.TalonFXConfiguration;
7+
import com.ctre.phoenix6.configs.TalonFXSConfiguration;
88
import com.ctre.phoenix6.signals.ForwardLimitSourceValue;
99
import com.ctre.phoenix6.signals.ForwardLimitTypeValue;
1010
import com.ctre.phoenix6.signals.NeutralModeValue;
@@ -14,10 +14,10 @@
1414
public class FunnelConstants {
1515
public static final double kFunnelPercentOutput = 0;
1616

17-
public static int FunnelFxId = 0;
17+
public static int FunnelFxsId = 0;
1818

19-
public static TalonFXConfiguration getFXConfig() {
20-
TalonFXConfiguration fxConfig = new TalonFXConfiguration();
19+
public static TalonFXSConfiguration getFXSConfig() {
20+
TalonFXSConfiguration fxsConfig = new TalonFXSConfiguration();
2121

2222
CurrentLimitsConfigs current =
2323
new CurrentLimitsConfigs()
@@ -28,7 +28,7 @@ public static TalonFXConfiguration getFXConfig() {
2828
.withSupplyCurrentLowerLimit(8)
2929
.withSupplyCurrentLowerTime(0.02)
3030
.withSupplyCurrentLimitEnable(true);
31-
fxConfig.CurrentLimits = current;
31+
fxsConfig.CurrentLimits = current;
3232

3333
HardwareLimitSwitchConfigs hwLimit =
3434
new HardwareLimitSwitchConfigs()
@@ -40,20 +40,20 @@ public static TalonFXConfiguration getFXConfig() {
4040
.withReverseLimitEnable(false)
4141
.withReverseLimitType(ReverseLimitTypeValue.NormallyOpen)
4242
.withReverseLimitSource(ReverseLimitSourceValue.LimitSwitchPin);
43-
fxConfig.HardwareLimitSwitch = hwLimit;
43+
fxsConfig.HardwareLimitSwitch = hwLimit;
4444

4545
SoftwareLimitSwitchConfigs swLimit =
4646
new SoftwareLimitSwitchConfigs()
4747
.withForwardSoftLimitEnable(false)
4848
.withReverseSoftLimitEnable(false);
49-
fxConfig.SoftwareLimitSwitch = swLimit;
49+
fxsConfig.SoftwareLimitSwitch = swLimit;
5050

5151
MotorOutputConfigs motorOut =
5252
new MotorOutputConfigs()
5353
.withDutyCycleNeutralDeadband(0.01)
5454
.withNeutralMode(NeutralModeValue.Coast);
55-
fxConfig.MotorOutput = motorOut;
55+
fxsConfig.MotorOutput = motorOut;
5656

57-
return fxConfig;
57+
return fxsConfig;
5858
}
5959
}

src/main/java/frc/robot/subsystems/funnel/FunnelIOFX.java renamed to src/main/java/frc/robot/subsystems/funnel/FunnelIOFXS.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,44 @@
55
import org.strykeforce.telemetry.TelemetryService;
66

77
import com.ctre.phoenix6.StatusSignal;
8-
import com.ctre.phoenix6.configs.TalonFXConfiguration;
9-
import com.ctre.phoenix6.configs.TalonFXConfigurator;
8+
import com.ctre.phoenix6.configs.TalonFXSConfiguration;
9+
import com.ctre.phoenix6.configs.TalonFXSConfigurator;
1010
import com.ctre.phoenix6.controls.DutyCycleOut;
11-
import com.ctre.phoenix6.hardware.TalonFX;
11+
import com.ctre.phoenix6.hardware.TalonFXS;
1212
import com.ctre.phoenix6.signals.ReverseLimitValue;
1313

1414
import edu.wpi.first.units.measure.AngularVelocity;
1515
import frc.robot.constants.FunnelConstants;
1616

17-
public class FunnelIOFX implements FunnelIo{
17+
public class FunnelIOFXS implements FunnelIo{
1818
// Private Objects
1919
private Logger logger;
20-
private TalonFX talonfx;
20+
private TalonFXS talonfxs;
2121

2222
// FX Acces Objects
23-
TalonFXConfigurator configurator;
23+
TalonFXSConfigurator configurator;
2424
StatusSignal<AngularVelocity> curVelocity;
2525
StatusSignal<ReverseLimitValue> curRevLimit;
2626

2727
private DutyCycleOut dutyCycleRequest = new DutyCycleOut(0.0).withEnableFOC(false);
2828

29-
public FunnelIOFX() {
29+
public FunnelIOFXS() {
3030
logger = LoggerFactory.getLogger(this.getClass());
31-
talonfx = new TalonFX(FunnelConstants.FunnelFxId);
31+
talonfxs = new TalonFXS(FunnelConstants.FunnelFxsId);
3232

3333
// Config controller
34-
configurator = talonfx.getConfigurator();
35-
configurator.apply(new TalonFXConfiguration());
36-
configurator.apply(FunnelConstants.getFXConfig());
34+
configurator = talonfxs.getConfigurator();
35+
configurator.apply(new TalonFXSConfiguration());
36+
configurator.apply(FunnelConstants.getFXSConfig());
3737

3838
// Attach status signals
39-
curVelocity = talonfx.getVelocity();
40-
curRevLimit = talonfx.getReverseLimit();
39+
curVelocity = talonfxs.getVelocity();
40+
curRevLimit = talonfxs.getReverseLimit();
4141
}
4242

4343
@Override
4444
public void setPct(double percentOutput){
45-
talonfx.setControl(dutyCycleRequest.withOutput(percentOutput));
45+
talonfxs.setControl(dutyCycleRequest.withOutput(percentOutput));
4646
}
4747

4848
@Override
@@ -53,6 +53,6 @@ public void updateInputs(FunnelIoInputs inputs) {
5353

5454
@Override
5555
public void registerWith(TelemetryService telemetryService) {
56-
telemetryService.register(talonfx, true);
56+
telemetryService.register(talonfxs, true);
5757
}
5858
}

src/main/java/frc/robot/subsystems/funnel/FunnelSubsystem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import frc.robot.constants.FunnelConstants;
1111
import frc.robot.standards.OpenLoopSubsystem;
12-
import frc.robot.subsystems.example.ExampleIOInputsAutoLogged;
12+
import frc.robot.subsystems.funnel.FunnelIOInputsAutoLogged;
1313

1414
public class FunnelSubsystem extends MeasurableSubsystem implements OpenLoopSubsystem{
1515

@@ -47,7 +47,7 @@ public void periodic() {
4747
}
4848

4949
if(totalBreaks >= 3){
50-
curState = FunnelState.HasNotSeenCoral;
50+
curState = FunnelState.HasSeenCoral;
5151
}
5252
break;
5353
}

vendordeps/thirdcoast.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"fileName": "thirdcoast.json",
33
"name": "StrykeForce-ThirdCoast",
4-
"version": "25.0.0",
4+
"version": "25.0.1",
55
"uuid": "13c4f4b5-a1c0-4670-8f8d-b7b03628c0d3",
66
"frcYear": "2025",
77
"mavenUrls": [
@@ -12,7 +12,7 @@
1212
{
1313
"groupId": "org.strykeforce",
1414
"artifactId": "thirdcoast",
15-
"version": "25.0.0"
15+
"version": "25.0.1"
1616
}
1717
],
1818
"jniDependencies": [],

0 commit comments

Comments
 (0)