Skip to content

Commit abf7a7c

Browse files
committed
Merge branch 'main' into auton
2 parents 18cdcba + 74134e7 commit abf7a7c

File tree

8 files changed

+86
-114
lines changed

8 files changed

+86
-114
lines changed
Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
11
package frc.robot.subsystems.algae;
22

3-
import edu.wpi.first.units.measure.AngularVelocity;
4-
5-
public class AlgaeSubsystem {
6-
7-
public void setSpeed(AngularVelocity speed) {}
8-
;
9-
10-
public AngularVelocity getSpeed() {
11-
return null;
12-
}
13-
;
14-
15-
public boolean atSpeed() {
16-
return true;
17-
}
18-
;
19-
}
3+
public class AlgaeSubsystem {}
Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,3 @@
11
package frc.robot.subsystems.algae;
22

3-
import com.ctre.phoenix6.StatusSignal;
4-
import com.ctre.phoenix6.configs.TalonFXConfigurator;
5-
import com.ctre.phoenix6.controls.MotionMagicDutyCycle;
6-
import com.ctre.phoenix6.hardware.TalonFX;
7-
import com.ctre.phoenix6.signals.ReverseLimitValue;
8-
import edu.wpi.first.units.measure.AngularVelocity;
9-
import frc.robot.constants.AlgaeConstants;
10-
import org.slf4j.Logger;
11-
import org.slf4j.LoggerFactory;
12-
// import org.strykeforce.IOInputsAutoLogged;
13-
import org.strykeforce.telemetry.TelemetryService;
14-
15-
public class algaeIOFX implements algaeIO {
16-
private Logger logger;
17-
private final TalonFX talonFX;
18-
private IOInputs inputs;
19-
20-
// FX Access objects
21-
TalonFXConfigurator configurator;
22-
private MotionMagicDutyCycle positionRequest =
23-
new MotionMagicDutyCycle(0).withEnableFOC(false).withFeedForward(0).withSlot(0);
24-
StatusSignal<AngularVelocity> currVelocity;
25-
StatusSignal<ReverseLimitValue> reverseLimitSwitch;
26-
27-
public algaeIOFX() {
28-
// final IOInputsAutoLogged inputs = new IOInputsAutoLogged();
29-
logger = LoggerFactory.getLogger(this.getClass());
30-
talonFX = new TalonFX(AlgaeConstants.kFxId);
31-
reverseLimitSwitch = talonFX.getReverseLimit();
32-
currVelocity = talonFX.getVelocity();
33-
reverseLimitSwitch = talonFX.getReverseLimit();
34-
}
35-
36-
public void updateInputs(IOInputs inputs) {
37-
inputs.velocity = currVelocity.refresh().getValue();
38-
}
39-
40-
public void setPosition(double position) {
41-
// Set the Talon FX to position control mode and set the target position
42-
talonFX.setPosition(position);
43-
}
44-
45-
public void zero() {}
46-
47-
public void registerWith(TelemetryService telemetryService) {}
48-
}
3+
public class algaeIOFX {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package frc.robot.subsystems.elevator;
22

3-
public class ElevatorIO {}
3+
public interface ElevatorIO {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package frc.robot.subsystems.elevator;
22

3-
public class ElevatorIOFX {}
3+
public class ElevatorIOFX implements ElevatorIO {}

src/main/java/frc/robot/subsystems/example/ExampleIOFX.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package frc.robot.subsystems.example;
22

3+
import com.ctre.phoenix6.BaseStatusSignal;
34
import com.ctre.phoenix6.StatusSignal;
45
import com.ctre.phoenix6.configs.TalonFXConfiguration;
56
import com.ctre.phoenix6.configs.TalonFXConfigurator;
@@ -63,8 +64,9 @@ public void setPosition(Angle position) {
6364

6465
@Override
6566
public void updateInputs(ExampleIOInputs inputs) {
66-
inputs.velocity = currVelocity.refresh().getValue();
67-
inputs.position = currPosition.refresh().getValue().minus(relSetpointOffset);
67+
BaseStatusSignal.refreshAll(currVelocity, currPosition);
68+
inputs.velocity = currVelocity.getValue();
69+
inputs.position = currPosition.getValue().minus(relSetpointOffset);
6870
}
6971

7072
@Override

src/main/java/frc/robot/subsystems/example/ExampleSubsystem.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public boolean isFinished() {
5858
public void periodic() {
5959
// Read Inputs
6060
io.updateInputs(inputs);
61+
Logger.processInputs(getName(), inputs);
6162

6263
// State Machine
6364
switch (curState) {

vendordeps/Phoenix5-replay-5.35.0.json renamed to vendordeps/Phoenix5-replay-5.35.1.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"fileName": "Phoenix5-replay-5.35.0.json",
2+
"fileName": "Phoenix5-replay-5.35.1.json",
33
"name": "CTRE-Phoenix (v5)",
4-
"version": "5.35.0",
4+
"version": "5.35.1",
55
"frcYear": "2025",
66
"uuid": "fbc886a4-2cec-40c0-9835-71086a8cc3df",
77
"mavenUrls": [
@@ -32,19 +32,19 @@
3232
{
3333
"groupId": "com.ctre.phoenix",
3434
"artifactId": "api-java",
35-
"version": "5.35.0"
35+
"version": "5.35.1"
3636
},
3737
{
3838
"groupId": "com.ctre.phoenix",
3939
"artifactId": "wpiapi-java",
40-
"version": "5.35.0"
40+
"version": "5.35.1"
4141
}
4242
],
4343
"jniDependencies": [
4444
{
4545
"groupId": "com.ctre.phoenix",
4646
"artifactId": "cci",
47-
"version": "5.35.0",
47+
"version": "5.35.1",
4848
"isJar": false,
4949
"skipInvalidPlatforms": true,
5050
"validPlatforms": [
@@ -55,7 +55,7 @@
5555
{
5656
"groupId": "com.ctre.phoenix.replay",
5757
"artifactId": "cci-replay",
58-
"version": "5.35.0",
58+
"version": "5.35.1",
5959
"isJar": false,
6060
"skipInvalidPlatforms": true,
6161
"validPlatforms": [
@@ -69,7 +69,7 @@
6969
{
7070
"groupId": "com.ctre.phoenix.sim",
7171
"artifactId": "cci-sim",
72-
"version": "5.35.0",
72+
"version": "5.35.1",
7373
"isJar": false,
7474
"skipInvalidPlatforms": true,
7575
"validPlatforms": [
@@ -85,7 +85,7 @@
8585
{
8686
"groupId": "com.ctre.phoenix",
8787
"artifactId": "wpiapi-cpp",
88-
"version": "5.35.0",
88+
"version": "5.35.1",
8989
"libName": "CTRE_Phoenix_WPI",
9090
"headerClassifier": "headers",
9191
"sharedLibrary": true,
@@ -98,7 +98,7 @@
9898
{
9999
"groupId": "com.ctre.phoenix",
100100
"artifactId": "api-cpp",
101-
"version": "5.35.0",
101+
"version": "5.35.1",
102102
"libName": "CTRE_Phoenix",
103103
"headerClassifier": "headers",
104104
"sharedLibrary": true,
@@ -111,7 +111,7 @@
111111
{
112112
"groupId": "com.ctre.phoenix",
113113
"artifactId": "cci",
114-
"version": "5.35.0",
114+
"version": "5.35.1",
115115
"libName": "CTRE_PhoenixCCI",
116116
"headerClassifier": "headers",
117117
"sharedLibrary": true,
@@ -124,7 +124,7 @@
124124
{
125125
"groupId": "com.ctre.phoenix.replay",
126126
"artifactId": "wpiapi-cpp-replay",
127-
"version": "5.35.0",
127+
"version": "5.35.1",
128128
"libName": "CTRE_Phoenix_WPIReplay",
129129
"headerClassifier": "headers",
130130
"sharedLibrary": true,
@@ -140,7 +140,7 @@
140140
{
141141
"groupId": "com.ctre.phoenix.replay",
142142
"artifactId": "api-cpp-replay",
143-
"version": "5.35.0",
143+
"version": "5.35.1",
144144
"libName": "CTRE_PhoenixReplay",
145145
"headerClassifier": "headers",
146146
"sharedLibrary": true,
@@ -156,7 +156,7 @@
156156
{
157157
"groupId": "com.ctre.phoenix.replay",
158158
"artifactId": "cci-replay",
159-
"version": "5.35.0",
159+
"version": "5.35.1",
160160
"libName": "CTRE_PhoenixCCIReplay",
161161
"headerClassifier": "headers",
162162
"sharedLibrary": true,
@@ -172,7 +172,7 @@
172172
{
173173
"groupId": "com.ctre.phoenix.sim",
174174
"artifactId": "wpiapi-cpp-sim",
175-
"version": "5.35.0",
175+
"version": "5.35.1",
176176
"libName": "CTRE_Phoenix_WPISim",
177177
"headerClassifier": "headers",
178178
"sharedLibrary": true,
@@ -188,7 +188,7 @@
188188
{
189189
"groupId": "com.ctre.phoenix.sim",
190190
"artifactId": "api-cpp-sim",
191-
"version": "5.35.0",
191+
"version": "5.35.1",
192192
"libName": "CTRE_PhoenixSim",
193193
"headerClassifier": "headers",
194194
"sharedLibrary": true,
@@ -204,7 +204,7 @@
204204
{
205205
"groupId": "com.ctre.phoenix.sim",
206206
"artifactId": "cci-sim",
207-
"version": "5.35.0",
207+
"version": "5.35.1",
208208
"libName": "CTRE_PhoenixCCISim",
209209
"headerClassifier": "headers",
210210
"sharedLibrary": true,

0 commit comments

Comments
 (0)