mirror of
https://github.com/CopterExpress/clever-show.git
synced 2026-06-08 21:14:31 +00:00
Fix server import
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import os
|
||||
import sys
|
||||
import pickle
|
||||
import logging
|
||||
from ast import literal_eval
|
||||
@@ -10,14 +12,12 @@ from PyQt5.QtGui import QCursor, QKeySequence
|
||||
from PyQt5.QtWidgets import QAbstractItemView, QTreeView, QMenu, QAction, QMessageBox, QInputDialog, QFileDialog, \
|
||||
QShortcut
|
||||
|
||||
import config_editor
|
||||
import modules.ui.config_editor as config_editor
|
||||
|
||||
import sys
|
||||
import os, inspect # Add parent dir to PATH to import messaging_lib
|
||||
|
||||
current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
||||
parent_dir = os.path.dirname(current_dir)
|
||||
sys.path.insert(0, parent_dir)
|
||||
# Add parent dir to PATH to import messaging_lib and config_lib
|
||||
current_dir = (os.path.dirname(os.path.realpath(__file__)))
|
||||
lib_dir = os.path.realpath(os.path.join(current_dir, '../../lib'))
|
||||
sys.path.insert(0, lib_dir)
|
||||
|
||||
import config
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ from PyQt5.QtGui import QCursor
|
||||
from PyQt5.QtWidgets import QTableView, QMessageBox, QMenu, QAction, QWidgetAction, QListWidget, \
|
||||
QAbstractItemView, QListWidgetItem, QVBoxLayout, QHBoxLayout, QPushButton, QInputDialog, QLineEdit, QApplication
|
||||
|
||||
from config_editor_models import ConfigDialog
|
||||
import copter_table_models as table
|
||||
from modules.config_editor_models import ConfigDialog
|
||||
import modules.copter_table_models as table
|
||||
|
||||
|
||||
def save_preset(config, current, header_dict):
|
||||
|
||||
@@ -38,7 +38,7 @@ ConfigOption = collections.namedtuple("ConfigOption", ["section", "option", "val
|
||||
|
||||
|
||||
class Server(messaging.Singleton):
|
||||
def __init__(self, server_id=None, config_path="../config/server.ini"):
|
||||
def __init__(self, config_path="../config/server.ini", server_id=None):
|
||||
self.id = server_id if server_id else str(random.randint(0, 9999)).zfill(4)
|
||||
self.time_started = 0
|
||||
|
||||
|
||||
@@ -381,7 +381,7 @@ class Ui_MainWindow(object):
|
||||
self.reboot_fcu.setText(_translate("MainWindow", "Reboot FCU"))
|
||||
self.calibrate_gyro.setText(_translate("MainWindow", "Calibrate gyro"))
|
||||
self.calibrate_level.setText(_translate("MainWindow", "Calibrate level"))
|
||||
self.menuOptions.setTitle(_translate("MainWindow", "server"))
|
||||
self.menuOptions.setTitle(_translate("MainWindow", "Server"))
|
||||
self.menuMusic_2.setTitle(_translate("MainWindow", "Music"))
|
||||
self.menuTable.setTitle(_translate("MainWindow", "Table"))
|
||||
self.menuDrone_2.setTitle(_translate("MainWindow", "Selected drones"))
|
||||
|
||||
@@ -2,7 +2,7 @@ from PyQt5.QtCore import pyqtSlot
|
||||
from PyQt5.QtGui import QKeySequence
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
import visual_land
|
||||
import modules.ui.visual_land as visual_land
|
||||
import math
|
||||
import logging
|
||||
import sys
|
||||
|
||||
Reference in New Issue
Block a user