Skip to content

Commit

Permalink
breaks motor power, but patches PID and shaking
Browse files Browse the repository at this point in the history
  • Loading branch information
Iris-TheRainbow committed Jun 20, 2024
1 parent 3547512 commit 95a8d10
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions REVHubInterface/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,7 @@ def send_all_KA(self):
def speedMotorSlider(self, speed, moduleNumber, motorNumber, *args):
self.Motor_packs[moduleNumber * 4 + motorNumber].Java_entry.delete(0, END)
self.Motor_packs[moduleNumber * 4 + motorNumber].Java_entry.insert(0, '%.2f' % (float(speed) / 32000))
self.REVModules[moduleNumber].motors[motorNumber].disablePIDs()
self.REVModules[moduleNumber].motors[motorNumber].setPower(float(speed))
self.REVModules[moduleNumber].motors[motorNumber].enable()
self.repetitiveFunctions = [
Expand All @@ -702,6 +703,7 @@ def speedMotorEntry(self, motorNumber, moduleNumber, *args):
self.Motor_packs[moduleNumber * 4 + motorNumber].Speed_slider.set(speed)
self.Motor_packs[moduleNumber * 4 + motorNumber].Java_entry.delete(0, END)
self.Motor_packs[moduleNumber * 4 + motorNumber].Java_entry.insert(0, '%.2f' % float(speed / 32000))
self.REVModules[moduleNumber].motors[motorNumber].disablePIDs()
self.REVModules[moduleNumber].motors[motorNumber].setPower(float(speed))
self.REVModules[moduleNumber].motors[motorNumber].enable()
self.repetitiveFunctions = [
Expand All @@ -718,6 +720,7 @@ def javaMotorEntry(self, motorNumber, moduleNumber, *args):

self.Motor_packs[moduleNumber * 4 + motorNumber].Speed_slider.set(speed * 32000)
self.REVModules[moduleNumber].motors[motorNumber].setMode(0, 1)
self.REVModules[moduleNumber].motors[motorNumber].disablePIDs()
self.REVModules[moduleNumber].motors[motorNumber].setPower(float(speed * 32000))
self.REVModules[moduleNumber].motors[motorNumber].enable()
self.repetitiveFunctions = [
Expand Down

0 comments on commit 95a8d10

Please sign in to comment.