Merge branch 'qt-gui-update' of https://github.com/CopterExpress/clever-show into qt-gui-update

This commit is contained in:
Artem30801
2020-01-20 19:32:50 +03:00
3 changed files with 12 additions and 11 deletions

View File

@@ -36,7 +36,7 @@ def get_id(filepath="animation.csv"):
try:
animation_file = open(filepath)
except IOError:
logger.error("File {} can't be opened".format(filepath))
logger.debug("File {} can't be opened".format(filepath))
anim_id = "No animation"
return anim_id
else:
@@ -57,7 +57,7 @@ def get_start_xy(filepath="animation.csv", x_ratio=1, y_ratio=1, z_ratio=1):
try:
animation_file = open(filepath)
except IOError:
logger.error("File {} can't be opened".format(filepath))
logger.debug("File {} can't be opened".format(filepath))
anim_id = "No animation"
return float('nan'), float('nan')
else:
@@ -89,7 +89,7 @@ def load_animation(filepath="animation.csv", x0=0, y0=0, z0=0, x_ratio=1, y_rati
try:
animation_file = open(filepath)
except IOError:
logging.error("File {} can't be opened".format(filepath))
logger.debug("File {} can't be opened".format(filepath))
anim_id = "No animation"
else:
with animation_file:

View File

@@ -2,17 +2,17 @@ config_name = string(default='Copter config')
config_version = float(default=0.0)
[SERVER]
port = integer(default=25000)
port = integer(default=25000, min=1)
host = ip_addr(default=192.168.1.101) # string?
buffer_size = integer(default=1024)
[BROADCAST]
use = boolean(default=True)
port = integer(default=8181)
port = integer(default=8181, min=1)
[TELEMETRY]
transmit = boolean(default=True)
frequency = float(default=1.0)
frequency = float(default=1.0, min=0)
log_resources = boolean(default=True)
[VISUAL POSE WATCHDOG]
@@ -31,9 +31,10 @@ frame_id = string(default=map)
takeoff_height = float(default=1.0)
takeoff_time = float(default=5.0, min=0)
safe_takeoff = boolean(default=False)
reach_first_point_time = float(default=5.0)
reach_first_point_time = float(default=5.0, min=0)
land_time = float(default=1.0, min=0)
land_timeout = float(default=10.0, min=0)
# __list__ x y z
common_offset = float_list(default=list(0, 0, 0), min=3, max=3)
[FLOOR FRAME]
@@ -75,4 +76,4 @@ restart_after_rename = boolean(default=True)
[NTP]
use = boolean(default=False)
host = string(default=ntp1.stratum2.ru)
port = integer(default=123)
port = integer(default=123, min=1)

View File

@@ -5,7 +5,7 @@ from functools import partial
from copy import deepcopy
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import Qt as Qt, pyqtSlot
from PyQt5.QtCore import Qt, pyqtSlot
from PyQt5.QtGui import QCursor
from PyQt5.QtWidgets import QAbstractItemView, QTreeView, QMenu, QAction, QMessageBox, QInputDialog, QFileDialog
@@ -23,8 +23,8 @@ import config
states_colors = {
'normal': Qt.white,
'unchanged': Qt.darkGray,
'default': Qt.lightGray,
'unchanged': Qt.blue,
'default': Qt.cyan,
'edited': Qt.yellow,
'added': Qt.green,
'deleted': Qt.red,