From 95a8d10b6bf5b1a5a4a35fe63786ef1f55e5a5d7 Mon Sep 17 00:00:00 2001 From: iris Date: Thu, 20 Jun 2024 17:44:59 -0500 Subject: [PATCH] breaks motor power, but patches PID and shaking --- REVHubInterface/__main__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/REVHubInterface/__main__.py b/REVHubInterface/__main__.py index 70197f0..eb8324d 100644 --- a/REVHubInterface/__main__.py +++ b/REVHubInterface/__main__.py @@ -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 = [ @@ -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 = [ @@ -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 = [