Skip to content

Commit

Permalink
fix logic issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Shom770 committed Feb 23, 2024
1 parent f16b2fa commit 99aa302
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ class CharacterizeWristCommand(val wrist: Wrist, val positive: Boolean) : Comman
}

override fun execute() {
if ((Clock.fpgaTime - lastCallTime).inMilliseconds < 100) {
if ((Clock.fpgaTime - lastCallTime).inMilliseconds > 100) {
currentVoltage += if (positive) 0.01.volts else (-0.01).volts
wrist.setWristVoltage(currentVoltage)
lastCallTime = Clock.fpgaTime
}
}

override fun isFinished(): Boolean {
return wrist.inputs.wristVelocity > 0.01.radians.perSecond
return wrist.inputs.wristVelocity > 0.1.radians.perSecond
}

override fun end(interrupted: Boolean) {
Expand Down

0 comments on commit 99aa302

Please sign in to comment.