Skip to content

Commit

Permalink
try to patch violent shaking?
Browse files Browse the repository at this point in the history
  • Loading branch information
Iris-TheRainbow committed Jun 20, 2024
1 parent 8a8761b commit d3e5d59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion REVHubInterface/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ def javaMotorEntry(self, motorNumber, moduleNumber, *args):
return False

self.Motor_packs[moduleNumber * 4 + motorNumber].Speed_slider.set(speed * 32000)
self.REVModules[moduleNumber].motors[motorNumber].setMode(0, 1)
self.REVModules[moduleNumber].motors[motorNumber].setPower(float(speed * 32000))
self.REVModules[moduleNumber].motors[motorNumber].enable()
self.repetitiveFunctions = [
Expand All @@ -726,8 +727,9 @@ def javaMotorEntry(self, motorNumber, moduleNumber, *args):

def javaTargetEntry(self, motorNumber, moduleNumber, *args):
target = int(self.pid_packs[moduleNumber * 4 + motorNumber].Java_entry.get())
self.REVModules[moduleNumber].motors[motorNumber].setTargetPosition(target)
self.REVModules[moduleNumber].motors[motorNumber].setTargetPosition(target, 1)
self.REVModules[moduleNumber].motors[motorNumber].setMode(1, 1)
self.REVModules[moduleNumber].motors[motorNumber].setPower(float(1 * 32000))
self.repetitiveFunctions = [(lambda: self.send_all_KA())]
self.repetitiveFunctions.append((lambda: self.updateMotorLabels(motorNumber, moduleNumber)))
return True
Expand Down

0 comments on commit d3e5d59

Please sign in to comment.