From d3e5d593e116d788c8214142495313e50f555b71 Mon Sep 17 00:00:00 2001 From: iris Date: Thu, 20 Jun 2024 03:05:39 -0500 Subject: [PATCH] try to patch violent shaking? --- REVHubInterface/__main__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/REVHubInterface/__main__.py b/REVHubInterface/__main__.py index dc061e8..8a3402e 100644 --- a/REVHubInterface/__main__.py +++ b/REVHubInterface/__main__.py @@ -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 = [ @@ -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