Correct motion control issue

Under some circumstances with long moves, remaining distance to travel could be end up as non-integer, producing a `7 Err:` and Unexpected response from EBB report to the user.
pull/175/head
Windell Oskay 2021-08-09 13:55:21 -07:00
rodzic 948d7f2157
commit b2026e957c
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -1125,8 +1125,8 @@ class EggBot(inkex.Effect):
n_time = int(math.ceil(1000.0 / self.fSpeed * plot_utils.distance(n_delta_x, n_delta_y)))
while abs(n_delta_x) > 0 or abs(n_delta_y) > 0:
xd = n_delta_x
yd = n_delta_y
xd = int(n_delta_x)
yd = int(n_delta_y)
td = n_time
if td < 1:
td = 1 # don't allow zero-time moves.