From 4e6234b2fd8a32feb3a6e5fb8ab0bdc58c014fe2 Mon Sep 17 00:00:00 2001 From: esarrey <eliott.sarrey@gmail.com> Date: Tue, 30 May 2023 18:12:25 +0200 Subject: [PATCH] Clean up --- test_magnet.py | 18 ------------------ video_test.py | 35 ----------------------------------- 2 files changed, 53 deletions(-) delete mode 100644 test_magnet.py delete mode 100644 video_test.py diff --git a/test_magnet.py b/test_magnet.py deleted file mode 100644 index 030e87f..0000000 --- a/test_magnet.py +++ /dev/null @@ -1,18 +0,0 @@ -import nidaqmx -from time import sleep - -try: - nidaqmx.Task() -except: - raise RuntimeError("Failed communicating with the DAC, aborting task") - -with nidaqmx.Task() as task: - task.ao_channels.add_ao_voltage_chan("Dev1/ao1") - task.write(0.5, timeout=10) - task.start() - sleep(4) - task.write(0., timeout=10) - task.stop() - task.wait_until_done() - task.close() - diff --git a/video_test.py b/video_test.py deleted file mode 100644 index d05a7bc..0000000 --- a/video_test.py +++ /dev/null @@ -1,35 +0,0 @@ -import sys -from PyQt5.QtWidgets import QApplication, QDialog, QLabel -from PyQt5.QtGui import QImage, QPixmap -from PyQt5.QtCore import QTimer -import cv2 - -class AppWindow(QDialog): - def __init__(self): - super().__init__() - self.video = cv2.VideoCapture(0) - self.initUI() - - def initUI(self): - self.setWindowTitle('miniMOKE') - self.setGeometry(300, 300, 800, 600) - self.label = QLabel(self) - self.label.setGeometry(0, 0, 1920//4, 1080//4) - self.label.setScaledContents(True) - - self.timer = QTimer(self) - self.timer.timeout.connect(self.show_frame) - self.timer.start(20) - - def show_frame(self): - _, frame = self.video.read() - # frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) - # image = QImage(frame, frame.shape[1], frame.shape[0], - # frame.strides[0], QImage.Format_RGB888) - # self.label.setPixmap(QPixmap.fromImage(image)) - -if __name__ == "__main__": - app = QApplication(sys.argv) - window = AppWindow() - window.show() - sys.exit(app.exec_()) -- GitLab