new all bot ui and equipment added
This commit is contained in:
42
combined_bot_main.py
Normal file
42
combined_bot_main.py
Normal file
@@ -0,0 +1,42 @@
|
||||
import sys
|
||||
from time import time
|
||||
import cv2 as cv
|
||||
import keyboard
|
||||
from combined_user_interface import PrimaryOverlay
|
||||
from equipment import Equipment
|
||||
|
||||
|
||||
def run():
|
||||
overlay = PrimaryOverlay()
|
||||
|
||||
while True:
|
||||
if overlay.run_mode == 'stopped':
|
||||
overlay.update_status_label("stopped")
|
||||
overlay.run_mode = 'init'
|
||||
continue
|
||||
elif overlay.run_mode == 'started':
|
||||
cv.waitKey(1000)
|
||||
pass
|
||||
elif overlay.run_mode == 'init':
|
||||
cv.waitKey(1)
|
||||
continue
|
||||
elif overlay.run_mode == 'paused':
|
||||
continue
|
||||
elif overlay.run_mode == 'finished':
|
||||
overlay.update_status_label("finished")
|
||||
overlay.run_mode = 'init'
|
||||
continue
|
||||
elif overlay.run_mode == 'quit':
|
||||
overlay.destroy()
|
||||
return
|
||||
else:
|
||||
break
|
||||
|
||||
if overlay.rb_int.get() == 1:
|
||||
equip = Equipment(overlay)
|
||||
equip.execute_main_loop()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
sys.exit()
|
||||
Reference in New Issue
Block a user