new ip
This commit is contained in:
@@ -95,14 +95,15 @@ def getText():
|
||||
|
||||
# Générez le G-code à partir du texte formaté
|
||||
gcode_output = convert_text(formatted_text)
|
||||
print("G-code generated:")
|
||||
print(gcode_output)
|
||||
# print("G-code generated:")
|
||||
# print(gcode_output)
|
||||
|
||||
# Sauvegardez le fichier G-code
|
||||
gcode_filename = "retourligne.gcode"
|
||||
with open(gcode_filename, "w") as gcode_file:
|
||||
gcode_file.write(gcode_output)
|
||||
|
||||
print("Streaming ...")
|
||||
stream_gcode_websocket(gcode_output) #envoi du gcode généré au plotter
|
||||
|
||||
print(f"G-code saved to {gcode_filename}")
|
||||
|
||||
@@ -72,7 +72,7 @@ def stream_gcode_websocket(gcode):
|
||||
"""Streams G-code commands to the WebSocket server."""
|
||||
global ws
|
||||
ws = websocket.WebSocket()
|
||||
ws.connect("ws://192.168.0.1:81") # Replace with your server's address
|
||||
ws.connect("ws://192.168.8.219:81") # Replace with your server's address
|
||||
|
||||
# Start the receiver thread
|
||||
t = threading.Thread(target=receiver, daemon=True)
|
||||
|
||||
Reference in New Issue
Block a user