PyTmcStepper 0.18.4__tar.gz → 0.19.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/PKG-INFO +1 -1
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/pyproject.toml +1 -1
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/PyTmcStepper.egg-info/PKG-INFO +1 -1
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/_tmc_validation.py +4 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/_tmc_xxxx.py +15 -13
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/motion_control/_tmc_mc.py +20 -2
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/motion_control/_tmc_mc_step_dir.py +0 -28
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_220x.py +18 -14
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_2240.py +18 -14
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_5160.py +22 -16
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/LICENSE +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/README.md +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/setup.cfg +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/PyTmcStepper.egg-info/SOURCES.txt +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/PyTmcStepper.egg-info/dependency_links.txt +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/PyTmcStepper.egg-info/requires.txt +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/PyTmcStepper.egg-info/top_level.txt +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/__init__.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/_tmc_exceptions.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/_tmc_math.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/_tmc_stallguard.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/_tmc_stepperdriver.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/com/__init__.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/com/_tmc_com.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/com/_tmc_com_spi.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/com/_tmc_com_spi_base.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/com/_tmc_com_spi_circuitpython.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/com/_tmc_com_spi_ftdi.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/com/_tmc_com_spi_micropython.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/com/_tmc_com_uart.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/com/_tmc_com_uart_base.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/com/_tmc_com_uart_circuitpython.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/com/_tmc_com_uart_micropython.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/enable_control/__init__.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/enable_control/_tmc_ec.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/enable_control/_tmc_ec_pin.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/enable_control/_tmc_ec_toff.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/motion_control/__init__.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/motion_control/_tmc_mc_int_ramp_generator.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/motion_control/_tmc_mc_step_pwm_dir.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/motion_control/_tmc_mc_step_reg.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/motion_control/_tmc_mc_vactual.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/platform_utils.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/reg/__init__.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/reg/_tmc2209_reg.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/reg/_tmc220x_reg.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/reg/_tmc224x_reg.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/reg/_tmc5160_reg.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/reg/_tmc_reg.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/reg/_tmc_shared_regs.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_2208.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_2209.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_gpio/__init__.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_gpio/_tmc_gpio_board_base.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_gpio/_tmc_gpio_board_circuitpython.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_gpio/_tmc_gpio_board_ftdi.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_gpio/_tmc_gpio_board_gpiozero.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_gpio/_tmc_gpio_board_micropython.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_gpio/_tmc_gpio_board_periphery.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_gpio/_tmc_gpio_board_rpi_gpio.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_logger/__init__.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_logger/_tmc_logger_base.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_logger/_tmc_logger_cpython.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_logger/_tmc_logger_micropython.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/tests/test_gpiozero.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/tests/test_tmc2209.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/tests/test_tmc2240.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/tests/test_tmc_com_spi.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/tests/test_tmc_com_uart.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/tests/test_tmc_ec_pin.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/tests/test_tmc_imports.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/tests/test_tmc_math.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/tests/test_tmc_modules.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/tests/test_tmc_move_intramp.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/tests/test_tmc_move_stepdir.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/tests/test_tmc_move_steppwmdir.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/tests/test_tmc_move_stepreg.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/tests/test_tmc_move_vactual.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/tests/test_tmc_set_current.py +0 -0
- {pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/tests/test_tmc_stallguard.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyTmcStepper
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.19.0
|
|
4
4
|
Summary: This is a Python libary to drive a stepper motor with a Trinamic stepper driver and a single board computer like a Raspberry Pi
|
|
5
5
|
Author-email: Christian Köhlke <christian@koehlke.de>
|
|
6
6
|
License-Expression: GPL-3.0
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "PyTmcStepper"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.19.0"
|
|
8
8
|
authors = [{ name = "Christian Köhlke", email = "christian@koehlke.de" }]
|
|
9
9
|
description = "This is a Python libary to drive a stepper motor with a Trinamic stepper driver and a single board computer like a Raspberry Pi"
|
|
10
10
|
readme = "README.md"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyTmcStepper
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.19.0
|
|
4
4
|
Summary: This is a Python libary to drive a stepper motor with a Trinamic stepper driver and a single board computer like a Raspberry Pi
|
|
5
5
|
Author-email: Christian Köhlke <christian@koehlke.de>
|
|
6
6
|
License-Expression: GPL-3.0
|
|
@@ -4,9 +4,13 @@ TMC validation module
|
|
|
4
4
|
This module provides validation functions for TMC driver components.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
+
import sys
|
|
7
8
|
from ._tmc_exceptions import TmcDriverException
|
|
8
9
|
|
|
9
10
|
|
|
11
|
+
SUBMODULE_VALIDATION = sys.implementation.name not in ("micropython", "circuitpython")
|
|
12
|
+
|
|
13
|
+
|
|
10
14
|
def validate_submodule(
|
|
11
15
|
module, supported_types: tuple, driver_name: str, module_name: str = "module"
|
|
12
16
|
):
|
|
@@ -22,7 +22,7 @@ from .motion_control._tmc_mc import TmcMotionControl
|
|
|
22
22
|
from .com._tmc_com import TmcCom
|
|
23
23
|
from .reg._tmc_reg import TmcReg
|
|
24
24
|
from .reg import _tmc_shared_regs as tmc_shared_regs
|
|
25
|
-
from ._tmc_validation import validate_submodule
|
|
25
|
+
from ._tmc_validation import validate_submodule, SUBMODULE_VALIDATION
|
|
26
26
|
from ._tmc_exceptions import (
|
|
27
27
|
TmcException,
|
|
28
28
|
TmcComException,
|
|
@@ -35,9 +35,10 @@ from ._tmc_exceptions import (
|
|
|
35
35
|
class TmcXXXX(TmcStepperDriver):
|
|
36
36
|
"""TmcXXXX"""
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
if SUBMODULE_VALIDATION:
|
|
39
|
+
SUPPORTED_COM_TYPES = ()
|
|
40
|
+
SUPPORTED_EC_TYPES = ()
|
|
41
|
+
SUPPORTED_MC_TYPES = ()
|
|
41
42
|
DRIVER_FAMILY = "TMCXXXX"
|
|
42
43
|
|
|
43
44
|
gstat: tmc_shared_regs.GStat
|
|
@@ -87,15 +88,16 @@ class TmcXXXX(TmcStepperDriver):
|
|
|
87
88
|
tmc_ec, tmc_mc, gpio_mode, loglevel, logprefix, log_handlers, log_formatter
|
|
88
89
|
)
|
|
89
90
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
91
|
+
if SUBMODULE_VALIDATION:
|
|
92
|
+
validate_submodule(
|
|
93
|
+
tmc_com, self.SUPPORTED_COM_TYPES, self.__class__.__name__, "tmc_com"
|
|
94
|
+
)
|
|
95
|
+
validate_submodule(
|
|
96
|
+
tmc_ec, self.SUPPORTED_EC_TYPES, self.__class__.__name__, "tmc_ec"
|
|
97
|
+
)
|
|
98
|
+
validate_submodule(
|
|
99
|
+
tmc_mc, self.SUPPORTED_MC_TYPES, self.__class__.__name__, "tmc_mc"
|
|
100
|
+
)
|
|
99
101
|
|
|
100
102
|
if self.tmc_com is not None:
|
|
101
103
|
self.tmc_com.tmc_logger = self.tmc_logger
|
|
@@ -120,12 +120,12 @@ class TmcMotionControl:
|
|
|
120
120
|
@property
|
|
121
121
|
def speed_fullstep(self):
|
|
122
122
|
"""_speed property"""
|
|
123
|
-
return self._speed
|
|
123
|
+
return int(self._speed // self.mres)
|
|
124
124
|
|
|
125
125
|
@speed_fullstep.setter
|
|
126
126
|
def speed_fullstep(self, speed_fullstep: int):
|
|
127
127
|
"""_speed_fullstep setter"""
|
|
128
|
-
self._speed = speed_fullstep
|
|
128
|
+
self._speed = speed_fullstep * self.mres
|
|
129
129
|
|
|
130
130
|
@property
|
|
131
131
|
def max_speed(self):
|
|
@@ -278,3 +278,21 @@ class TmcMotionControl:
|
|
|
278
278
|
Returns:
|
|
279
279
|
stop (enum): how the movement was finished
|
|
280
280
|
"""
|
|
281
|
+
|
|
282
|
+
def run_to_position_revolutions(
|
|
283
|
+
self, revolutions, movement_abs_rel: MovementAbsRel | None = None
|
|
284
|
+
) -> StopMode:
|
|
285
|
+
"""runs the motor to the given position.
|
|
286
|
+
with acceleration and deceleration
|
|
287
|
+
blocks the code until finished!
|
|
288
|
+
|
|
289
|
+
Args:
|
|
290
|
+
revolutions (int): amount of revs; can be negative
|
|
291
|
+
movement_abs_rel (enum): whether the movement should be absolute or relative
|
|
292
|
+
|
|
293
|
+
Returns:
|
|
294
|
+
stop (enum): how the movement was finished
|
|
295
|
+
"""
|
|
296
|
+
return self.run_to_position_steps(
|
|
297
|
+
round(revolutions * self._steps_per_rev), movement_abs_rel
|
|
298
|
+
)
|
{pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/motion_control/_tmc_mc_step_dir.py
RENAMED
|
@@ -89,16 +89,6 @@ class TmcMotionControlStepDir(TmcMotionControl):
|
|
|
89
89
|
|
|
90
90
|
self._speed = speed
|
|
91
91
|
|
|
92
|
-
@property
|
|
93
|
-
def speed_fullstep(self):
|
|
94
|
-
"""_speed property"""
|
|
95
|
-
return self._speed * self.mres
|
|
96
|
-
|
|
97
|
-
@speed_fullstep.setter
|
|
98
|
-
def speed_fullstep(self, speed: int):
|
|
99
|
-
"""_speed setter"""
|
|
100
|
-
self.speed = speed * self.mres
|
|
101
|
-
|
|
102
92
|
@property
|
|
103
93
|
def pin_step(self):
|
|
104
94
|
"""_pin_step property"""
|
|
@@ -216,24 +206,6 @@ class TmcMotionControlStepDir(TmcMotionControl):
|
|
|
216
206
|
self._movement_phase = MovementPhase.STANDSTILL
|
|
217
207
|
return self._stop
|
|
218
208
|
|
|
219
|
-
def run_to_position_revolutions(
|
|
220
|
-
self, revolutions, movement_abs_rel: MovementAbsRel | None = None
|
|
221
|
-
) -> StopMode:
|
|
222
|
-
"""runs the motor to the given position.
|
|
223
|
-
with acceleration and deceleration
|
|
224
|
-
blocks the code until finished!
|
|
225
|
-
|
|
226
|
-
Args:
|
|
227
|
-
revolutions (int): amount of revs; can be negative
|
|
228
|
-
movement_abs_rel (enum): whether the movement should be absolut or relative
|
|
229
|
-
|
|
230
|
-
Returns:
|
|
231
|
-
stop (enum): how the movement was finished
|
|
232
|
-
"""
|
|
233
|
-
return self.run_to_position_steps(
|
|
234
|
-
round(revolutions * self._steps_per_rev), movement_abs_rel
|
|
235
|
-
)
|
|
236
|
-
|
|
237
209
|
def run_to_position_steps_threaded(
|
|
238
210
|
self, steps, movement_abs_rel: MovementAbsRel | None = None
|
|
239
211
|
):
|
|
@@ -14,27 +14,31 @@ this module has two different functions:
|
|
|
14
14
|
|
|
15
15
|
from ._tmc_xxxx import *
|
|
16
16
|
from .com._tmc_com import TmcCom
|
|
17
|
-
from .com._tmc_com_uart_base import TmcComUartBase
|
|
18
|
-
from .motion_control._tmc_mc_step_reg import TmcMotionControlStepReg
|
|
19
|
-
from .motion_control._tmc_mc_step_pwm_dir import TmcMotionControlStepPwmDir
|
|
20
|
-
from .motion_control._tmc_mc_vactual import TmcMotionControlVActual
|
|
21
|
-
from .enable_control._tmc_ec_toff import TmcEnableControlToff
|
|
22
|
-
from .enable_control._tmc_ec_pin import TmcEnableControlPin
|
|
23
17
|
from .tmc_logger import Loglevel
|
|
24
18
|
from .reg._tmc220x_reg import *
|
|
19
|
+
from ._tmc_validation import SUBMODULE_VALIDATION
|
|
20
|
+
|
|
21
|
+
if SUBMODULE_VALIDATION:
|
|
22
|
+
from .com._tmc_com_uart_base import TmcComUartBase
|
|
23
|
+
from .motion_control._tmc_mc_step_reg import TmcMotionControlStepReg
|
|
24
|
+
from .motion_control._tmc_mc_step_pwm_dir import TmcMotionControlStepPwmDir
|
|
25
|
+
from .motion_control._tmc_mc_vactual import TmcMotionControlVActual
|
|
26
|
+
from .enable_control._tmc_ec_toff import TmcEnableControlToff
|
|
27
|
+
from .enable_control._tmc_ec_pin import TmcEnableControlPin
|
|
25
28
|
|
|
26
29
|
|
|
27
30
|
class Tmc220x(TmcXXXX):
|
|
28
31
|
"""Tmc220X"""
|
|
29
32
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
if SUBMODULE_VALIDATION:
|
|
34
|
+
SUPPORTED_COM_TYPES = (TmcComUartBase,)
|
|
35
|
+
SUPPORTED_EC_TYPES = (TmcEnableControlToff, TmcEnableControlPin)
|
|
36
|
+
SUPPORTED_MC_TYPES = (
|
|
37
|
+
TmcMotionControlStepDir,
|
|
38
|
+
TmcMotionControlStepReg,
|
|
39
|
+
TmcMotionControlStepPwmDir,
|
|
40
|
+
TmcMotionControlVActual,
|
|
41
|
+
)
|
|
38
42
|
DRIVER_FAMILY = "TMC220X"
|
|
39
43
|
|
|
40
44
|
# Constructor/Destructor
|
|
@@ -14,28 +14,32 @@ this module has two different functions:
|
|
|
14
14
|
|
|
15
15
|
from ._tmc_xxxx import *
|
|
16
16
|
from .com._tmc_com import TmcCom
|
|
17
|
-
from .com._tmc_com_spi_base import TmcComSpiBase
|
|
18
|
-
from .com._tmc_com_uart_base import TmcComUartBase
|
|
19
|
-
from .motion_control._tmc_mc_step_reg import TmcMotionControlStepDir
|
|
20
|
-
from .motion_control._tmc_mc_step_reg import TmcMotionControlStepReg
|
|
21
|
-
from .motion_control._tmc_mc_step_pwm_dir import TmcMotionControlStepPwmDir
|
|
22
|
-
from .enable_control._tmc_ec_toff import TmcEnableControlToff
|
|
23
|
-
from .enable_control._tmc_ec_pin import TmcEnableControlPin
|
|
24
17
|
from ._tmc_stallguard import StallGuard
|
|
25
18
|
from .tmc_logger import *
|
|
26
19
|
from .reg._tmc224x_reg import *
|
|
20
|
+
from ._tmc_validation import SUBMODULE_VALIDATION
|
|
21
|
+
|
|
22
|
+
if SUBMODULE_VALIDATION:
|
|
23
|
+
from .com._tmc_com_spi_base import TmcComSpiBase
|
|
24
|
+
from .com._tmc_com_uart_base import TmcComUartBase
|
|
25
|
+
from .motion_control._tmc_mc_step_reg import TmcMotionControlStepDir
|
|
26
|
+
from .motion_control._tmc_mc_step_reg import TmcMotionControlStepReg
|
|
27
|
+
from .motion_control._tmc_mc_step_pwm_dir import TmcMotionControlStepPwmDir
|
|
28
|
+
from .enable_control._tmc_ec_toff import TmcEnableControlToff
|
|
29
|
+
from .enable_control._tmc_ec_pin import TmcEnableControlPin
|
|
27
30
|
|
|
28
31
|
|
|
29
32
|
class Tmc2240(TmcXXXX, StallGuard):
|
|
30
33
|
"""Tmc2240"""
|
|
31
34
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
if SUBMODULE_VALIDATION:
|
|
36
|
+
SUPPORTED_COM_TYPES = (TmcComSpiBase, TmcComUartBase)
|
|
37
|
+
SUPPORTED_EC_TYPES = (TmcEnableControlToff, TmcEnableControlPin)
|
|
38
|
+
SUPPORTED_MC_TYPES = (
|
|
39
|
+
TmcMotionControlStepDir,
|
|
40
|
+
TmcMotionControlStepReg,
|
|
41
|
+
TmcMotionControlStepPwmDir,
|
|
42
|
+
)
|
|
39
43
|
DRIVER_FAMILY = "TMC2240"
|
|
40
44
|
|
|
41
45
|
# Constructor/Destructor
|
|
@@ -14,30 +14,36 @@ this module has two different functions:
|
|
|
14
14
|
|
|
15
15
|
from ._tmc_xxxx import *
|
|
16
16
|
from .com._tmc_com import TmcCom
|
|
17
|
-
from .com._tmc_com_spi_base import TmcComSpiBase
|
|
18
|
-
from .com._tmc_com_uart_base import TmcComUartBase
|
|
19
|
-
from .motion_control._tmc_mc_step_reg import TmcMotionControlStepDir
|
|
20
|
-
from .motion_control._tmc_mc_step_reg import TmcMotionControlStepReg
|
|
21
|
-
from .motion_control._tmc_mc_step_pwm_dir import TmcMotionControlStepPwmDir
|
|
22
|
-
from .motion_control._tmc_mc_int_ramp_generator import TmcMotionControlIntRampGenerator
|
|
23
|
-
from .enable_control._tmc_ec_toff import TmcEnableControlToff
|
|
24
|
-
from .enable_control._tmc_ec_pin import TmcEnableControlPin
|
|
25
17
|
from ._tmc_stallguard import StallGuard
|
|
26
18
|
from .tmc_logger import *
|
|
27
19
|
from .reg._tmc5160_reg import *
|
|
20
|
+
from ._tmc_validation import SUBMODULE_VALIDATION
|
|
21
|
+
|
|
22
|
+
if SUBMODULE_VALIDATION:
|
|
23
|
+
from .com._tmc_com_spi_base import TmcComSpiBase
|
|
24
|
+
from .com._tmc_com_uart_base import TmcComUartBase
|
|
25
|
+
from .motion_control._tmc_mc_step_reg import TmcMotionControlStepDir
|
|
26
|
+
from .motion_control._tmc_mc_step_reg import TmcMotionControlStepReg
|
|
27
|
+
from .motion_control._tmc_mc_step_pwm_dir import TmcMotionControlStepPwmDir
|
|
28
|
+
from .motion_control._tmc_mc_int_ramp_generator import (
|
|
29
|
+
TmcMotionControlIntRampGenerator,
|
|
30
|
+
)
|
|
31
|
+
from .enable_control._tmc_ec_toff import TmcEnableControlToff
|
|
32
|
+
from .enable_control._tmc_ec_pin import TmcEnableControlPin
|
|
28
33
|
|
|
29
34
|
|
|
30
35
|
class Tmc5160(TmcXXXX, StallGuard):
|
|
31
36
|
"""Tmc5160"""
|
|
32
37
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
if SUBMODULE_VALIDATION:
|
|
39
|
+
SUPPORTED_COM_TYPES = (TmcComSpiBase, TmcComUartBase)
|
|
40
|
+
SUPPORTED_EC_TYPES = (TmcEnableControlToff, TmcEnableControlPin)
|
|
41
|
+
SUPPORTED_MC_TYPES = (
|
|
42
|
+
TmcMotionControlStepDir,
|
|
43
|
+
TmcMotionControlStepReg,
|
|
44
|
+
TmcMotionControlStepPwmDir,
|
|
45
|
+
TmcMotionControlIntRampGenerator,
|
|
46
|
+
)
|
|
41
47
|
DRIVER_FAMILY = "TMC5160"
|
|
42
48
|
|
|
43
49
|
# Constructor/Destructor
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/com/_tmc_com_spi_circuitpython.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/com/_tmc_com_uart_circuitpython.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/motion_control/_tmc_mc_step_pwm_dir.py
RENAMED
|
File without changes
|
{pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/motion_control/_tmc_mc_step_reg.py
RENAMED
|
File without changes
|
{pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/motion_control/_tmc_mc_vactual.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_gpio/_tmc_gpio_board_circuitpython.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_gpio/_tmc_gpio_board_gpiozero.py
RENAMED
|
File without changes
|
{pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_gpio/_tmc_gpio_board_micropython.py
RENAMED
|
File without changes
|
{pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_gpio/_tmc_gpio_board_periphery.py
RENAMED
|
File without changes
|
{pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_gpio/_tmc_gpio_board_rpi_gpio.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_logger/_tmc_logger_cpython.py
RENAMED
|
File without changes
|
{pytmcstepper-0.18.4 → pytmcstepper-0.19.0}/src/tmc_driver/tmc_logger/_tmc_logger_micropython.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|