@@ -6,7 +6,7 @@ A simple GPIO pin toggler using pigpio and asyncio.
Toggles GPIO pins based on keyboard input (Enter key).
"""
-pins = [27]
+pins = [22]
# pins = [17, 27, 22]
async def toggle_pin(pin: int, shared_state):
@@ -123,7 +123,7 @@ class MagDistributor:
step_delay = self._speed_to_step_delay(self.max_speed_mmmin)
linear_steps = int(abs(pos_target - self.curr_pos_mm) * self.steps_per_mm)
- linear_dir = True if pos_target > self.curr_pos_mm else False
+ linear_dir = False if pos_target > self.curr_pos_mm else True
if linear_steps > 0:
self.gpio.do_step(self.linear_dir_pin, self.linear_step_pin, linear_steps, step_delay, linear_dir)
self.curr_pos_mm = pos_target