From 64727f5c6ee3d4809113b75acbb9b466d33aacb4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 18 Nov 2024 10:38:30 +0100 Subject: [PATCH] update --- bjoerntest10.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bjoerntest10.py b/bjoerntest10.py index 3b3e170..f52c431 100644 --- a/bjoerntest10.py +++ b/bjoerntest10.py @@ -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