0 modification mais ça se voit pas

This commit is contained in:
mpboyer 2025-01-15 08:37:07 +01:00
parent f06589562c
commit d67a33203b
2 changed files with 4 additions and 21 deletions

View file

@ -3,6 +3,7 @@ import socket
import GCode_Interpreterdc
from controller import DummyController
class Hardware:
def __init__(self, bind):
self.s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
@ -19,7 +20,6 @@ class SimuHardware(Hardware):
def __init__(self, bind):
Hardware.__init__(self, bind)
def probe(self, gtm):
self.s.send("request\n".encode())
encoder_x = int(socket.SocketIO(self.s, "rw").readline())
@ -67,11 +67,10 @@ class SimuHardware(Hardware):
self.s.send(str(gtm.z_direction).encode() + b" " + str(gtm.FAST_Z_FEEDRATE / gtm.z_throttle).encode() + b"\n")
if __name__ == '__main__':
b = "socket.sock"
sh = SimuHardware(b)
ctrl=DummyController()
ctrl = DummyController()
gtm1 = GCode_Interpreterdc.GCodeToMotors(ctrl, sh)
sh.probe(gtm1)
print(gtm1.current_units)

View file

@ -3,17 +3,6 @@ import os
import time
import numpy as np
import matplotlib.pyplot as plt
#from color import Color
#c1 = Color("#7d1dd3")
#c2 = Color("#ffe500")
#colors = list(c1.range_to(c2, 42))
def infinite_colors():
for x in iter(int, 1):
yield colors[x % 42]
def parse_speed(text):
@ -99,11 +88,6 @@ class Simulator:
class Douche:
colors = infinite_colors()
last_x = None
last_y = None
def __init__(self):
# We will assume no points are `really` in 3D.
plt.ion()
@ -113,7 +97,7 @@ class Douche:
self.ys = []
ax.set_xlim([0, 300])
ax.set_ylim([0, 300])
self.line, = ax.plot(self.xs, self.ys)
self.line, = ax.plot(self.xs, self.ys, c="#7d1dd3")
def add_point(self, x, y):
self.xs.append(x)