|
|
@ -14,6 +14,9 @@ from findpath_UI import *
|
|
|
|
from Screenshot.Screenshot_Gui import *
|
|
|
|
from Screenshot.Screenshot_Gui import *
|
|
|
|
import qdarkstyle
|
|
|
|
import qdarkstyle
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../../PaddleClas-release-2.3")
|
|
|
|
|
|
|
|
import Tello.KeyboardControl as KeyControl
|
|
|
|
|
|
|
|
|
|
|
|
class Ui_MainWindow(object):
|
|
|
|
class Ui_MainWindow(object):
|
|
|
|
def setupUi(self, MainWindow):
|
|
|
|
def setupUi(self, MainWindow):
|
|
|
|
MainWindow.setObjectName("MainWindow")
|
|
|
|
MainWindow.setObjectName("MainWindow")
|
|
|
@ -203,6 +206,13 @@ class Ui_MainWindow(object):
|
|
|
|
self.toolBar.addAction(self.actionicon_3)
|
|
|
|
self.toolBar.addAction(self.actionicon_3)
|
|
|
|
self.actionicon_2.triggered.connect(lambda: self.path())
|
|
|
|
self.actionicon_2.triggered.connect(lambda: self.path())
|
|
|
|
self.actionicon_3.triggered.connect(lambda: self.video())
|
|
|
|
self.actionicon_3.triggered.connect(lambda: self.video())
|
|
|
|
|
|
|
|
self.pushButton_7.clicked.connect(lambda: self.connect())
|
|
|
|
|
|
|
|
self.pushButton_3.clicked.connect(lambda: self.up())
|
|
|
|
|
|
|
|
self.pushButton_6.clicked.connect(lambda: self.down())
|
|
|
|
|
|
|
|
self.pushButton.clicked.connect(lambda: self.forward())
|
|
|
|
|
|
|
|
self.pushButton_4.clicked.connect(lambda: self.right())
|
|
|
|
|
|
|
|
self.pushButton_2.clicked.connect(lambda: self.left())
|
|
|
|
|
|
|
|
self.pushButton_5.clicked.connect(lambda: self.Return())
|
|
|
|
self.retranslateUi(MainWindow)
|
|
|
|
self.retranslateUi(MainWindow)
|
|
|
|
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
|
|
|
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
|
|
|
|
|
|
|
|
|
|
@ -216,6 +226,29 @@ class Ui_MainWindow(object):
|
|
|
|
self.ui = Ui_MainWindow2()
|
|
|
|
self.ui = Ui_MainWindow2()
|
|
|
|
self.ui.show()
|
|
|
|
self.ui.show()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def connect(self):
|
|
|
|
|
|
|
|
KeyControl.connect()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def up(self):
|
|
|
|
|
|
|
|
KeyControl.getKeyboardInput("UP")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def down(self):
|
|
|
|
|
|
|
|
KeyControl.getKeyboardInput("DOWN")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def forward(self):
|
|
|
|
|
|
|
|
KeyControl.getKeyboardInput("i")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def right(self):
|
|
|
|
|
|
|
|
KeyControl.getKeyboardInput("l")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def left(self):
|
|
|
|
|
|
|
|
KeyControl.getKeyboardInput("j")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def Return(self):
|
|
|
|
|
|
|
|
KeyControl.getKeyboardInput("a")
|
|
|
|
|
|
|
|
KeyControl.getKeyboardInput("dffsfdsa")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def retranslateUi(self, MainWindow):
|
|
|
|
def retranslateUi(self, MainWindow):
|
|
|
|
_translate = QtCore.QCoreApplication.translate
|
|
|
|
_translate = QtCore.QCoreApplication.translate
|
|
|
|
MainWindow.setWindowTitle(_translate("MainWindow", "无人机路径生成系统"))
|
|
|
|
MainWindow.setWindowTitle(_translate("MainWindow", "无人机路径生成系统"))
|
|
|
|