modifications on the string sent to the streamer, streaming from the webapp now works

This commit is contained in:
Sohel
2024-11-20 18:13:28 +01:00
parent dade710ef0
commit 4a9e1498ca
2 changed files with 3 additions and 2 deletions

View File

@@ -104,7 +104,7 @@ def getText():
gcode_file.write(gcode_output) gcode_file.write(gcode_output)
print("Streaming ...") print("Streaming ...")
stream_gcode_websocket(gcode_output) #envoi du gcode généré au plotter stream_gcode_websocket(gcode_output.split("\n")) #envoi du gcode généré au plotter
print(f"G-code saved to {gcode_filename}") print(f"G-code saved to {gcode_filename}")
else: else:

View File

@@ -63,7 +63,8 @@ def receiver():
else: else:
response = str(l, 'utf-8') response = str(l, 'utf-8')
# print("Received:", response) # print("Received:", response)
response_queue.put(response) # Add response to the queue if "PING" not in response:
response_queue.put(response) # Add response to the queue
except Exception as e: except Exception as e:
print("Error in receiver:", e) print("Error in receiver:", e)
break break