Skip to content

Commit e52d7cf

Browse files
committed
Fixing linetrace running issue where play did not work all the time
1 parent 73e1626 commit e52d7cf

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

mirte_robot/linetrace.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
# 1) the code finishes
2323
# 2) the user stopped the process
2424
# 3) the websocket connection is closed
25-
def stop_mirte(terminate = True):
25+
def stop_mirte():
2626
global running
27-
if terminate:
27+
if running.value:
2828
process.terminate()
2929
running.value = False
3030

@@ -68,8 +68,8 @@ def traceit(frame, event, arg):
6868

6969
# Sending the linetrace 0 to the client
7070
server.send_message_to_all("0")
71-
72-
stop_mirte(False)
71+
running.value = False
72+
stop_mirte()
7373

7474
process = multiprocessing.Process(target = load_mirte_module, args=(stepper, do_step))
7575

0 commit comments

Comments
 (0)