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