From 7092ad184f673cba27641fbfe244ff11949837c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hlke?= Date: Thu, 1 Feb 2024 19:56:31 +0000 Subject: [PATCH 1/2] added steps_per_rev calculation when setting or reading msres fixes #49 --- src/TMC_2209/_TMC_2209_comm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/TMC_2209/_TMC_2209_comm.py b/src/TMC_2209/_TMC_2209_comm.py index 5c3b698..555ffe5 100644 --- a/src/TMC_2209/_TMC_2209_comm.py +++ b/src/TMC_2209/_TMC_2209_comm.py @@ -517,6 +517,7 @@ def read_microstepping_resolution(self): msresdezimal = 8 - msresdezimal self._msres = int(math.pow(2, msresdezimal)) + self._steps_per_rev = self._fullsteps_per_rev * self._msres return self._msres @@ -552,6 +553,7 @@ def set_microstepping_resolution(self, msres): self.tmc_uart.write_reg_check(tmc_reg.CHOPCONF, chopconf) self._msres = msres + self._steps_per_rev = self._fullsteps_per_rev * self._msres self.set_mstep_resolution_reg_select(True) From 153b774feb273de992392c726e55ac36d19f79b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6hlke?= Date: Fri, 9 Feb 2024 22:16:58 +0000 Subject: [PATCH 2/2] changed version to 0.4.3 --- CHANGELOG.md | 4 ++++ setup.cfg | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c02ae3f..f533226 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## version 0.4.3 + +- small bugfix + ## version 0.4.2 - added support for Nvidia Jetson diff --git a/setup.cfg b/setup.cfg index df657a3..ed0e87f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = TMC_2209_Raspberry_Pi -version = 0.4.2 +version = 0.4.3 author = Christian Köhlke author_email = christian@koehlke.de description = this is a Python libary to drive a stepper motor with a Trinamic TMC2209 stepper driver and a Raspberry Pi