propreté

This commit is contained in:
mpboyer 2025-01-14 18:29:43 +01:00
parent b92fbe42af
commit ee50a8eb44
3 changed files with 5 additions and 7 deletions

View file

@ -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:

View file

@ -1,8 +1,6 @@
import socket
import os
import GCode_Interpreterdc
import simulator
class Hardware:
def __init__(self, bind):

View file

@ -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)