@@ -48,17 +48,17 @@ class Tmc220x:
48
48
_steps_per_rev :int = 0
49
49
_fullsteps_per_rev :int = 0
50
50
51
- _current_pos :int = 0 # current position of stepper in steps
52
- _target_pos :int = 0 # the target position in steps
53
- _speed :float = 0.0 # the current speed in steps per second
54
- _max_speed :float = 1.0 # the maximum speed in steps per second
55
- _max_speed_homing :float = 200 # the maximum speed in steps per second for homing
56
- _acceleration :float = 1.0 # the acceleration in steps per second per second
57
- _acceleration_homing :float = 10000 # the acceleration in steps per second per second for homing
58
- _sqrt_twoa :float = 1.0 # Precomputed sqrt(2*_acceleration)
59
- _step_interval :int = 0 # the current interval between two steps
60
- _min_pulse_width :int = 1 # minimum allowed pulse with in microseconds
61
- _last_step_time :int = 0 # The last step time in microseconds
51
+ _current_pos :int = 0 # current position of stepper in steps
52
+ _target_pos :int = 0 # the target position in steps
53
+ _speed :int = 0 # the current speed in steps per second
54
+ _max_speed :int = 1 # the maximum speed in steps per second
55
+ _max_speed_homing :int = 200 # the maximum speed in steps per second for homing
56
+ _acceleration :int = 1 # the acceleration in steps per second per second
57
+ _acceleration_homing :int = 10000 # the acceleration in steps per second per second for homing
58
+ _sqrt_twoa :float = 1.0 # Precomputed sqrt(2*_acceleration)
59
+ _step_interval :int = 0 # the current interval between two steps
60
+ _min_pulse_width :int = 1 # minimum allowed pulse with in microseconds
61
+ _last_step_time :int = 0 # The last step time in microseconds
62
62
_n :int = 0 # step counter
63
63
_c0 :int = 0 # Initial step size in microseconds
64
64
_cn :int = 0 # Last step size in microseconds
@@ -82,7 +82,7 @@ def fullsteps_per_rev(self):
82
82
return self ._fullsteps_per_rev
83
83
84
84
@fullsteps_per_rev .setter
85
- def fullsteps_per_rev (self , fullsteps_per_rev ):
85
+ def fullsteps_per_rev (self , fullsteps_per_rev : int ):
86
86
"""_fullsteps_per_rev setter"""
87
87
self ._fullsteps_per_rev = fullsteps_per_rev
88
88
self ._steps_per_rev = self ._fullsteps_per_rev * self ._mres
@@ -93,7 +93,7 @@ def mres(self):
93
93
return self ._mres
94
94
95
95
@mres .setter
96
- def mres (self , mres ):
96
+ def mres (self , mres : int ):
97
97
"""_mres setter"""
98
98
self ._mres = mres
99
99
self ._steps_per_rev = self ._fullsteps_per_rev * self ._mres
@@ -104,7 +104,7 @@ def current_pos(self):
104
104
return self ._current_pos
105
105
106
106
@current_pos .setter
107
- def current_pos (self , current_pos ):
107
+ def current_pos (self , current_pos : int ):
108
108
"""_current_pos setter"""
109
109
self ._current_pos = current_pos
110
110
@@ -114,7 +114,7 @@ def movement_abs_rel(self):
114
114
return self ._movement_abs_rel
115
115
116
116
@movement_abs_rel .setter
117
- def movement_abs_rel (self , movement_abs_rel ):
117
+ def movement_abs_rel (self , movement_abs_rel : MovementAbsRel ):
118
118
"""_movement_abs_rel setter"""
119
119
self ._movement_abs_rel = movement_abs_rel
120
120
@@ -129,7 +129,7 @@ def speed(self):
129
129
return self ._speed
130
130
131
131
@speed .setter
132
- def speed (self , speed ):
132
+ def speed (self , speed : int ):
133
133
"""_speed setter"""
134
134
self .set_speed (speed )
135
135
@@ -139,7 +139,7 @@ def max_speed(self):
139
139
return self ._max_speed
140
140
141
141
@max_speed .setter
142
- def max_speed (self , max_speed ):
142
+ def max_speed (self , max_speed : int ):
143
143
"""_max_speed setter"""
144
144
self .set_max_speed (max_speed )
145
145
@@ -149,7 +149,7 @@ def max_speed_fullstep(self):
149
149
return self ._max_speed
150
150
151
151
@max_speed_fullstep .setter
152
- def max_speed_fullstep (self , max_speed_fullstep ):
152
+ def max_speed_fullstep (self , max_speed_fullstep : int ):
153
153
"""_max_speed_fullstep setter"""
154
154
self .set_max_speed_fullstep (max_speed_fullstep )
155
155
@@ -159,7 +159,7 @@ def accerlation(self):
159
159
return self ._acceleration
160
160
161
161
@accerlation .setter
162
- def accerlation (self , accerlation ):
162
+ def accerlation (self , accerlation : int ):
163
163
"""_acceleration setter"""
164
164
self .set_acceleration (accerlation )
165
165
@@ -169,7 +169,7 @@ def acceleration_fullstep(self):
169
169
return self ._acceleration
170
170
171
171
@acceleration_fullstep .setter
172
- def acceleration_fullstep (self , acceleration_fullstep ):
172
+ def acceleration_fullstep (self , acceleration_fullstep : int ):
173
173
"""_acceleration_fullstep setter"""
174
174
self .set_acceleration_fullstep (acceleration_fullstep )
175
175
0 commit comments