This commit is contained in:
Your Name 2024-11-18 10:38:47 +01:00
commit 5b664cbc3d

View File

@ -1074,6 +1074,7 @@ class RelayControl(QtWidgets.QMainWindow):
self.ui.stopSpotlightBtn.clicked.connect(self.spot_off)
# self.scene = QtWidgets.QGraphicsScene(self)
# self.ui.graphicsView.setScene(self.scene)
self.r = sainsmartrelay.SainsmartRelay()
# def populate_model_dropdown(self):
# """Populate the dropdown menu with model files from the models directory."""
@ -1088,7 +1089,7 @@ class RelayControl(QtWidgets.QMainWindow):
# self.yolo_stream = YOLOv8CameraStream(model_path="models/yolov8m_seg_e300.pt", logging_level="high")
# # self.yolo_stream.start() # Start the YOLOv8 stream
# self.timer.start(30) # Start the timer to update the frame every 30ms (about 33 FPS)
sainsmartrelay.turn_on(1)
r.turn_on(1)
def spot_off(self):
# # Stop the camera stream and processing
@ -1098,7 +1099,7 @@ class RelayControl(QtWidgets.QMainWindow):
# self.yolo_stream = None # Reset the YOLOv8 stream object
# self.scene.clear() # Clear the displayed frame from the graphicsView
# print("Camera stream stopped and resources released.")
sainsmartrelay.turn_off(1)
r.turn_off(1)
if __name__ == "__main__":
import sys