MCPcopy
hub / github.com/PiLiDAR/PiLiDAR / move_steps

Method move_steps

lib/a4988_driver.py:64–73  ·  view source on GitHub ↗
(self, steps)

Source from the content-addressed store, hash-verified

62 sleep(self.delay)
63
64 def move_steps(self, steps):
65 direction = steps < 0 # < clockwise positive
66 steps = abs(int(steps))
67
68 self.set_direction(direction)
69 for _ in range(steps):
70 self.step()
71
72 # update current steps considering direction
73 self.current_steps += steps if not direction else -steps
74
75 def move_angle(self, angle):
76 steps = self.get_steps_for_angle(abs(angle))

Callers 5

move_angleMethod · 0.95
move_to_angleMethod · 0.95
move_steps_callbackFunction · 0.80
PiLiDAR.pyFile · 0.80
a4988_driver.pyFile · 0.80

Calls 2

set_directionMethod · 0.95
stepMethod · 0.95

Tested by

no test coverage detected