Skip to content

Commit dfecb69

Browse files
committed
Fixed speed control history reset issues, updated filepaths in package.json
1 parent f9a1017 commit dfecb69

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

XRPLib/encoded_motor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def __init__(self, motor, encoder: Encoder):
7474
kp=0.035,
7575
ki=0.03,
7676
kd=0,
77+
max_integral=50
7778
)
7879
self.speedController = self.DEFAULT_SPEED_CONTROLLER
7980
self.prev_position = 0
@@ -166,8 +167,6 @@ def set_speed(self, speed_rpm: float = None):
166167
return
167168
# Convert from rev per min to counts per 20ms (60 sec/min, 50 Hz)
168169
self.target_speed = speed_rpm*self._encoder.resolution/(60*50)
169-
self.speedController.clear_history()
170-
self.prev_position = self.get_position_counts()
171170

172171
def set_speed_controller(self, new_controller: Controller):
173172
"""

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
["XRPLib/servo.py", "github:Open-STEM/XRP_Micropython/XRPLib/servo.py"],
1919
["XRPLib/timeout.py", "github:Open-STEM/XRP_Micropython/XRPLib/timeout.py"],
2020
["XRPLib/webserver.py", "github:Open-STEM/XRP_Micropython/XRPLib/webserver.py"],
21-
["XRPExamples/__init__.py", "github:Open-STEM/XRP_Micropython/Examples/__init__.py"],
22-
["XRPExamples/drive_examples.py", "github:Open-STEM/XRP_Micropython/Examples/drive_examples.py"],
23-
["XRPExamples/installation_verification.py", "github:Open-STEM/XRP_Micropython/Examples/installation_verification.py"],
24-
["XRPExamples/misc_examples.py", "github:Open-STEM/XRP_Micropython/Examples/misc_examples.py"],
25-
["XRPExamples/sensor_examples.py", "github:Open-STEM/XRP_Micropython/Examples/sensor_examples.py"],
26-
["XRPExamples/webserver_example.py", "github:Open-STEM/XRP_Micropython/Examples/webserver_example.py"]
21+
["XRPExamples/__init__.py", "github:Open-STEM/XRP_Micropython/XRPExamples/__init__.py"],
22+
["XRPExamples/drive_examples.py", "github:Open-STEM/XRP_Micropython/XRPExamples/drive_examples.py"],
23+
["XRPExamples/installation_verification.py", "github:Open-STEM/XRP_Micropython/XRPExamples/installation_verification.py"],
24+
["XRPExamples/led_example.py", "github:Open-STEM/XRP_Micropython/XRPExamples/misc_examples.py"],
25+
["XRPExamples/sensor_examples.py", "github:Open-STEM/XRP_Micropython/XRPExamples/sensor_examples.py"],
26+
["XRPExamples/webserver_example.py", "github:Open-STEM/XRP_Micropython/XRPExamples/webserver_example.py"]
2727
],
2828
"deps": [
2929
["github:pimoroni/phew", "latest"]
3030
],
31-
"version": "2.0.0"
31+
"version": "2.0.1"
3232
}

0 commit comments

Comments
 (0)