Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- # Form implementation generated from reading ui file 'C:\G5_Tool\G5_Stream_Tool\G5_Stream_Tool.ui'
- #
- # Created by: PyQt5 UI code generator 5.11.2
- #
- # WARNING! All changes made in this file will be lost!
- from PyQt5 import QtCore, QtGui, QtWidgets
- from PyQt5.QtCore import *
- from PyQt5.QtGui import QPixmap, QImage
- import paramiko
- import cv2
- import socket
- import numpy as np
- import sys
- import time
- import os
- from threading import Thread, Event, ThreadError
- from urllib.request import urlopen
- #Colors
- red = "background-color : rgb(170, 0, 0) ; color : rgb(255, 255, 255)"
- green = "background-color : rgb(0, 170, 0) ; color : rgb(255, 255, 255)"
- blue = "background-color : rgb(0, 85, 127) ; color : rgb(255, 255, 255)"
- class Ui_Form(object):
- def setupUi(self, Form):
- Form.setObjectName("Form")
- Form.resize(1827, 1022)
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap("../macq.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- Form.setWindowIcon(icon)
- self.groupBox_cam_mono = QtWidgets.QGroupBox(Form)
- self.groupBox_cam_mono.setGeometry(QtCore.QRect(1020, 450, 791, 541))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(11)
- font.setBold(True)
- font.setItalic(False)
- font.setWeight(75)
- self.groupBox_cam_mono.setFont(font)
- self.groupBox_cam_mono.setStyleSheet("color: rgb(0, 85, 127);")
- self.groupBox_cam_mono.setObjectName("groupBox_cam_mono")
- self.label_cam_stream = QtWidgets.QLabel(self.groupBox_cam_mono)
- self.label_cam_stream.setGeometry(QtCore.QRect(10, 30, 771, 501))
- self.label_cam_stream.setText("")
- self.label_cam_stream.setObjectName("label_cam_stream")
- self.groupBox_cam_mono_2 = QtWidgets.QGroupBox(Form)
- self.groupBox_cam_mono_2.setGeometry(QtCore.QRect(20, 450, 811, 541))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(11)
- font.setBold(True)
- font.setItalic(False)
- font.setWeight(75)
- self.groupBox_cam_mono_2.setFont(font)
- self.groupBox_cam_mono_2.setStyleSheet("color: rgb(0, 85, 127);")
- self.groupBox_cam_mono_2.setObjectName("groupBox_cam_mono_2")
- self.label_cam_capture = QtWidgets.QLabel(self.groupBox_cam_mono_2)
- self.label_cam_capture.setGeometry(QtCore.QRect(10, 30, 791, 501))
- self.label_cam_capture.setText("")
- self.label_cam_capture.setObjectName("label_cam_capture")
- self.groupBox_cam_mono_6 = QtWidgets.QGroupBox(Form)
- self.groupBox_cam_mono_6.setGeometry(QtCore.QRect(20, 10, 211, 431))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(11)
- font.setBold(True)
- font.setItalic(False)
- font.setWeight(75)
- self.groupBox_cam_mono_6.setFont(font)
- self.groupBox_cam_mono_6.setStyleSheet("color: rgb(0, 85, 127);")
- self.groupBox_cam_mono_6.setObjectName("groupBox_cam_mono_6")
- self.label_13 = QtWidgets.QLabel(self.groupBox_cam_mono_6)
- self.label_13.setGeometry(QtCore.QRect(300, 950, 311, 31))
- self.label_13.setStyleSheet("background-color: rgb(0, 255, 0);")
- self.label_13.setAlignment(QtCore.Qt.AlignCenter)
- self.label_13.setObjectName("label_13")
- self.button_capture = QtWidgets.QPushButton(self.groupBox_cam_mono_6)
- self.button_capture.setGeometry(QtCore.QRect(30, 350, 151, 41))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.button_capture.setFont(font)
- self.button_capture.setStyleSheet("color: rgb(0, 0, 0);\n"
- "")
- self.button_capture.setObjectName("button_capture")
- self.button_videostream = QtWidgets.QPushButton(self.groupBox_cam_mono_6)
- self.button_videostream.setGeometry(QtCore.QRect(30, 290, 151, 41))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.button_videostream.setFont(font)
- self.button_videostream.setStyleSheet("color: rgb(0, 0, 0);\n"
- "")
- self.button_videostream.setObjectName("button_videostream")
- self.label_ROI_3 = QtWidgets.QLabel(self.groupBox_cam_mono_6)
- self.label_ROI_3.setGeometry(QtCore.QRect(30, 30, 171, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_3.setFont(font)
- self.label_ROI_3.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_3.setObjectName("label_ROI_3")
- self.txt_hostname = QtWidgets.QTextEdit(self.groupBox_cam_mono_6)
- self.txt_hostname.setEnabled(True)
- self.txt_hostname.setGeometry(QtCore.QRect(30, 60, 151, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.txt_hostname.setFont(font)
- self.txt_hostname.setStyleSheet("")
- self.txt_hostname.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
- self.txt_hostname.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
- self.txt_hostname.setObjectName("txt_hostname")
- self.button_connect = QtWidgets.QPushButton(self.groupBox_cam_mono_6)
- self.button_connect.setGeometry(QtCore.QRect(30, 110, 151, 41))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.button_connect.setFont(font)
- self.button_connect.setStyleSheet("color: rgb(0, 0, 0);\n"
- "")
- self.button_connect.setObjectName("button_connect")
- self.label_ROI_11 = QtWidgets.QLabel(self.groupBox_cam_mono_6)
- self.label_ROI_11.setGeometry(QtCore.QRect(30, 200, 161, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_11.setFont(font)
- self.label_ROI_11.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_11.setObjectName("label_ROI_11")
- self.radioButton_color = QtWidgets.QRadioButton(self.groupBox_cam_mono_6)
- self.radioButton_color.setGeometry(QtCore.QRect(30, 230, 151, 20))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.radioButton_color.setFont(font)
- self.radioButton_color.setStyleSheet("color:rgb(0, 0, 0)")
- self.radioButton_color.setObjectName("radioButton_color")
- self.radioButton_bw = QtWidgets.QRadioButton(self.groupBox_cam_mono_6)
- self.radioButton_bw.setGeometry(QtCore.QRect(30, 250, 161, 20))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- font.setBold(False)
- font.setItalic(False)
- font.setWeight(50)
- font.setStrikeOut(False)
- font.setKerning(False)
- self.radioButton_bw.setFont(font)
- self.radioButton_bw.setStyleSheet("color: rgb(0, 0, 0);")
- self.radioButton_bw.setObjectName("radioButton_bw")
- self.groupBox_cam_mono_7 = QtWidgets.QGroupBox(Form)
- self.groupBox_cam_mono_7.setGeometry(QtCore.QRect(950, 10, 431, 431))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(11)
- font.setBold(True)
- font.setItalic(False)
- font.setWeight(75)
- self.groupBox_cam_mono_7.setFont(font)
- self.groupBox_cam_mono_7.setStyleSheet("color: rgb(0, 85, 127);")
- self.groupBox_cam_mono_7.setObjectName("groupBox_cam_mono_7")
- self.label_14 = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_14.setGeometry(QtCore.QRect(300, 950, 311, 31))
- self.label_14.setStyleSheet("background-color: rgb(0, 255, 0);")
- self.label_14.setAlignment(QtCore.Qt.AlignCenter)
- self.label_14.setObjectName("label_14")
- self.label_ROI = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ROI.setGeometry(QtCore.QRect(30, 130, 211, 41))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI.setFont(font)
- self.label_ROI.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI.setObjectName("label_ROI")
- self.label_ROI_2 = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ROI_2.setGeometry(QtCore.QRect(30, 90, 141, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_2.setFont(font)
- self.label_ROI_2.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_2.setObjectName("label_ROI_2")
- self.button_flash_on = QtWidgets.QPushButton(self.groupBox_cam_mono_7)
- self.button_flash_on.setGeometry(QtCore.QRect(240, 90, 41, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(9)
- self.button_flash_on.setFont(font)
- self.button_flash_on.setStyleSheet("color: rgb(0, 0, 0);\n"
- "")
- self.button_flash_on.setObjectName("button_flash_on")
- self.button_flash_off = QtWidgets.QPushButton(self.groupBox_cam_mono_7)
- self.button_flash_off.setGeometry(QtCore.QRect(290, 90, 41, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(9)
- self.button_flash_off.setFont(font)
- self.button_flash_off.setStyleSheet("color: rgb(0, 0, 0);\n"
- "")
- self.button_flash_off.setObjectName("button_flash_off")
- self.label_ROI_4 = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ROI_4.setGeometry(QtCore.QRect(30, 240, 161, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_4.setFont(font)
- self.label_ROI_4.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_4.setObjectName("label_ROI_4")
- self.label_ROI_5 = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ROI_5.setGeometry(QtCore.QRect(30, 270, 171, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_5.setFont(font)
- self.label_ROI_5.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_5.setObjectName("label_ROI_5")
- self.label_ROI_7 = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ROI_7.setGeometry(QtCore.QRect(330, 240, 21, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_7.setFont(font)
- self.label_ROI_7.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_7.setObjectName("label_ROI_7")
- self.label_ROI_8 = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ROI_8.setGeometry(QtCore.QRect(330, 270, 21, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_8.setFont(font)
- self.label_ROI_8.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_8.setObjectName("label_ROI_8")
- self.label_ir_voltage = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ir_voltage.setGeometry(QtCore.QRect(230, 270, 81, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ir_voltage.setFont(font)
- self.label_ir_voltage.setStyleSheet("color:rgb(113, 56, 170)")
- self.label_ir_voltage.setText("")
- self.label_ir_voltage.setObjectName("label_ir_voltage")
- self.label_ir_current = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ir_current.setGeometry(QtCore.QRect(230, 240, 81, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ir_current.setFont(font)
- self.label_ir_current.setStyleSheet("color:rgb(113, 56, 170)")
- self.label_ir_current.setText("")
- self.label_ir_current.setObjectName("label_ir_current")
- self.label_ROI_10 = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ROI_10.setGeometry(QtCore.QRect(30, 180, 211, 41))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_10.setFont(font)
- self.label_ROI_10.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_10.setObjectName("label_ROI_10")
- self.button_led_red_off = QtWidgets.QPushButton(self.groupBox_cam_mono_7)
- self.button_led_red_off.setGeometry(QtCore.QRect(290, 40, 41, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(9)
- self.button_led_red_off.setFont(font)
- self.button_led_red_off.setStyleSheet("color: rgb(0, 0, 0);\n"
- "")
- self.button_led_red_off.setObjectName("button_led_red_off")
- self.label_ROI_39 = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ROI_39.setGeometry(QtCore.QRect(30, 40, 71, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_39.setFont(font)
- self.label_ROI_39.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_39.setObjectName("label_ROI_39")
- self.button_led_red_on = QtWidgets.QPushButton(self.groupBox_cam_mono_7)
- self.button_led_red_on.setGeometry(QtCore.QRect(240, 40, 41, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(9)
- self.button_led_red_on.setFont(font)
- self.button_led_red_on.setStyleSheet("color: rgb(0, 0, 0);\n"
- "")
- self.button_led_red_on.setObjectName("button_led_red_on")
- self.label_ROI_6 = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ROI_6.setGeometry(QtCore.QRect(30, 300, 181, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_6.setFont(font)
- self.label_ROI_6.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_6.setObjectName("label_ROI_6")
- self.label_photodiode_voltage = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_photodiode_voltage.setGeometry(QtCore.QRect(230, 300, 81, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_photodiode_voltage.setFont(font)
- self.label_photodiode_voltage.setStyleSheet("color:rgb(113, 56, 170)")
- self.label_photodiode_voltage.setText("")
- self.label_photodiode_voltage.setObjectName("label_photodiode_voltage")
- self.label_ROI_9 = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ROI_9.setGeometry(QtCore.QRect(330, 300, 21, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_9.setFont(font)
- self.label_ROI_9.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_9.setObjectName("label_ROI_9")
- self.label_ROI_12 = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ROI_12.setGeometry(QtCore.QRect(30, 330, 181, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- font.setBold(True)
- font.setWeight(75)
- self.label_ROI_12.setFont(font)
- self.label_ROI_12.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_12.setObjectName("label_ROI_12")
- self.label_ROI_13 = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ROI_13.setGeometry(QtCore.QRect(30, 360, 171, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- font.setBold(True)
- font.setWeight(75)
- self.label_ROI_13.setFont(font)
- self.label_ROI_13.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_13.setObjectName("label_ROI_13")
- self.label_ROI_14 = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ROI_14.setGeometry(QtCore.QRect(30, 390, 161, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- font.setBold(True)
- font.setWeight(75)
- self.label_ROI_14.setFont(font)
- self.label_ROI_14.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_14.setObjectName("label_ROI_14")
- self.label_vin_vsense = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_vin_vsense.setGeometry(QtCore.QRect(230, 330, 81, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_vin_vsense.setFont(font)
- self.label_vin_vsense.setStyleSheet("color:rgb(113, 56, 170)")
- self.label_vin_vsense.setText("")
- self.label_vin_vsense.setObjectName("label_vin_vsense")
- self.label_boost_vsense = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_boost_vsense.setGeometry(QtCore.QRect(230, 360, 81, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_boost_vsense.setFont(font)
- self.label_boost_vsense.setStyleSheet("color:rgb(113, 56, 170)")
- self.label_boost_vsense.setText("")
- self.label_boost_vsense.setObjectName("label_boost_vsense")
- self.label_cap_vsense = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_cap_vsense.setGeometry(QtCore.QRect(230, 390, 81, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_cap_vsense.setFont(font)
- self.label_cap_vsense.setStyleSheet("color:rgb(113, 56, 170)")
- self.label_cap_vsense.setText("")
- self.label_cap_vsense.setObjectName("label_cap_vsense")
- self.label_ROI_15 = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ROI_15.setGeometry(QtCore.QRect(330, 330, 21, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_15.setFont(font)
- self.label_ROI_15.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_15.setObjectName("label_ROI_15")
- self.label_ROI_16 = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ROI_16.setGeometry(QtCore.QRect(330, 360, 21, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_16.setFont(font)
- self.label_ROI_16.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_16.setObjectName("label_ROI_16")
- self.label_ROI_17 = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_ROI_17.setGeometry(QtCore.QRect(330, 390, 21, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_17.setFont(font)
- self.label_ROI_17.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_17.setObjectName("label_ROI_17")
- self.flash_slider = QtWidgets.QSlider(self.groupBox_cam_mono_7)
- self.flash_slider.setGeometry(QtCore.QRect(240, 140, 91, 22))
- self.flash_slider.setOrientation(QtCore.Qt.Horizontal)
- self.flash_slider.setObjectName("flash_slider")
- self.label_intensity = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_intensity.setGeometry(QtCore.QRect(350, 140, 71, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_intensity.setFont(font)
- self.label_intensity.setStyleSheet("color:rgb(113, 56, 170)")
- self.label_intensity.setObjectName("label_intensity")
- self.label_threshold = QtWidgets.QLabel(self.groupBox_cam_mono_7)
- self.label_threshold.setGeometry(QtCore.QRect(350, 190, 71, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_threshold.setFont(font)
- self.label_threshold.setStyleSheet("color:rgb(113, 56, 170)")
- self.label_threshold.setObjectName("label_threshold")
- self.photodiode_slider = QtWidgets.QSlider(self.groupBox_cam_mono_7)
- self.photodiode_slider.setGeometry(QtCore.QRect(240, 190, 91, 22))
- self.photodiode_slider.setOrientation(QtCore.Qt.Horizontal)
- self.photodiode_slider.setObjectName("photodiode_slider")
- self.groupBox_cam_mono_8 = QtWidgets.QGroupBox(Form)
- self.groupBox_cam_mono_8.setGeometry(QtCore.QRect(1400, 10, 411, 301))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(11)
- font.setBold(True)
- font.setItalic(False)
- font.setWeight(75)
- self.groupBox_cam_mono_8.setFont(font)
- self.groupBox_cam_mono_8.setStyleSheet("color: rgb(0, 85, 127);")
- self.groupBox_cam_mono_8.setObjectName("groupBox_cam_mono_8")
- self.label_15 = QtWidgets.QLabel(self.groupBox_cam_mono_8)
- self.label_15.setGeometry(QtCore.QRect(300, 950, 311, 31))
- self.label_15.setStyleSheet("background-color: rgb(0, 255, 0);")
- self.label_15.setAlignment(QtCore.Qt.AlignCenter)
- self.label_15.setObjectName("label_15")
- self.label_ROI_23 = QtWidgets.QLabel(self.groupBox_cam_mono_8)
- self.label_ROI_23.setGeometry(QtCore.QRect(20, 130, 91, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_23.setFont(font)
- self.label_ROI_23.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_23.setObjectName("label_ROI_23")
- self.label_ROI_24 = QtWidgets.QLabel(self.groupBox_cam_mono_8)
- self.label_ROI_24.setGeometry(QtCore.QRect(20, 160, 91, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_24.setFont(font)
- self.label_ROI_24.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_24.setObjectName("label_ROI_24")
- self.label_hour = QtWidgets.QLabel(self.groupBox_cam_mono_8)
- self.label_hour.setGeometry(QtCore.QRect(200, 130, 171, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_hour.setFont(font)
- self.label_hour.setStyleSheet("color:rgb(113, 56, 170)")
- self.label_hour.setObjectName("label_hour")
- self.label_date = QtWidgets.QLabel(self.groupBox_cam_mono_8)
- self.label_date.setGeometry(QtCore.QRect(200, 160, 171, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_date.setFont(font)
- self.label_date.setStyleSheet("color:rgb(113, 56, 170)")
- self.label_date.setObjectName("label_date")
- self.label_ROI_25 = QtWidgets.QLabel(self.groupBox_cam_mono_8)
- self.label_ROI_25.setGeometry(QtCore.QRect(20, 200, 91, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_25.setFont(font)
- self.label_ROI_25.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_25.setObjectName("label_ROI_25")
- self.label_ROI_26 = QtWidgets.QLabel(self.groupBox_cam_mono_8)
- self.label_ROI_26.setGeometry(QtCore.QRect(20, 229, 91, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_26.setFont(font)
- self.label_ROI_26.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_26.setObjectName("label_ROI_26")
- self.label_latitude = QtWidgets.QLabel(self.groupBox_cam_mono_8)
- self.label_latitude.setGeometry(QtCore.QRect(200, 200, 171, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_latitude.setFont(font)
- self.label_latitude.setStyleSheet("color:rgb(113, 56, 170)")
- self.label_latitude.setObjectName("label_latitude")
- self.label_ROI_29 = QtWidgets.QLabel(self.groupBox_cam_mono_8)
- self.label_ROI_29.setGeometry(QtCore.QRect(20, 40, 141, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_29.setFont(font)
- self.label_ROI_29.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_29.setObjectName("label_ROI_29")
- self.label_ROI_30 = QtWidgets.QLabel(self.groupBox_cam_mono_8)
- self.label_ROI_30.setGeometry(QtCore.QRect(20, 70, 141, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_ROI_30.setFont(font)
- self.label_ROI_30.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_30.setObjectName("label_ROI_30")
- self.label_gga_fix = QtWidgets.QLabel(self.groupBox_cam_mono_8)
- self.label_gga_fix.setGeometry(QtCore.QRect(200, 40, 81, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_gga_fix.setFont(font)
- self.label_gga_fix.setStyleSheet("color:rgb(113, 56, 170)")
- self.label_gga_fix.setObjectName("label_gga_fix")
- self.label_rmc_state = QtWidgets.QLabel(self.groupBox_cam_mono_8)
- self.label_rmc_state.setGeometry(QtCore.QRect(200, 70, 81, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_rmc_state.setFont(font)
- self.label_rmc_state.setStyleSheet("color:rgb(113, 56, 170)")
- self.label_rmc_state.setObjectName("label_rmc_state")
- self.label_longitude = QtWidgets.QLabel(self.groupBox_cam_mono_8)
- self.label_longitude.setGeometry(QtCore.QRect(200, 230, 171, 41))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.label_longitude.setFont(font)
- self.label_longitude.setStyleSheet("color:rgb(113, 56, 170)")
- self.label_longitude.setObjectName("label_longitude")
- self.groupBox_cam_mono_11 = QtWidgets.QGroupBox(Form)
- self.groupBox_cam_mono_11.setGeometry(QtCore.QRect(250, 10, 681, 431))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(11)
- font.setBold(True)
- font.setItalic(False)
- font.setWeight(75)
- self.groupBox_cam_mono_11.setFont(font)
- self.groupBox_cam_mono_11.setStyleSheet("color: rgb(0, 85, 127);")
- self.groupBox_cam_mono_11.setObjectName("groupBox_cam_mono_11")
- self.label_19 = QtWidgets.QLabel(self.groupBox_cam_mono_11)
- self.label_19.setGeometry(QtCore.QRect(300, 950, 311, 31))
- self.label_19.setStyleSheet("background-color: rgb(0, 255, 0);")
- self.label_19.setAlignment(QtCore.Qt.AlignCenter)
- self.label_19.setObjectName("label_19")
- self.button_flash_prog = QtWidgets.QPushButton(self.groupBox_cam_mono_11)
- self.button_flash_prog.setGeometry(QtCore.QRect(510, 100, 151, 41))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.button_flash_prog.setFont(font)
- self.button_flash_prog.setStyleSheet("color: rgb(0, 0, 0);\n"
- "")
- self.button_flash_prog.setObjectName("button_flash_prog")
- self.scrollArea_shell = QtWidgets.QScrollArea(self.groupBox_cam_mono_11)
- self.scrollArea_shell.setGeometry(QtCore.QRect(30, 40, 461, 321))
- font = QtGui.QFont()
- font.setPointSize(8)
- self.scrollArea_shell.setFont(font)
- self.scrollArea_shell.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
- self.scrollArea_shell.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
- self.scrollArea_shell.setWidgetResizable(True)
- self.scrollArea_shell.setAlignment(QtCore.Qt.AlignBottom|QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft)
- self.scrollArea_shell.setObjectName("scrollArea_shell")
- self.scrollAreaWidgetContents = QtWidgets.QWidget()
- self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 438, 319))
- self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
- self.gridLayout = QtWidgets.QGridLayout(self.scrollAreaWidgetContents)
- self.gridLayout.setObjectName("gridLayout")
- self.label_shell = QtWidgets.QLabel(self.scrollAreaWidgetContents)
- font = QtGui.QFont()
- font.setFamily("Courier New")
- font.setPointSize(9)
- self.label_shell.setFont(font)
- self.label_shell.setStyleSheet("color: rgb(255, 255, 255);\n"
- "background-color: rgb(0, 0, 0);")
- self.label_shell.setText("")
- self.label_shell.setObjectName("label_shell")
- self.gridLayout.addWidget(self.label_shell, 0, 0, 1, 1)
- self.scrollArea_shell.setWidget(self.scrollAreaWidgetContents)
- self.progress_bar = QtWidgets.QProgressBar(self.groupBox_cam_mono_11)
- self.progress_bar.setGeometry(QtCore.QRect(30, 380, 461, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.progress_bar.setFont(font)
- self.progress_bar.setStyleSheet("color: rgb(0, 0, 0);")
- self.progress_bar.setProperty("value", 24)
- self.progress_bar.setObjectName("progress_bar")
- self.button_configurate = QtWidgets.QPushButton(self.groupBox_cam_mono_11)
- self.button_configurate.setGeometry(QtCore.QRect(510, 40, 151, 41))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.button_configurate.setFont(font)
- self.button_configurate.setStyleSheet("color: rgb(0, 0, 0);\n"
- "")
- self.button_configurate.setObjectName("button_configurate")
- self.button_reset = QtWidgets.QPushButton(self.groupBox_cam_mono_11)
- self.button_reset.setGeometry(QtCore.QRect(510, 160, 151, 41))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.button_reset.setFont(font)
- self.button_reset.setStyleSheet("color: rgb(0, 0, 0);\n"
- "")
- self.button_reset.setObjectName("button_reset")
- self.label_19.raise_()
- self.button_flash_prog.raise_()
- self.scrollArea_shell.raise_()
- self.progress_bar.raise_()
- self.label_shell.raise_()
- self.progress_bar.raise_()
- self.label_shell.raise_()
- self.scrollArea_shell.raise_()
- self.progress_bar.raise_()
- self.button_configurate.raise_()
- self.button_reset.raise_()
- self.groupBox_cam_mono_9 = QtWidgets.QGroupBox(Form)
- self.groupBox_cam_mono_9.setGeometry(QtCore.QRect(1400, 320, 411, 121))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(11)
- font.setBold(True)
- font.setItalic(False)
- font.setWeight(75)
- self.groupBox_cam_mono_9.setFont(font)
- self.groupBox_cam_mono_9.setStyleSheet("color: rgb(0, 85, 127);")
- self.groupBox_cam_mono_9.setObjectName("groupBox_cam_mono_9")
- self.label_17 = QtWidgets.QLabel(self.groupBox_cam_mono_9)
- self.label_17.setGeometry(QtCore.QRect(300, 950, 311, 31))
- self.label_17.setStyleSheet("background-color: rgb(0, 255, 0);")
- self.label_17.setAlignment(QtCore.Qt.AlignCenter)
- self.label_17.setObjectName("label_17")
- self.txt_gain = QtWidgets.QTextEdit(self.groupBox_cam_mono_9)
- self.txt_gain.setEnabled(True)
- self.txt_gain.setGeometry(QtCore.QRect(240, 30, 61, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.txt_gain.setFont(font)
- self.txt_gain.setStyleSheet("")
- self.txt_gain.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
- self.txt_gain.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
- self.txt_gain.setObjectName("txt_gain")
- self.label_ROI_18 = QtWidgets.QLabel(self.groupBox_cam_mono_9)
- self.label_ROI_18.setGeometry(QtCore.QRect(20, 70, 211, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- font.setBold(True)
- font.setWeight(75)
- self.label_ROI_18.setFont(font)
- self.label_ROI_18.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_18.setObjectName("label_ROI_18")
- self.button_set_exposure = QtWidgets.QPushButton(self.groupBox_cam_mono_9)
- self.button_set_exposure.setGeometry(QtCore.QRect(320, 70, 51, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.button_set_exposure.setFont(font)
- self.button_set_exposure.setStyleSheet("color: rgb(0, 0, 0);\n"
- "")
- self.button_set_exposure.setObjectName("button_set_exposure")
- self.button_set_gain = QtWidgets.QPushButton(self.groupBox_cam_mono_9)
- self.button_set_gain.setGeometry(QtCore.QRect(320, 30, 51, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.button_set_gain.setFont(font)
- self.button_set_gain.setStyleSheet("color: rgb(0, 0, 0);\n"
- "")
- self.button_set_gain.setObjectName("button_set_gain")
- self.txt_exposure = QtWidgets.QTextEdit(self.groupBox_cam_mono_9)
- self.txt_exposure.setEnabled(True)
- self.txt_exposure.setGeometry(QtCore.QRect(240, 70, 61, 31))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- self.txt_exposure.setFont(font)
- self.txt_exposure.setStyleSheet("")
- self.txt_exposure.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
- self.txt_exposure.setObjectName("txt_exposure")
- self.label_ROI_19 = QtWidgets.QLabel(self.groupBox_cam_mono_9)
- self.label_ROI_19.setGeometry(QtCore.QRect(20, 40, 211, 21))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- font.setBold(True)
- font.setWeight(75)
- self.label_ROI_19.setFont(font)
- self.label_ROI_19.setStyleSheet("color: rgb(0, 0, 0);")
- self.label_ROI_19.setObjectName("label_ROI_19")
- self.button_motor_stop = QtWidgets.QPushButton(Form)
- self.button_motor_stop.setGeometry(QtCore.QRect(900, 690, 51, 51))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- font.setBold(True)
- font.setWeight(75)
- self.button_motor_stop.setFont(font)
- self.button_motor_stop.setStyleSheet("color: rgb(0, 0, 0);\n"
- "")
- self.button_motor_stop.setObjectName("button_motor_stop")
- self.button_motor_right = QtWidgets.QPushButton(Form)
- self.button_motor_right.setGeometry(QtCore.QRect(960, 690, 51, 51))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- font.setBold(True)
- font.setWeight(75)
- self.button_motor_right.setFont(font)
- self.button_motor_right.setStyleSheet("color: rgb(0, 0, 0);\n"
- "")
- self.button_motor_right.setObjectName("button_motor_right")
- self.button_motor_left = QtWidgets.QPushButton(Form)
- self.button_motor_left.setGeometry(QtCore.QRect(840, 690, 51, 51))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- font.setBold(True)
- font.setWeight(75)
- self.button_motor_left.setFont(font)
- self.button_motor_left.setStyleSheet("color: rgb(0, 0, 0);\n"
- "")
- self.button_motor_left.setObjectName("button_motor_left")
- self.button_motor_up = QtWidgets.QPushButton(Form)
- self.button_motor_up.setGeometry(QtCore.QRect(900, 630, 51, 51))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- font.setBold(True)
- font.setWeight(75)
- self.button_motor_up.setFont(font)
- self.button_motor_up.setStyleSheet("color: rgb(0, 0, 0);\n"
- "")
- self.button_motor_up.setObjectName("button_motor_up")
- self.button_motor_down = QtWidgets.QPushButton(Form)
- self.button_motor_down.setGeometry(QtCore.QRect(900, 750, 51, 51))
- font = QtGui.QFont()
- font.setFamily("Yu Gothic UI")
- font.setPointSize(10)
- font.setBold(False)
- font.setWeight(50)
- self.button_motor_down.setFont(font)
- self.button_motor_down.setStyleSheet("color: rgb(0, 0, 0);\n"
- "")
- self.button_motor_down.setObjectName("button_motor_down")
- self.retranslateUi(Form)
- QtCore.QMetaObject.connectSlotsByName(Form)
- def retranslateUi(self, Form):
- _translate = QtCore.QCoreApplication.translate
- Form.setWindowTitle(_translate("Form", "CAM G5 Testbench Tool"))
- self.groupBox_cam_mono.setTitle(_translate("Form", "Camera Color videostream"))
- self.groupBox_cam_mono_2.setTitle(_translate("Form", "Camera Image Capture"))
- self.groupBox_cam_mono_6.setTitle(_translate("Form", "Main Tool"))
- self.label_13.setText(_translate("Form", "<html><head/><body><p><span style=\" font-size:10pt; font-weight:600; color:#ffffff;\">SHARPNESS IS OK</span></p></body></html>"))
- self.button_capture.setText(_translate("Form", "Capture "))
- self.button_videostream.setText(_translate("Form", "Videostream"))
- self.label_ROI_3.setText(_translate("Form", "<html><head/><body><p><span style=\" font-weight:600;\">Hostname Camera :</span></p></body></html>"))
- self.txt_hostname.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
- "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
- "p, li { white-space: pre-wrap; }\n"
- "</style></head><body style=\" font-family:\'Yu Gothic UI\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
- "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"))
- self.button_connect.setText(_translate("Form", "Connect"))
- self.label_ROI_11.setText(_translate("Form", "<html><head/><body><p><span style=\" font-weight:600;\">Sensor selection :</span></p></body></html>"))
- self.radioButton_color.setText(_translate("Form", "Color"))
- self.radioButton_bw.setText(_translate("Form", "Black and White"))
- self.groupBox_cam_mono_7.setTitle(_translate("Form", "Flash Board Control"))
- self.label_14.setText(_translate("Form", "<html><head/><body><p><span style=\" font-size:10pt; font-weight:600; color:#ffffff;\">SHARPNESS IS OK</span></p></body></html>"))
- self.label_ROI.setText(_translate("Form", "<html><head/><body><p><span style=\" font-weight:600;\">Flash Intensity :</span></p></body></html>"))
- self.label_ROI_2.setText(_translate("Form", "<html><head/><body><p><span style=\" font-weight:600;\">Flash Control :</span></p></body></html>"))
- self.button_flash_on.setText(_translate("Form", "On"))
- self.button_flash_off.setText(_translate("Form", "Off"))
- self.label_ROI_4.setText(_translate("Form", "<html><head/><body><p><span style=\" font-weight:600;\">IR LED Current :</span></p></body></html>"))
- self.label_ROI_5.setText(_translate("Form", "<html><head/><body><p><span style=\" font-weight:600;\">IR LED Voltage :</span></p></body></html>"))
- self.label_ROI_7.setText(_translate("Form", "<html><head/><body><p>[A]</p></body></html>"))
- self.label_ROI_8.setText(_translate("Form", "<html><head/><body><p>[V]</p></body></html>"))
- self.label_ROI_10.setText(_translate("Form", "<html><head/><body><p><span style=\" font-weight:600;\">Photodiode threshold :</span></p></body></html>"))
- self.button_led_red_off.setText(_translate("Form", "Off"))
- self.label_ROI_39.setText(_translate("Form", "<html><head/><body><p><span style=\" font-weight:600;\">LED Red :</span></p></body></html>"))
- self.button_led_red_on.setText(_translate("Form", "On"))
- self.label_ROI_6.setText(_translate("Form", "<html><head/><body><p><span style=\" font-weight:600;\">Photodiode Voltage :</span></p></body></html>"))
- self.label_ROI_9.setText(_translate("Form", "<html><head/><body><p>[V]</p></body></html>"))
- self.label_ROI_12.setText(_translate("Form", "Vin Vsense :"))
- self.label_ROI_13.setText(_translate("Form", "Boost Vsense :"))
- self.label_ROI_14.setText(_translate("Form", "Cap Vsense :"))
- self.label_ROI_15.setText(_translate("Form", "<html><head/><body><p>[V]</p></body></html>"))
- self.label_ROI_16.setText(_translate("Form", "<html><head/><body><p>[V]</p></body></html>"))
- self.label_ROI_17.setText(_translate("Form", "<html><head/><body><p>[V]</p></body></html>"))
- self.label_intensity.setText(_translate("Form", "11"))
- self.label_threshold.setText(_translate("Form", "11"))
- self.groupBox_cam_mono_8.setTitle(_translate("Form", "GPS Management"))
- self.label_15.setText(_translate("Form", "<html><head/><body><p><span style=\" font-size:10pt; font-weight:600; color:#ffffff;\">SHARPNESS IS OK</span></p></body></html>"))
- self.label_ROI_23.setText(_translate("Form", "<html><head/><body><p><span style=\" font-weight:600;\">UTC Time :</span></p></body></html>"))
- self.label_ROI_24.setText(_translate("Form", "<html><head/><body><p><span style=\" font-weight:600;\">Date Time :</span></p></body></html>"))
- self.label_hour.setText(_translate("Form", "11"))
- self.label_date.setText(_translate("Form", "11"))
- self.label_ROI_25.setText(_translate("Form", "<html><head/><body><p><span style=\" font-weight:600;\">Latitude :</span></p></body></html>"))
- self.label_ROI_26.setText(_translate("Form", "<html><head/><body><p><span style=\" font-weight:600;\">Longitude :</span></p></body></html>"))
- self.label_latitude.setText(_translate("Form", "11.1111111"))
- self.label_ROI_29.setText(_translate("Form", "<html><head/><body><p><span style=\" font-weight:600;\">GPS GGA Fix :</span></p></body></html>"))
- self.label_ROI_30.setText(_translate("Form", "<html><head/><body><p><span style=\" font-weight:600;\">GPS RMC State :</span></p></body></html>"))
- self.label_gga_fix.setText(_translate("Form", "Invalid"))
- self.label_rmc_state.setText(_translate("Form", "Invalid"))
- self.label_longitude.setText(_translate("Form", "11.1111111"))
- self.groupBox_cam_mono_11.setTitle(_translate("Form", "STM32 Reset / Flash"))
- self.label_19.setText(_translate("Form", "<html><head/><body><p><span style=\" font-size:10pt; font-weight:600; color:#ffffff;\">SHARPNESS IS OK</span></p></body></html>"))
- self.button_flash_prog.setText(_translate("Form", "Flash ยตC"))
- self.button_configurate.setText(_translate("Form", "GPIO Config"))
- self.button_reset.setText(_translate("Form", "Reset ยตC"))
- self.groupBox_cam_mono_9.setTitle(_translate("Form", "Sensor Parameters"))
- self.label_17.setText(_translate("Form", "<html><head/><body><p><span style=\" font-size:10pt; font-weight:600; color:#ffffff;\">SHARPNESS IS OK</span></p></body></html>"))
- self.txt_gain.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
- "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
- "p, li { white-space: pre-wrap; }\n"
- "</style></head><body style=\" font-family:\'Yu Gothic UI\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
- "<p align=\"center\" style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"))
- self.label_ROI_18.setText(_translate("Form", "Time Exposure :"))
- self.button_set_exposure.setText(_translate("Form", "Set"))
- self.button_set_gain.setText(_translate("Form", "Set"))
- self.txt_exposure.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
- "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
- "p, li { white-space: pre-wrap; }\n"
- "</style></head><body style=\" font-family:\'Yu Gothic UI\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
- "<p align=\"center\" style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"))
- self.label_ROI_19.setText(_translate("Form", "Gain :"))
- self.button_motor_stop.setText(_translate("Form", "S"))
- self.button_motor_right.setText(_translate("Form", ">"))
- self.button_motor_left.setText(_translate("Form", "<"))
- self.button_motor_up.setText(_translate("Form", "^"))
- self.button_motor_down.setText(_translate("Form", "v"))
- # Complement init
- self.label_latitude.clear()
- self.label_longitude.clear()
- self.label_hour.clear()
- self.label_gga_fix.clear()
- self.label_rmc_state.clear()
- self.label_date.clear()
- self.label_ir_current.clear()
- self.label_ir_voltage.clear()
- self.label_photodiode_voltage.clear()
- #Buttons
- self.button_led_red_on.clicked.connect(self.led_red_on)
- self.button_led_red_off.clicked.connect(self.led_red_off)
- self.button_flash_on.clicked.connect(self.flash_on)
- self.button_flash_off.clicked.connect(self.flash_off)
- self.button_flash_prog.clicked.connect(self.flash_prog)
- self.button_reset.clicked.connect(self.reset_stm32)
- self.button_connect.clicked.connect(self.connect_camera)
- self.button_configurate.clicked.connect(self.config_gpio)
- self.button_capture.clicked.connect(self.cam_capture)
- self.button_videostream.clicked.connect(self.videostream)
- self.button_motor_down.clicked.connect(self.motor_move_down)
- self.button_motor_up.clicked.connect(self.motor_move_up)
- self.button_motor_left.clicked.connect(self.motor_move_left)
- self.button_motor_right.clicked.connect(self.motor_move_right)
- self.button_motor_stop.clicked.connect(self.motor_move_stop)
- self.flash_slider.valueChanged.connect(self.set_flash_intensity)
- self.photodiode_slider.valueChanged.connect(self.set_photodiode_threshold)
- self.flash_intensity = 0
- self.threshold = 0
- self.server_ok = 0
- self.camera_capture = 0
- self.ser_flash = ''
- self.ser_gps = ''
- self.label_intensity.setText("0 %")
- self.label_threshold.setText("0 V")
- self.txt_hostname.setAlignment(QtCore.Qt.AlignCenter)
- self.progress_bar.setValue(0)
- #
- # Flash Intensity Setting
- #
- def set_photodiode_threshold(self):
- try :
- self.threshold = round(((self.photodiode_slider.value() / 100)*3.3) , 2)
- self.label_threshold.setText(str(self.threshold) + " V")
- command = "python G5_TestBench/send_serial_flash.py 60 "+str(self.photodiode_slider.value())
- self.ssh.exec_command(command)
- except :
- print("Error Setting Photodiode Threshold !")
- pass
- #
- # Flash Intensity Setting
- #
- def set_flash_intensity(self):
- try:
- self.flash_intensity = int(self.flash_slider.value())
- self.label_intensity.setText(str(self.flash_intensity)+ " %")
- command = "python G5_TestBench/send_serial_flash.py 50 "+str(self.flash_intensity)
- self.ssh.exec_command(command)
- except :
- print("Error Setting Flash Intensity !")
- pass
- #
- # MOTOR MOVE UP
- #
- def motor_move_up(self):
- try :
- self.button_motor_down.setStyleSheet("color: rgb(0, 0, 0);")
- self.button_motor_up.setStyleSheet(blue)
- self.button_motor_left.setStyleSheet("color: rgb(0, 0, 0);")
- self.button_motor_right.setStyleSheet("color: rgb(0, 0, 0);")
- self.button_motor_stop.setStyleSheet("color: rgb(0, 0, 0);")
- self.txt_shell_con = ""
- command = "sudo -S -p '' bash G5_TestBench/MOVE_MOTOR_UP"
- stdin, stdout, stderr = self.ssh.exec_command(command)
- stdin.write('nvidia' + "\n")
- stdin.flush()
- stdin.close()
- out_updt = list()
- cnt = 0
- for line in iter(lambda: stdout.readline(2048), ""):
- cnt = cnt + 1
- print(line, end="")
- out_updt.append(self.txt_shell_con + " > " + line)
- self.progress_bar.setValue(cnt)
- self.label_shell.setText("".join(out_updt))
- self.label_shell.adjustSize()
- self.scrollArea_shell.verticalScrollBar().setValue(
- self.scrollArea_shell.verticalScrollBar().maximum())
- QtGui.QGuiApplication.processEvents()
- if cnt == 100:
- cnt = 0
- self.progress_bar.setValue(100)
- except :
- pass
- #
- # MOTOR MOVE DOWN
- #
- def motor_move_down(self):
- try :
- self.button_motor_down.setStyleSheet(blue)
- self.button_motor_up.setStyleSheet("color: rgb(0, 0, 0);")
- self.button_motor_left.setStyleSheet("color: rgb(0, 0, 0);")
- self.button_motor_right.setStyleSheet("color: rgb(0, 0, 0);")
- self.button_motor_stop.setStyleSheet("color: rgb(0, 0, 0);")
- self.txt_shell_con = ""
- command = "sudo -S -p '' bash G5_TestBench/MOVE_MOTOR_DOWN"
- stdin, stdout, stderr = self.ssh.exec_command(command)
- stdin.write('nvidia' + "\n")
- stdin.flush()
- stdin.close()
- out_updt = list()
- cnt = 0
- for line in iter(lambda: stdout.readline(2048), ""):
- cnt = cnt + 1
- print(line, end="")
- out_updt.append(self.txt_shell_con + " > " + line)
- self.progress_bar.setValue(cnt)
- self.label_shell.setText("".join(out_updt))
- self.label_shell.adjustSize()
- self.scrollArea_shell.verticalScrollBar().setValue(
- self.scrollArea_shell.verticalScrollBar().maximum())
- QtGui.QGuiApplication.processEvents()
- if cnt == 100:
- cnt = 0
- self.progress_bar.setValue(100)
- except :
- pass
- #
- # MOTOR MOVE RIGHT
- #
- def motor_move_left(self):
- try :
- self.button_motor_down.setStyleSheet("color: rgb(0, 0, 0);")
- self.button_motor_up.setStyleSheet("color: rgb(0, 0, 0);")
- self.button_motor_left.setStyleSheet(blue)
- self.button_motor_right.setStyleSheet("color: rgb(0, 0, 0);")
- self.button_motor_stop.setStyleSheet("color: rgb(0, 0, 0);")
- self.txt_shell_con = ""
- command = "sudo -S -p '' bash G5_TestBench/MOVE_MOTOR_LEFT"
- stdin, stdout, stderr = self.ssh.exec_command(command)
- stdin.write('nvidia' + "\n")
- stdin.flush()
- stdin.close()
- out_updt = list()
- cnt = 0
- for line in iter(lambda: stdout.readline(2048), ""):
- cnt = cnt + 1
- print(line, end="")
- out_updt.append(self.txt_shell_con + " > " + line)
- self.progress_bar.setValue(cnt)
- self.label_shell.setText("".join(out_updt))
- self.label_shell.adjustSize()
- self.scrollArea_shell.verticalScrollBar().setValue(
- self.scrollArea_shell.verticalScrollBar().maximum())
- QtGui.QGuiApplication.processEvents()
- if cnt == 100:
- cnt = 0
- self.progress_bar.setValue(100)
- except :
- pass
- #
- # MOTOR MOVE RIGHT
- #
- def motor_move_right(self):
- try :
- self.button_motor_down.setStyleSheet("color: rgb(0, 0, 0);")
- self.button_motor_up.setStyleSheet("color: rgb(0, 0, 0);")
- self.button_motor_left.setStyleSheet("color: rgb(0, 0, 0);")
- self.button_motor_right.setStyleSheet(blue)
- self.button_motor_stop.setStyleSheet("color: rgb(0, 0, 0);")
- self.txt_shell_con = ""
- command = "sudo -S -p '' bash G5_TestBench/MOVE_MOTOR_RIGHT"
- stdin, stdout, stderr = self.ssh.exec_command(command)
- stdin.write('nvidia' + "\n")
- stdin.flush()
- stdin.close()
- out_updt = list()
- cnt = 0
- for line in iter(lambda: stdout.readline(2048), ""):
- cnt = cnt + 1
- print(line, end="")
- out_updt.append(self.txt_shell_con + " > " + line)
- self.progress_bar.setValue(cnt)
- self.label_shell.setText("".join(out_updt))
- self.label_shell.adjustSize()
- self.scrollArea_shell.verticalScrollBar().setValue(
- self.scrollArea_shell.verticalScrollBar().maximum())
- QtGui.QGuiApplication.processEvents()
- if cnt == 100:
- cnt = 0
- self.progress_bar.setValue(100)
- except :
- pass
- #
- # MOTOR STOP
- #
- def motor_move_stop(self):
- try :
- self.button_motor_down.setStyleSheet("color: rgb(0, 0, 0);")
- self.button_motor_up.setStyleSheet("color: rgb(0, 0, 0);")
- self.button_motor_left.setStyleSheet("color: rgb(0, 0, 0);")
- self.button_motor_right.setStyleSheet("color: rgb(0, 0, 0);")
- self.button_motor_stop.setStyleSheet(blue)
- self.txt_shell_con = ""
- command = "sudo -S -p '' bash G5_TestBench/STOP_MOTORS"
- stdin, stdout, stderr = self.ssh.exec_command(command)
- stdin.write('nvidia' + "\n")
- stdin.flush()
- stdin.close()
- out_updt = list()
- cnt = 0
- for line in iter(lambda: stdout.readline(2048), ""):
- cnt = cnt + 1
- print(line, end="")
- out_updt.append(self.txt_shell_con + " > " + line)
- self.progress_bar.setValue(cnt)
- self.label_shell.setText("".join(out_updt))
- self.label_shell.adjustSize()
- self.scrollArea_shell.verticalScrollBar().setValue(
- self.scrollArea_shell.verticalScrollBar().maximum())
- QtGui.QGuiApplication.processEvents()
- if cnt == 100:
- cnt = 0
- self.progress_bar.setValue(100)
- except :
- pass
- #
- # LED RED ON
- #
- def led_red_on(self):
- self.button_led_red_on.setStyleSheet(blue)
- self.button_led_red_off.setStyleSheet("color: rgb(0, 0, 0);")
- try :
- self.txt_shell_con = ""
- command = "sudo -S -p '' bash G5_TestBench/LED_RED_ON"
- stdin, stdout, stderr = self.ssh.exec_command(command)
- stdin.write('nvidia' + "\n")
- stdin.flush()
- stdin.close()
- out_updt = list()
- cnt = 0
- for line in iter(lambda: stdout.readline(2048), ""):
- cnt = cnt + 1
- print(line, end="")
- out_updt.append(self.txt_shell_con + " > " + line)
- self.progress_bar.setValue(cnt)
- self.label_shell.setText("".join(out_updt))
- self.label_shell.adjustSize()
- self.scrollArea_shell.verticalScrollBar().setValue(self.scrollArea_shell.verticalScrollBar().maximum())
- QtGui.QGuiApplication.processEvents()
- if cnt == 100:
- cnt = 0
- self.progress_bar.setValue(100)
- except :
- pass
- #
- # LED RED OFF
- #
- def led_red_off(self):
- self.button_led_red_off.setStyleSheet(blue)
- self.button_led_red_on.setStyleSheet("color: rgb(0, 0, 0);")
- try :
- self.txt_shell_con = ""
- command = "sudo -S -p '' bash G5_TestBench/LED_RED_OFF"
- stdin, stdout, stderr = self.ssh.exec_command(command)
- stdin.write('nvidia' + "\n")
- stdin.flush()
- stdin.close()
- out_updt = list()
- cnt = 0
- for line in iter(lambda: stdout.readline(2048), ""):
- cnt = cnt + 1
- print(line, end="")
- out_updt.append(self.txt_shell_con + " > " + line)
- self.progress_bar.setValue(cnt)
- self.label_shell.setText("".join(out_updt))
- self.label_shell.adjustSize()
- self.scrollArea_shell.verticalScrollBar().setValue(self.scrollArea_shell.verticalScrollBar().maximum())
- QtGui.QGuiApplication.processEvents()
- if cnt == 100:
- cnt = 0
- self.progress_bar.setValue(100)
- except :
- pass
- #
- # FLASH ON
- #
- def flash_on(self):
- self.button_flash_on.setStyleSheet(blue)
- self.button_flash_off.setStyleSheet("color: rgb(0, 0, 0);")
- try :
- command = "python G5_TestBench/send_serial_flash.py 30"
- self.ssh.exec_command(command)
- except :
- print("Error Sending Flash ON !")
- pass
- #
- # FLASH OFF
- #
- def flash_off(self):
- self.button_flash_off.setStyleSheet(blue)
- self.button_flash_on.setStyleSheet("color: rgb(0, 0, 0);")
- try :
- command = "python G5_TestBench/send_serial_flash.py 40"
- self.ssh.exec_command(command)
- except :
- print("Error Sending Flash OFF !")
- pass
- #
- # TEST MODE ENABLE
- #
- def test_mode_enable(self):
- try :
- self.txt_shell_con = ""
- except :
- pass
- #
- # TEST MODE DISABLE
- #
- def test_mode_disable(self):
- try :
- self.txt_shell_con = ""
- except :
- pass
- #
- # CAMERA IMAGE CAPTURE
- #
- def cam_capture(self):
- try :
- self.label_cam_capture.show()
- self.camera_capture = 1
- except :
- pass
- #
- # STM32 FLASH PROGRAMMATION
- #
- def flash_prog(self):
- try :
- # GPIO Configuration TX1
- self.txt_shell_con = ""
- command = "sudo -S -p '' bash G5_TestBench/STM32_FLASH"
- stdin, stdout, stderr = self.ssh.exec_command(command)
- stdin.write('nvidia' + "\n")
- stdin.flush()
- stdin.close()
- out_updt = list()
- cnt = 0
- for line in iter(lambda: stdout.readline(2048), ""):
- cnt = cnt + 1
- print(line, end="")
- out_updt.append(self.txt_shell_con + " > " + line)
- self.progress_bar.setValue(cnt)
- self.label_shell.setText("".join(out_updt))
- self.label_shell.adjustSize()
- self.scrollArea_shell.verticalScrollBar().setValue(self.scrollArea_shell.verticalScrollBar().maximum())
- QtGui.QGuiApplication.processEvents()
- if cnt == 100:
- cnt = 0
- self.progress_bar.setValue(100)
- except :
- pass
- #
- # RESET ยตC STM32
- #
- def reset_stm32(self):
- try :
- # Reset STM32
- self.txt_shell_con = ""
- command = "sudo -S -p '' bash G5_TestBench/RESET_STM32"
- stdin, stdout, stderr = self.ssh.exec_command(command)
- stdin.write('nvidia' + "\n")
- stdin.flush()
- out_updt = list()
- cnt = 0
- for line in iter(lambda: stdout.readline(2048), ""):
- cnt = cnt + 1
- print(line, end="")
- out_updt.append(self.txt_shell_con + " > " + line)
- self.progress_bar.setValue(cnt)
- self.label_shell.setText("".join(out_updt))
- self.label_shell.adjustSize()
- self.scrollArea_shell.verticalScrollBar().setValue(self.scrollArea_shell.verticalScrollBar().maximum())
- QtGui.QGuiApplication.processEvents()
- if cnt == 100:
- cnt = 0
- self.progress_bar.setValue(100)
- except :
- pass
- #
- # CAMERA CONNECTION with hostname
- #
- def connect_camera(self):
- try :
- self.ssh = paramiko.SSHClient()
- self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- self.hostname = self.txt_hostname.toPlainText()
- self.ipadress = socket.gethostbyname(self.hostname)
- self.ssh.connect(self.ipadress, username='nvidia', password='nvidia', timeout=3)
- self.txt_hostname.setStyleSheet(green)
- print("******************************************************")
- print(" Camera "+self.hostname+" connected ! ")
- print("******************************************************")
- print("")
- self.test_mode_enable()
- # Threading for Serial receive
- self.thread_3_cancelled = False
- self.thread_3 = Thread(target=self.tx1_read_serial)
- self.thread_3.start()
- print("Camera initialised")
- print("")
- except :
- self.txt_hostname.setStyleSheet(red)
- print("******************************************************")
- print(" Camera " + self.hostname + " connection failed ! ")
- print("******************************************************")
- print("")
- #
- # Videostream Threading
- #
- def videostream(self):
- try :
- #self.launch_mjpeg_demo()
- # Threading for streaming
- self.thread_1_cancelled = False
- self.thread_1 = Thread(target=self.start_stream_camera)
- self.thread_1.start()
- except :
- pass
- #
- # Gpio Configuration for Jetson TX1
- #
- def config_gpio(self):
- try :
- # GPIO Configuration TX1
- self.txt_shell_con = ""
- command = "sudo -S -p '' bash G5_TestBench/TX1_GPIO_EXPORT"
- stdin, stdout, stderr = self.ssh.exec_command(command)
- stdin.write('nvidia' + "\n")
- stdin.flush()
- stdin.close()
- out_updt = list()
- cnt = 0
- for line in iter(lambda: stdout.readline(2048), ""):
- cnt = cnt + 1
- print(line, end="")
- out_updt.append(self.txt_shell_con+" > "+line)
- self.progress_bar.setValue(cnt)
- self.label_shell.setText("".join(out_updt))
- self.label_shell.adjustSize()
- self.scrollArea_shell.verticalScrollBar().setValue(self.scrollArea_shell.verticalScrollBar().maximum())
- QtGui.QGuiApplication.processEvents()
- if cnt == 100:
- cnt = 0
- self.progress_bar.setValue(100)
- #self.test_mode_enable()
- except :
- pass
- #
- # Videostream Threading
- #
- def start_stream_camera(self):
- # Check if color or bw sensor is selectionned
- if self.radioButton_color.isChecked():
- print('http://' + self.hostname + ':1340/?action=stream')
- self.stream = urlopen('http://' + self.hostname + ':1340/?action=stream')
- if self.radioButton_bw.isChecked():
- print('http://' + self.hostname + ':1339/?action=stream')
- self.stream = urlopen('http://' + self.hostname + ':1339/?action=stream')
- bytes = b''
- while not self.thread_1_cancelled:
- try:
- bytes += self.stream.read(1024)
- a = bytes.find(b'\xff\xd8')
- b = bytes.find(b'\xff\xd9')
- if a != -1 and b != -1:
- jpg = bytes[a:b + 2]
- bytes = bytes[b + 2:]
- self.img = cv2.imdecode(np.fromstring(jpg, dtype=np.uint8), cv2.IMREAD_COLOR)
- self.displayImage_Stream(self.img , self.label_cam_stream)
- if(self.camera_capture == 1):
- self.displayImage_Stream(self.img, self.label_cam_capture)
- #cv2.imwrite("C:\G5_Tool\G5_Stream_Tool\captures\Capture_Flash"+self.flash_intensity+".jpg", self.img)
- self.camera_capture = 0
- print("Image captured from the camera !")
- self.server_ok = 1
- except:
- print("Thread 1 Crash !")
- self.server_ok = 0
- self.thread_1_cancelled = True
- pass
- #
- # Display Images from Mjpeg streamer
- #
- def displayImage_Stream(self, img, label):
- # COLOR Camera treatment
- qformat = QImage.Format_RGB888
- # Display video streaming
- label.show()
- out_cam_color = QImage(img, img.shape[1], img.shape[0], img.strides[0], qformat)
- out_cam_color = out_cam_color.rgbSwapped()
- label.setPixmap(QPixmap.fromImage(out_cam_color))
- label.setScaledContents(True)
- #
- # Thread 3
- # Serial Reading from TX1 ttyTHS1
- #
- def tx1_read_serial(self):
- print('GPS Management start !')
- print('ADC Management start !')
- self.label_ir_current.show()
- self.label_boost_vsense.show()
- self.label_cap_vsense.show()
- self.label_photodiode_voltage.show()
- self.label_vin_vsense.show()
- self.label_ir_voltage.show()
- while not self.thread_3_cancelled:
- try:
- command = "python G5_TestBench/tx1_read_file.py G5_TestBench/gps_state.txt"
- stdin, stdout, stderr = self.ssh.exec_command(command)
- stdin.close()
- for line in iter(lambda: stdout.readline(2048), ""):
- #print(line, end="")
- self.gps_infos_read(line)
- except ThreadError:
- print("Thread 3 Crash !")
- self.thread_3_cancelled = True
- try:
- command = "python G5_TestBench/tx1_read_file.py G5_TestBench/adc_state.txt"
- stdin, stdout, stderr = self.ssh.exec_command(command)
- stdin.close()
- for line in iter(lambda: stdout.readline(2048), ""):
- #print(line, end="")
- self.adc_infos_read(line)
- except ThreadError:
- print("Thread 3 Crash !")
- self.thread_3_cancelled = True
- #
- # Read and display gps infos
- #
- def gps_infos_read(self, str):
- try :
- gps_info = str.split(';')
- # Protocol [GGA_Fix;RMC_State;Hour;Minute;Seconde;Day;Month;Year;Latitude;Latitude_NS;Longitude;Longitude_EW]
- gps_fix = gps_info[0]
- gps_state = gps_info[1]
- gps_hour = gps_info[2]
- gps_minute = gps_info[3]
- gps_seconde = gps_info[4]
- gps_day = gps_info[5]
- gps_month = gps_info[6]
- gps_year = "20"+gps_info[7]
- gps_latitude = gps_info[8]
- gps_longitude = gps_info[9]
- if (len(gps_hour) == 1):
- gps_hour = "0"+gps_hour
- if (len(gps_minute) == 1):
- gps_minute = "0"+gps_minute
- if (len(gps_seconde) == 1):
- gps_seconde = "0"+gps_seconde
- if (len(gps_day) == 1):
- gps_day = "0"+gps_day
- if (len(gps_year) == 1):
- gps_year = "0"+gps_year
- self.label_gga_fix.setText(gps_fix)
- self.label_rmc_state.setText(gps_state)
- if gps_state == "GPS Active":
- #Month
- gps_month_str = ""
- if (gps_month == "9"): gps_month_str = "September"
- if (gps_month == "10"): gps_month_str = "October"
- if (gps_month == "11"): gps_month_str = "November"
- if (gps_month == "12"): gps_month_str = "December"
- if (gps_month == "1"): gps_month_str = "January"
- if (gps_month == "2"): gps_month_str = "February"
- if (gps_month == "3"): gps_month_str = "March"
- if (gps_month == "4"): gps_month_str = "April"
- if (gps_month == "5"): gps_month_str = "May"
- if (gps_month == "6"): gps_month_str = "June"
- if (gps_month == "7"): gps_month_str = "July"
- if (gps_month == "8"): gps_month_str = "August"
- #Edit Labels on Window Tool
- self.label_hour.setText(gps_hour+" : "+gps_minute+" : "+gps_seconde)
- self.label_date.setText(gps_day+" "+gps_month_str+" "+gps_year)
- self.label_latitude.setText(gps_latitude)
- self.label_longitude.setText(gps_longitude)
- except :
- pass
- #
- # Read and display adc infos
- #
- def adc_infos_read(self, str):
- try :
- adc_info = str.split(';')
- # Protocole [Vin_Vsense ; Boost_Vsense ; Cap_Vsense ; Switch_Imon ; Light_Vsense ; Led_Vsense ; Led_Isense ; Pot_Flash_Duty]
- vin_vsense = adc_info[0]
- boost_vsense = adc_info[1]
- cap_vsense = adc_info[2]
- switch_imon = adc_info[3]
- light_vsense = adc_info[4]
- led_vsense = adc_info[5]
- led_isense = adc_info[6]
- pot_flash_duty = adc_info[7]
- self.label_ir_current.setText(led_isense)
- self.label_boost_vsense.setText(boost_vsense)
- self.label_cap_vsense.setText(cap_vsense)
- self.label_photodiode_voltage.setText(light_vsense)
- self.label_vin_vsense.setText(vin_vsense)
- self.label_ir_voltage.setText(led_vsense)
- except :
- pass
- #
- # close window
- #
- def close_window(self):
- app = QtWidgets.QApplication(sys.argv)
- app.exec_()
- print("")
- print("******************************************")
- print("* *")
- print("* G5_Stream_Tool Closed ! *")
- print("* *")
- print("******************************************")
- print("")
- self.thread_1_cancelled = true
- self.test_mode_disable()
- self.ssh.close()
- #
- # Main prog
- #
- if __name__ == "__main__":
- import sys
- app = QtWidgets.QApplication(sys.argv)
- Form = QtWidgets.QWidget()
- ui = Ui_Form()
- ui.setupUi(Form)
- Form.showMaximized()
- sys.exit(ui.close_window())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement