mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-04 03:11:40 +00:00
Fully merged CmerasHandler to SettingManger
hadn't the time to check, also refractord every use of cameras handler to settings manager, might have missed
This commit is contained in:
@@ -4,7 +4,7 @@ from cscore._cscore import VideoMode
|
||||
|
||||
class CamerasHandler:
|
||||
|
||||
@staticmethod
|
||||
#@staticmethod
|
||||
# def get_cameras_info():
|
||||
#
|
||||
# if not getattr(CamerasHandler, "cams_info", False):
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import tornado.websocket
|
||||
import json
|
||||
|
||||
from ..classes.Exceptions import NoCameraConnectedException
|
||||
from .CamerasHandler import CamerasHandler
|
||||
from ..classes.SettingsManager import SettingsManager
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import networktables
|
||||
import cv2
|
||||
import numpy
|
||||
from cscore import CameraServer
|
||||
from .CamerasHandler import CamerasHandler
|
||||
from app.classes.SettingsManager import SettingsManager
|
||||
import time
|
||||
import json
|
||||
@@ -76,9 +75,8 @@ class VisionHandler:
|
||||
NetworkTables.initialize("localhost")
|
||||
# NetworkTables.initialize()
|
||||
|
||||
cams = CamerasHandler.get_or_start_cameras(CamerasHandler.get_cameras_info())
|
||||
for cam in cams:
|
||||
self.camera_process(cams[cam])
|
||||
for cam in SettingsManager().usb_cameras:
|
||||
self.camera_process(SettingsManager().usb_cameras[cam])
|
||||
|
||||
def camera_process(self, camera):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user