Skip to content

Commit 6546515

Browse files
Added small flywheel fix and talonfx reorg. (#112)
Signed-off-by: thenetworkgrinch <thenetworkgrinch@users.noreply.github.com> Co-authored-by: thenetworkgrinch <thenetworkgrinch@users.noreply.github.com>
1 parent e216d45 commit 6546515

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

yams/java/yams/mechanisms/velocity/FlyWheel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public <T> Command run(Supplier<T> velocity)
241241
{
242242
m_config.getCircumference(); // Circumference check
243243
return Commands.startRun(m_smc::startClosedLoopController,
244-
() -> m_config.getAngularVelocity((LinearVelocity) velocity.get()),
244+
() -> m_smc.setVelocity(m_config.getAngularVelocity((LinearVelocity) velocity.get())),
245245
m_subsystem)
246246
.withName(cmdName);
247247
}

yams/java/yams/motorcontrollers/remote/TalonFXWrapper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,8 +1368,8 @@ public void setMechanismUpperLimit(Angle upperLimit)
13681368
m_config.getMechanismLowerLimit().ifPresent(lowerLimit -> {
13691369
m_config.withSoftLimit(lowerLimit, upperLimit);
13701370
});
1371-
m_talonConfig.SoftwareLimitSwitch.withForwardSoftLimitThreshold(upperLimit)
1372-
.withForwardSoftLimitEnable(true);
1371+
m_talonConfig.SoftwareLimitSwitch.withForwardSoftLimitEnable(true)
1372+
.withForwardSoftLimitThreshold(upperLimit);
13731373
forceConfigApply();
13741374
}
13751375

@@ -1379,8 +1379,8 @@ public void setMechanismLowerLimit(Angle lowerLimit)
13791379
m_config.getMechanismUpperLimit().ifPresent(upperLimit -> {
13801380
m_config.withSoftLimit(lowerLimit, upperLimit);
13811381
});
1382-
m_talonConfig.SoftwareLimitSwitch.withReverseSoftLimitThreshold(lowerLimit)
1383-
.withReverseSoftLimitEnable(true);
1382+
m_talonConfig.SoftwareLimitSwitch.withReverseSoftLimitEnable(true)
1383+
.withReverseSoftLimitThreshold(lowerLimit);
13841384
forceConfigApply();
13851385
}
13861386

0 commit comments

Comments
 (0)