mirror of
https://github.com/yoboujon/dumber.git
synced 2025-06-08 13:50:49 +02:00
Merge de la version fonctionnelle du moniteur (commit c513609
)
This commit is contained in:
parent
fdf163b7bb
commit
4edfad777b
4 changed files with 636 additions and 296 deletions
|
@ -13,35 +13,100 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
|||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.resize(928, 629)
|
||||
MainWindow.resize(985, 745)
|
||||
MainWindow.setMinimumSize(QtCore.QSize(985, 745))
|
||||
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName("centralwidget")
|
||||
self.horizontalLayout_6 = QtWidgets.QHBoxLayout(self.centralwidget)
|
||||
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
|
||||
self.widget = QtWidgets.QWidget(self.centralwidget)
|
||||
self.widget.setGeometry(QtCore.QRect(20, 16, 947, 671))
|
||||
self.widget.setObjectName("widget")
|
||||
self.horizontalLayout_7 = QtWidgets.QHBoxLayout(self.widget)
|
||||
self.horizontalLayout_7.setContentsMargins(0, 0, 0, 0)
|
||||
self.horizontalLayout_7.setObjectName("horizontalLayout_7")
|
||||
self.verticalLayout_4 = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout_4.setObjectName("verticalLayout_4")
|
||||
self.checkBox_enableCamera = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.checkBox_enableCamera.setObjectName("checkBox_enableCamera")
|
||||
self.verticalLayout_4.addWidget(self.checkBox_enableCamera)
|
||||
self.graphicsView_Image = QtWidgets.QGraphicsView(self.centralwidget)
|
||||
self.graphicsView_Image.setObjectName("graphicsView_Image")
|
||||
self.verticalLayout_4.addWidget(self.graphicsView_Image)
|
||||
self.pushButton_confirmArena = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.pushButton_confirmArena.setObjectName("pushButton_confirmArena")
|
||||
self.verticalLayout_4.addWidget(self.pushButton_confirmArena)
|
||||
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
||||
self.checkBox_enableFPS = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.checkBox_enableCamera = QtWidgets.QCheckBox(self.widget)
|
||||
self.checkBox_enableCamera.setObjectName("checkBox_enableCamera")
|
||||
self.horizontalLayout_3.addWidget(self.checkBox_enableCamera)
|
||||
self.checkBox_enableFPS = QtWidgets.QCheckBox(self.widget)
|
||||
self.checkBox_enableFPS.setObjectName("checkBox_enableFPS")
|
||||
self.horizontalLayout_3.addWidget(self.checkBox_enableFPS)
|
||||
self.checkBox_enablePosition = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.checkBox_enablePosition.setObjectName("checkBox_enablePosition")
|
||||
self.horizontalLayout_3.addWidget(self.checkBox_enablePosition)
|
||||
self.verticalLayout_4.addLayout(self.horizontalLayout_3)
|
||||
self.horizontalLayout_6.addLayout(self.verticalLayout_4)
|
||||
self.label_Image = QtWidgets.QLabel(self.widget)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_Image.sizePolicy().hasHeightForWidth())
|
||||
self.label_Image.setSizePolicy(sizePolicy)
|
||||
self.label_Image.setMinimumSize(QtCore.QSize(640, 480))
|
||||
self.label_Image.setSizeIncrement(QtCore.QSize(1, 1))
|
||||
self.label_Image.setFrameShape(QtWidgets.QFrame.NoFrame)
|
||||
self.label_Image.setText("")
|
||||
self.label_Image.setObjectName("label_Image")
|
||||
self.verticalLayout_4.addWidget(self.label_Image)
|
||||
self.pushButton_confirmArena = QtWidgets.QPushButton(self.widget)
|
||||
self.pushButton_confirmArena.setObjectName("pushButton_confirmArena")
|
||||
self.verticalLayout_4.addWidget(self.pushButton_confirmArena)
|
||||
self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
|
||||
self.checkBox_enablePosition = QtWidgets.QCheckBox(self.widget)
|
||||
self.checkBox_enablePosition.setObjectName("checkBox_enablePosition")
|
||||
self.horizontalLayout_6.addWidget(self.checkBox_enablePosition)
|
||||
self.gridLayout_2 = QtWidgets.QGridLayout()
|
||||
self.gridLayout_2.setObjectName("gridLayout_2")
|
||||
self.label_100 = QtWidgets.QLabel(self.widget)
|
||||
self.label_100.setText("")
|
||||
self.label_100.setPixmap(QtGui.QPixmap("ui/../res/icons8-robot-24.png"))
|
||||
self.label_100.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_100.setObjectName("label_100")
|
||||
self.gridLayout_2.addWidget(self.label_100, 0, 0, 1, 1)
|
||||
self.label_RobotID = QtWidgets.QLabel(self.widget)
|
||||
self.label_RobotID.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_RobotID.setObjectName("label_RobotID")
|
||||
self.gridLayout_2.addWidget(self.label_RobotID, 0, 1, 1, 1)
|
||||
self.label_102 = QtWidgets.QLabel(self.widget)
|
||||
self.label_102.setText("")
|
||||
self.label_102.setPixmap(QtGui.QPixmap("ui/../res/icons8-azimuth-24.png"))
|
||||
self.label_102.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_102.setObjectName("label_102")
|
||||
self.gridLayout_2.addWidget(self.label_102, 1, 0, 1, 1)
|
||||
self.label_RobotAngle = QtWidgets.QLabel(self.widget)
|
||||
self.label_RobotAngle.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_RobotAngle.setObjectName("label_RobotAngle")
|
||||
self.gridLayout_2.addWidget(self.label_RobotAngle, 1, 1, 1, 1)
|
||||
self.label_101 = QtWidgets.QLabel(self.widget)
|
||||
self.label_101.setText("")
|
||||
self.label_101.setPixmap(QtGui.QPixmap("ui/../res/icons8-emplacement-off-24.png"))
|
||||
self.label_101.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_101.setObjectName("label_101")
|
||||
self.gridLayout_2.addWidget(self.label_101, 2, 0, 1, 1)
|
||||
self.label_RobotPos = QtWidgets.QLabel(self.widget)
|
||||
self.label_RobotPos.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_RobotPos.setObjectName("label_RobotPos")
|
||||
self.gridLayout_2.addWidget(self.label_RobotPos, 2, 1, 1, 1)
|
||||
self.label_103 = QtWidgets.QLabel(self.widget)
|
||||
self.label_103.setText("")
|
||||
self.label_103.setPixmap(QtGui.QPixmap("ui/../res/icons8-flèche-haut-gauche-24.png"))
|
||||
self.label_103.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_103.setObjectName("label_103")
|
||||
self.gridLayout_2.addWidget(self.label_103, 3, 0, 1, 1)
|
||||
self.label_RobotDirection = QtWidgets.QLabel(self.widget)
|
||||
self.label_RobotDirection.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_RobotDirection.setObjectName("label_RobotDirection")
|
||||
self.gridLayout_2.addWidget(self.label_RobotDirection, 3, 1, 1, 1)
|
||||
self.horizontalLayout_6.addLayout(self.gridLayout_2)
|
||||
self.verticalLayout_4.addLayout(self.horizontalLayout_6)
|
||||
self.horizontalLayout_7.addLayout(self.verticalLayout_4)
|
||||
self.verticalLayout_6 = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout_6.setObjectName("verticalLayout_6")
|
||||
self.groupBox_connection = QtWidgets.QGroupBox(self.centralwidget)
|
||||
self.groupBox_activation = QtWidgets.QGroupBox(self.widget)
|
||||
self.groupBox_activation.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.groupBox_activation.setObjectName("groupBox_activation")
|
||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox_activation)
|
||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||
self.groupBox_connection = QtWidgets.QGroupBox(self.groupBox_activation)
|
||||
self.groupBox_connection.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.groupBox_connection.setFlat(False)
|
||||
self.groupBox_connection.setCheckable(False)
|
||||
|
@ -102,12 +167,7 @@ class Ui_MainWindow(object):
|
|||
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
self.line.setObjectName("line")
|
||||
self.verticalLayout.addWidget(self.line)
|
||||
self.verticalLayout_6.addWidget(self.groupBox_connection)
|
||||
self.groupBox_activation = QtWidgets.QGroupBox(self.centralwidget)
|
||||
self.groupBox_activation.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.groupBox_activation.setObjectName("groupBox_activation")
|
||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox_activation)
|
||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||
self.verticalLayout_2.addWidget(self.groupBox_connection)
|
||||
self.checkBox_watchdog = QtWidgets.QCheckBox(self.groupBox_activation)
|
||||
self.checkBox_watchdog.setObjectName("checkBox_watchdog")
|
||||
self.verticalLayout_2.addWidget(self.checkBox_watchdog)
|
||||
|
@ -120,7 +180,7 @@ class Ui_MainWindow(object):
|
|||
self.line_2.setObjectName("line_2")
|
||||
self.verticalLayout_2.addWidget(self.line_2)
|
||||
self.verticalLayout_6.addWidget(self.groupBox_activation)
|
||||
self.groupBox_mouvments = QtWidgets.QGroupBox(self.centralwidget)
|
||||
self.groupBox_mouvments = QtWidgets.QGroupBox(self.widget)
|
||||
self.groupBox_mouvments.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.groupBox_mouvments.setObjectName("groupBox_mouvments")
|
||||
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.groupBox_mouvments)
|
||||
|
@ -149,7 +209,7 @@ class Ui_MainWindow(object):
|
|||
self.line_3.setObjectName("line_3")
|
||||
self.verticalLayout_3.addWidget(self.line_3)
|
||||
self.verticalLayout_6.addWidget(self.groupBox_mouvments)
|
||||
self.groupBox_AnswerandBattery = QtWidgets.QGroupBox(self.centralwidget)
|
||||
self.groupBox_AnswerandBattery = QtWidgets.QGroupBox(self.widget)
|
||||
self.groupBox_AnswerandBattery.setObjectName("groupBox_AnswerandBattery")
|
||||
self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.groupBox_AnswerandBattery)
|
||||
self.verticalLayout_5.setObjectName("verticalLayout_5")
|
||||
|
@ -168,10 +228,10 @@ class Ui_MainWindow(object):
|
|||
self.verticalLayout_6.addWidget(self.groupBox_AnswerandBattery)
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout_6.addItem(spacerItem)
|
||||
self.horizontalLayout_6.addLayout(self.verticalLayout_6)
|
||||
self.horizontalLayout_7.addLayout(self.verticalLayout_6)
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
self.menubar = QtWidgets.QMenuBar(MainWindow)
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 928, 22))
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 985, 22))
|
||||
self.menubar.setObjectName("menubar")
|
||||
self.menu_Quitter = QtWidgets.QMenu(self.menubar)
|
||||
self.menu_Quitter.setObjectName("menu_Quitter")
|
||||
|
@ -195,15 +255,19 @@ class Ui_MainWindow(object):
|
|||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "Robot Monitor"))
|
||||
self.checkBox_enableCamera.setText(_translate("MainWindow", "Enable Ca&mera"))
|
||||
self.pushButton_confirmArena.setText(_translate("MainWindow", "Co&nfirme arena border..."))
|
||||
self.checkBox_enableFPS.setText(_translate("MainWindow", "Enable &FPS"))
|
||||
self.pushButton_confirmArena.setText(_translate("MainWindow", "Co&nfirme arena border..."))
|
||||
self.checkBox_enablePosition.setText(_translate("MainWindow", "Enable Pos&ition"))
|
||||
self.label_RobotID.setText(_translate("MainWindow", "No robot (-1)"))
|
||||
self.label_RobotAngle.setText(_translate("MainWindow", "0.0°"))
|
||||
self.label_RobotPos.setText(_translate("MainWindow", "(0.0, 0.0)"))
|
||||
self.label_RobotDirection.setText(_translate("MainWindow", "(0.0, 0.0)"))
|
||||
self.groupBox_activation.setTitle(_translate("MainWindow", "Robot Activation"))
|
||||
self.groupBox_connection.setTitle(_translate("MainWindow", "Connection"))
|
||||
self.label.setText(_translate("MainWindow", "Address:"))
|
||||
self.label_2.setText(_translate("MainWindow", "Port:"))
|
||||
self.label_3.setText(_translate("MainWindow", "Status:"))
|
||||
self.label_connectionStatus.setText(_translate("MainWindow", "Not connected"))
|
||||
self.groupBox_activation.setTitle(_translate("MainWindow", "Robot Activation"))
|
||||
self.checkBox_watchdog.setText(_translate("MainWindow", "Start with &watchdog"))
|
||||
self.pushButton_start.setText(_translate("MainWindow", "Start r&obot"))
|
||||
self.groupBox_mouvments.setTitle(_translate("MainWindow", "Mouvments"))
|
||||
|
|
|
@ -1,27 +1,34 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from email.message import Message
|
||||
from email.policy import Policy
|
||||
import os
|
||||
|
||||
import time
|
||||
import sys
|
||||
from tkinter import Image
|
||||
|
||||
from PyQt5 import (QtCore, QtWidgets)
|
||||
from PyQt5 import (QtCore, QtWidgets, QtGui)
|
||||
|
||||
from main_window import Ui_MainWindow
|
||||
from log_dialog import Ui_Dialog
|
||||
from network import *
|
||||
from globvar import GlobVar
|
||||
|
||||
import base64
|
||||
|
||||
class Window(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
_msg_dialog= None
|
||||
_batteryTimer=None
|
||||
_FPSTimer=None
|
||||
|
||||
fps=0
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
self.setupUi(self)
|
||||
|
||||
self.DisableUIWidgets("Network")
|
||||
#self.DisableUIWidgets("Network")
|
||||
|
||||
self.lineEdit_address.setText(GlobVar.address)
|
||||
self.lineEdit_port.setText(str(GlobVar.port))
|
||||
|
@ -30,6 +37,8 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
self._msg_dialog.ui= Ui_Dialog()
|
||||
self._msg_dialog.ui.setupUi(self._msg_dialog)
|
||||
|
||||
self.fps=0
|
||||
|
||||
self.networkThread = Network()
|
||||
|
||||
self.connectSignalSlots()
|
||||
|
@ -41,6 +50,10 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
self._batteryTimer = QtCore.QTimer()
|
||||
self._batteryTimer.timeout.connect(self.OnBatteryTimeout)
|
||||
|
||||
# Create fps timer
|
||||
self._FPSTimer = QtCore.QTimer()
|
||||
self._FPSTimer.timeout.connect(self.OnFPSTimeout)
|
||||
|
||||
def connectSignalSlots(self):
|
||||
# Buttons
|
||||
self.pushButton_start.pressed.connect(self.OnButtonPress_Start)
|
||||
|
@ -78,7 +91,7 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
def EnableUIWidgets(self, area):
|
||||
if area == "Network":
|
||||
self.groupBox_activation.setDisabled(False)
|
||||
self.graphicsView_Image.setDisabled(False)
|
||||
self.label_Image.setDisabled(False)
|
||||
self.pushButton_confirmArena.setDisabled(False)
|
||||
self.checkBox_enableCamera.setDisabled(False)
|
||||
self.checkBox_enableFPS.setDisabled(False)
|
||||
|
@ -90,7 +103,7 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
def DisableUIWidgets(self, area):
|
||||
if area == "Network":
|
||||
self.groupBox_activation.setDisabled(True)
|
||||
self.graphicsView_Image.setDisabled(True)
|
||||
self.label_Image.setDisabled(True)
|
||||
self.pushButton_confirmArena.setDisabled(True)
|
||||
self.checkBox_enableCamera.setDisabled(True)
|
||||
self.checkBox_enableFPS.setDisabled(True)
|
||||
|
@ -131,16 +144,19 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
msg.warning(self,'Invalid answer', 'Server answer was not acknowledged. Maybe robot is still running', msg.Ok)
|
||||
|
||||
self.pushButton_start.setText("Start r&obot")
|
||||
self.DisableUIWidgets("Robot")
|
||||
#self.DisableUIWidgets("Robot")
|
||||
|
||||
@QtCore.pyqtSlot()
|
||||
def OnButtonPress_ConfirmArena(self):
|
||||
self.networkThread.cameraAskArena()
|
||||
msg= QtWidgets.QMessageBox
|
||||
ret = msg.question(self, '', 'Arena boundaries are correctly detected ?',msg.Yes| msg.No)
|
||||
|
||||
if ret == msg.Yes:
|
||||
self.networkThread.cameraConfirmArena()
|
||||
print ("Answer is YES")
|
||||
else:
|
||||
self.networkThread.cameraInfirmArena()
|
||||
print ("Answer is NO")
|
||||
|
||||
@QtCore.pyqtSlot()
|
||||
|
@ -165,21 +181,26 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
|
||||
@QtCore.pyqtSlot(int)
|
||||
def OnCheckBoxChanged_EnableCamera(self, state):
|
||||
msg= QtWidgets.QMessageBox
|
||||
msg.information(self, 'Feature not ready', 'Feature not yet available', msg.Ok)
|
||||
self.checkBox_enableCamera.setChecked(False)
|
||||
if self.checkBox_enableCamera.isChecked():
|
||||
self.networkThread.cameraOpen()
|
||||
else:
|
||||
self.networkThread.cameraClose()
|
||||
|
||||
@QtCore.pyqtSlot(int)
|
||||
def OnCheckBoxChanged_EnableFPS(self, state):
|
||||
msg= QtWidgets.QMessageBox
|
||||
msg.information(self, 'Feature not ready', 'Feature not yet available', msg.Ok)
|
||||
self.checkBox_enableFPS.setChecked(False)
|
||||
if state !=0:
|
||||
self._FPSTimer.start(1000)
|
||||
self.checkBox_enableFPS.setText("FPS (0)")
|
||||
else:
|
||||
self._FPSTimer.stop()
|
||||
self.checkBox_enableFPS.setText("Enable FPS")
|
||||
|
||||
@QtCore.pyqtSlot(int)
|
||||
def OnCheckBoxChanged_EnablePosition(self, state):
|
||||
msg= QtWidgets.QMessageBox
|
||||
msg.information(self, 'Feature not ready', 'Feature not yet available', msg.Ok)
|
||||
self.checkBox_enablePosition.setChecked(False)
|
||||
if self.checkBox_enablePosition.isChecked():
|
||||
self.networkThread.cameraGetPosition()
|
||||
else:
|
||||
self.networkThread.cameraStopPosition()
|
||||
|
||||
@QtCore.pyqtSlot(int)
|
||||
def OnCheckBoxChanged_GetBattery(self, state):
|
||||
|
@ -229,13 +250,82 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
self.checkBox_getBattery.setText ("Get battery (2 = full)")
|
||||
else:
|
||||
self.checkBox_getBattery.setText ("Get battery (invalid value)")
|
||||
|
||||
elif Network.CAMERA_IMAGE in s:
|
||||
#print ("Image received")
|
||||
#print ("Date received: " + s)
|
||||
|
||||
self.fps=self.fps+1
|
||||
str_split = s.split(':')
|
||||
try:
|
||||
image_jpg= base64.b64decode(str_split[1])
|
||||
img = QtGui.QImage.fromData(image_jpg, "jpg")
|
||||
im_pixmap = QtGui.QPixmap(QtGui.QPixmap.fromImage(img))
|
||||
|
||||
#print ("Image size: " + str(im_pixmap.width()) + "x" + str(im_pixmap.height()))
|
||||
|
||||
self.label_Image.setPixmap(im_pixmap)
|
||||
self.label_Image.setScaledContents(True)
|
||||
self.label_Image.setSizePolicy(QtWidgets.QSizePolicy.Fixed,QtWidgets.QSizePolicy.Fixed)
|
||||
except:
|
||||
pass
|
||||
#print ("Invalid image received")
|
||||
elif Network.CAMERA_POSITION in s:
|
||||
#CPOS:-1;0.000000;0.000000;0.000000;0.000000;0.000000
|
||||
str_split = s.split(':')
|
||||
values_split = str_split[1].split(';')
|
||||
|
||||
try:
|
||||
robot_ID = int(values_split[0]) # Id of robot
|
||||
except:
|
||||
robot_ID = -1
|
||||
|
||||
try:
|
||||
robot_Angle = float(values_split[1]) # angle of robot
|
||||
except:
|
||||
robot_Angle = 0.0
|
||||
|
||||
try:
|
||||
robot_Coord_X = float(values_split[2]) # X coord of robot
|
||||
except:
|
||||
robot_Coord_X = 0.0
|
||||
|
||||
try:
|
||||
robot_Coord_Y = float(values_split[3]) # Y coord of robot
|
||||
except:
|
||||
robot_Coord_Y = 0.0
|
||||
|
||||
try:
|
||||
robot_Cap_X = float(values_split[4]) # X cap of robot
|
||||
except:
|
||||
robot_Cap_X = 0.0
|
||||
|
||||
try:
|
||||
robot_Cap_Y = float(values_split[5]) # Y cap of robot
|
||||
except:
|
||||
robot_Cap_Y = 0.0
|
||||
|
||||
if robot_ID == -1:
|
||||
self.label_RobotID.setText("No robot (-1)")
|
||||
else:
|
||||
self.label_RobotID.setText(values_split[0])
|
||||
|
||||
self.label_RobotAngle.setText("%.2f°" % (robot_Angle))
|
||||
self.label_RobotPos.setText("(%.2f, %.2f)" % (robot_Coord_X, robot_Coord_Y))
|
||||
self.label_RobotDirection.setText("(%.2f, %.2f)" % (robot_Cap_X, robot_Cap_Y))
|
||||
|
||||
# Callback for battery timeout
|
||||
@QtCore.pyqtSlot()
|
||||
def OnBatteryTimeout(self) -> None:
|
||||
# Send a request for battery level. Answer will be done in OnReceptionEvent callback
|
||||
self.networkThread.robotGetBattery()
|
||||
|
||||
# Callback for FPS timeout
|
||||
@QtCore.pyqtSlot()
|
||||
def OnFPSTimeout(self) -> None:
|
||||
# Display current FPS
|
||||
self.checkBox_enableFPS.setText("FPS (" + str(self.fps)+")")
|
||||
self.fps=0
|
||||
|
||||
# Callback for connection/deconnection event from network manager
|
||||
@QtCore.pyqtSlot(int)
|
||||
def OnConnectionEvent(self, event) -> None:
|
||||
|
@ -251,7 +341,7 @@ class Window(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
|
||||
self.label_connectionStatus.setText("Not connected")
|
||||
self.pushButton_start.setText("Start r&obot")
|
||||
self.DisableUIWidgets("Network")
|
||||
#self.DisableUIWidgets("Network")
|
||||
|
||||
# Callback for answer event from network manager
|
||||
@QtCore.pyqtSlot(int)
|
||||
|
|
|
@ -116,8 +116,8 @@ class Network(QtCore.QThread):
|
|||
|
||||
# Private method for connecting to server
|
||||
def __connect(self) -> None:
|
||||
#self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
#self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
|
||||
try:
|
||||
self.sock.connect((GlobVar.address, GlobVar.port))
|
||||
|
@ -126,7 +126,7 @@ class Network(QtCore.QThread):
|
|||
|
||||
# In UDP, no way to know if server is running (connect is always successfull).
|
||||
# So, send a single line feed to ping the server
|
||||
self.sock.send(str.encode("\n"))
|
||||
#self.sock.send(str.encode("\n"))
|
||||
self.waitForAnswer=False
|
||||
|
||||
# Private method for receiving data from server.
|
||||
|
@ -147,6 +147,11 @@ class Network(QtCore.QThread):
|
|||
bytes_recd = bytes_recd + len(chunk)
|
||||
last_char=chunk[-1]
|
||||
|
||||
#print ("")
|
||||
#print ("Data: ")
|
||||
#print (b''.join(chunks))
|
||||
#print ("")
|
||||
|
||||
self.__receiveHandler(b''.join(chunks).decode("utf-8"))
|
||||
chunks = []
|
||||
bytes_recd =0
|
||||
|
@ -315,6 +320,46 @@ class Network(QtCore.QThread):
|
|||
def robotGetBattery(self) -> None:
|
||||
ans = self.__sendCommand(self.ROBOT_GET_BATTERY,False)
|
||||
|
||||
# Send OpenCamera command to server
|
||||
def cameraOpen(self) -> int:
|
||||
ans = self.__sendCommand(self.CAMERA_OPEN, True)
|
||||
decodedAns = self.__decodeAnswer(ans)
|
||||
self.answerEvent.emit(decodedAns)
|
||||
return decodedAns
|
||||
|
||||
# Send CloseCamera command to server
|
||||
def cameraClose(self) -> int:
|
||||
ans = self.__sendCommand(self.CAMERA_CLOSE, True)
|
||||
decodedAns = self.__decodeAnswer(ans)
|
||||
self.answerEvent.emit(decodedAns)
|
||||
return decodedAns
|
||||
|
||||
# Send GetPosition command to server
|
||||
def cameraGetPosition(self) -> int:
|
||||
ans = self.__sendCommand(self.CAMERA_POSITION_COMPUTE, True)
|
||||
decodedAns = self.__decodeAnswer(ans)
|
||||
self.answerEvent.emit(decodedAns)
|
||||
return decodedAns
|
||||
|
||||
# Send StopPosition command to server
|
||||
def cameraStopPosition(self) -> int:
|
||||
ans = self.__sendCommand(self.CAMERA_POSITION_STOP, True)
|
||||
decodedAns = self.__decodeAnswer(ans)
|
||||
self.answerEvent.emit(decodedAns)
|
||||
return decodedAns
|
||||
|
||||
# Send AskArena command to server
|
||||
def cameraAskArena(self) -> None:
|
||||
ans = self.__sendCommand(self.CAMERA_ARENA_ASK,False)
|
||||
|
||||
# Send ConfirmArena command to server
|
||||
def cameraConfirmArena(self) -> None:
|
||||
ans = self.__sendCommand(self.CAMERA_ARENA_CONFIRM,False)
|
||||
|
||||
# Send InfirmArena command to server
|
||||
def cameraInfirmArena(self) -> None:
|
||||
ans = self.__sendCommand(self.CAMERA_ARENA_INFIRM,False)
|
||||
|
||||
# Function for decoding battery level
|
||||
def batterylevelToStr(batlvl: int) -> str:
|
||||
switcher = {
|
||||
|
|
|
@ -6,313 +6,454 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>928</width>
|
||||
<height>629</height>
|
||||
<width>985</width>
|
||||
<height>745</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>985</width>
|
||||
<height>745</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Robot Monitor</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_enableCamera">
|
||||
<property name="text">
|
||||
<string>Enable Ca&mera</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGraphicsView" name="graphicsView_Image"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_confirmArena">
|
||||
<property name="text">
|
||||
<string>Co&nfirme arena border...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_enableFPS">
|
||||
<property name="text">
|
||||
<string>Enable &FPS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_enablePosition">
|
||||
<property name="text">
|
||||
<string>Enable Pos&ition</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_connection">
|
||||
<property name="title">
|
||||
<string>Connection</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<widget class="QWidget" name="">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>16</y>
|
||||
<width>947</width>
|
||||
<height>671</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_address">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<widget class="QCheckBox" name="checkBox_enableCamera">
|
||||
<property name="text">
|
||||
<string>Enable Ca&mera</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Port:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_port">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Status:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_connectionStatus">
|
||||
<property name="text">
|
||||
<string>Not connected</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<widget class="QCheckBox" name="checkBox_enableFPS">
|
||||
<property name="text">
|
||||
<string>Enable &FPS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_activation">
|
||||
<property name="title">
|
||||
<string>Robot Activation</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_Image">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>640</width>
|
||||
<height>480</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="sizeIncrement">
|
||||
<size>
|
||||
<width>1</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_confirmArena">
|
||||
<property name="text">
|
||||
<string>Co&nfirme arena border...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_watchdog">
|
||||
<widget class="QCheckBox" name="checkBox_enablePosition">
|
||||
<property name="text">
|
||||
<string>Start with &watchdog</string>
|
||||
<string>Enable Pos&ition</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_start">
|
||||
<property name="text">
|
||||
<string>Start r&obot</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_mouvments">
|
||||
<property name="title">
|
||||
<string>Mouvments</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_100">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>../res/icons8-robot-24.png</pixmap>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="pushButton_up">
|
||||
<widget class="QLabel" name="label_RobotID">
|
||||
<property name="text">
|
||||
<string>&Up</string>
|
||||
<string>No robot (-1)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="pushButton_left">
|
||||
<widget class="QLabel" name="label_102">
|
||||
<property name="text">
|
||||
<string>&Left</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>../res/icons8-azimuth-24.png</pixmap>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="pushButton_stop">
|
||||
<widget class="QLabel" name="label_RobotAngle">
|
||||
<property name="text">
|
||||
<string>&Stop</string>
|
||||
<string>0.0°</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButton_right">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_101">
|
||||
<property name="text">
|
||||
<string>&Right</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>../res/icons8-emplacement-off-24.png</pixmap>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="pushButton_down">
|
||||
<widget class="QLabel" name="label_RobotPos">
|
||||
<property name="text">
|
||||
<string>&Down</string>
|
||||
<string>(0.0, 0.0)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_AnswerandBattery">
|
||||
<property name="title">
|
||||
<string>Others</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_getBattery">
|
||||
<property name="text">
|
||||
<string>Get &Battery</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_103">
|
||||
<property name="text">
|
||||
<string>Last answer:</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>../res/icons8-flèche-haut-gauche-24.png</pixmap>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_lastAnswer">
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_RobotDirection">
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
<string>(0.0, 0.0)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_activation">
|
||||
<property name="title">
|
||||
<string>Robot Activation</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_connection">
|
||||
<property name="title">
|
||||
<string>Connection</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_address">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Port:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_port">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Status:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_connectionStatus">
|
||||
<property name="text">
|
||||
<string>Not connected</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_watchdog">
|
||||
<property name="text">
|
||||
<string>Start with &watchdog</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_start">
|
||||
<property name="text">
|
||||
<string>Start r&obot</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_mouvments">
|
||||
<property name="title">
|
||||
<string>Mouvments</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="pushButton_up">
|
||||
<property name="text">
|
||||
<string>&Up</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="pushButton_left">
|
||||
<property name="text">
|
||||
<string>&Left</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="pushButton_stop">
|
||||
<property name="text">
|
||||
<string>&Stop</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButton_right">
|
||||
<property name="text">
|
||||
<string>&Right</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="pushButton_down">
|
||||
<property name="text">
|
||||
<string>&Down</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_AnswerandBattery">
|
||||
<property name="title">
|
||||
<string>Others</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_getBattery">
|
||||
<property name="text">
|
||||
<string>Get &Battery</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Last answer:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_lastAnswer">
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>928</width>
|
||||
<width>985</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
Loading…
Add table
Reference in a new issue