mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
32 lines
760 B
Python
32 lines
760 B
Python
from multiprocessing import Queue
|
|
from multiprocessing.managers import BaseManager
|
|
|
|
import tornado.ioloop
|
|
import multiprocessing
|
|
import logging
|
|
from cscore import CameraServer
|
|
|
|
from app.ChameleonVisionApp import ChameleonApplication
|
|
from app.classes.SettingsManager import SettingsManager
|
|
from tornado.options import options
|
|
from app.handlers.VisionHandler import VisionHandler
|
|
|
|
|
|
def run_server():
|
|
tornado.options.parse_command_line()
|
|
app = ChameleonApplication()
|
|
print(f"Serving on port {options.port}")
|
|
app.listen(options.port)
|
|
tornado.ioloop.IOLoop.current().start()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
logging.basicConfig(level=logging.DEBUG)
|
|
SettingsManager()
|
|
|
|
VisionHandler().run()
|
|
run_server()
|
|
|
|
while True:
|
|
pass
|