diff --git a/GCode_Interpreterdc.py b/GCode_Interpreterdc.py index f420b50..e6a62bf 100644 --- a/GCode_Interpreterdc.py +++ b/GCode_Interpreterdc.py @@ -150,11 +150,10 @@ class GCodeToMotors: # HARDWARE.realize() applies the current commands to the actual hardware def move(self): - #self.HARDWARE.probe(self) - #while not self.CONTROLLER(self): # Allow controller to alter self - # self.HARDWARE.realize(self) + self.HARDWARE.probe(self) + while not self.CONTROLLER(self): # Allow controller to alter self + self.HARDWARE.realize(self) - self.current_units = self.target_units.copy() # Too good to be true self.calculate_deltas() def calculate_feedrate_delay(self, feedrate: float) -> float: diff --git a/hardware.py b/hardware.py index 79a0a2d..ac5f392 100644 --- a/hardware.py +++ b/hardware.py @@ -1,8 +1,6 @@ import socket -import os import GCode_Interpreterdc -import simulator class Hardware: def __init__(self, bind): diff --git a/simulator.py b/simulator.py index 6518ab1..5618f84 100644 --- a/simulator.py +++ b/simulator.py @@ -120,7 +120,8 @@ class NaiveSimulator(Simulator, Douche): x_v = parse_speed(socket.SocketIO(self.s, 'r').readline()) y_v = parse_speed(socket.SocketIO(self.s, 'r').readline()) z_v = parse_speed(socket.SocketIO(self.s, 'r').readline()) - + self.speed = np.array([x_v, y_v, z_v]) + inertia = - self.alpha * self.speed gamma_command = np.array([x_v, y_v, z_v]) - self.speed self.speed = self.time_step * (inertia + gamma_command)