Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Read installation instructions:

The general approach is simple:

1. Install PyQt5 for Python 3 using your OS' package manager (e.g. APT).
1. Install PyQt6 for Python 3 using your OS' package manager (e.g. APT).
2. Install the application itself from Git via PIP:
`pip3 install git+https://github.com/DroneCAN/gui_tool@master`
(it is not necessary to clone this repository manually).
Expand All @@ -39,7 +39,7 @@ but it may come in handy when using the embedded IPython console.

```bash
sudo apt-get install -y python3-pip python3-setuptools python3-wheel
sudo apt-get install -y python3-numpy python3-pyqt5 python3-pyqt5.qtsvg git-core
sudo apt-get install -y python3-numpy python3-pyqt6 python3-pyqt6.qtsvg git-core
python3 -m pip install git+https://github.com/DroneCAN/gui_tool@master
```

Expand All @@ -58,7 +58,7 @@ If you're still unable to install the package, please open a ticket.

#### Fedora 29+
```bash
sudo dnf install python3-PyQt5
sudo dnf install python3-PyQt6
python3 -m pip install git+https://github.com/DroneCAN/gui_tool@master
```

Expand Down Expand Up @@ -87,7 +87,7 @@ as these ports are supported much better at the moment.
```bash
brew install python3
brew postinstall python3
pip3 install PyQt5
pip3 install PyQt6
pip3 install git+https://github.com/DroneCAN/gui_tool@master
dronecan_gui_tool
```
Expand All @@ -100,7 +100,7 @@ If you're prompted to install Command Line Developer Tools, agree.

```bash
sudo port selfupdate
sudo port install curl-ca-bundle py35-pip py35-pyqt5 py35-numpy
sudo port install curl-ca-bundle py35-pip py35-pyqt6 py35-numpy
python3.5 -m pip install git+https://github.com/DroneCAN/gui_tool@master
```

Expand Down
2 changes: 1 addition & 1 deletion dronecan_gui_tool/active_data_type_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import logging
import dronecan
from PyQt5.QtCore import pyqtSignal, QObject
from PyQt6.QtCore import pyqtSignal, QObject


logger = logging.getLogger(__name__)
Expand Down
6 changes: 3 additions & 3 deletions dronecan_gui_tool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@

import dronecan

from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout, QSplitter, QAction
from PyQt5.QtGui import QKeySequence, QDesktopServices
from PyQt5.QtCore import QTimer, Qt, QUrl
from PyQt6.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout, QSplitter
from PyQt6.QtGui import QKeySequence, QDesktopServices, QAction
from PyQt6.QtCore import QTimer, Qt, QUrl

from .setup_window import run_setup_window
from .active_data_type_detector import ActiveDataTypeDetector
Expand Down
4 changes: 2 additions & 2 deletions dronecan_gui_tool/panels/RTK_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

import dronecan
from functools import partial
from PyQt5.QtWidgets import QGridLayout, QWidget, QLabel, QDialog, \
from PyQt6.QtWidgets import QGridLayout, QWidget, QLabel, QDialog, \
QVBoxLayout, QGroupBox
from PyQt5.QtCore import Qt, QTimer
from PyQt6.QtCore import Qt, QTimer
from ..widgets import get_icon
from ..widgets import table_display
from . import rtcm3
Expand Down
4 changes: 2 additions & 2 deletions dronecan_gui_tool/panels/RemoteID_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

import dronecan
from functools import partial
from PyQt5.QtWidgets import QVBoxLayout, QWidget, QLabel, QDialog, \
from PyQt6.QtWidgets import QVBoxLayout, QWidget, QLabel, QDialog, \
QPlainTextEdit, QPushButton, QLineEdit, QFileDialog, QComboBox, QHBoxLayout
from PyQt5.QtCore import QTimer, Qt
from PyQt6.QtCore import QTimer, Qt
from logging import getLogger
from ..widgets import make_icon_button, get_icon, get_monospace_font, directory_selection
import random
Expand Down
4 changes: 2 additions & 2 deletions dronecan_gui_tool/panels/actuator_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

import dronecan
from functools import partial
from PyQt5.QtWidgets import QVBoxLayout, QHBoxLayout, QWidget, QLabel, QDialog, QSlider, QSpinBox, QDoubleSpinBox, QCheckBox, \
from PyQt6.QtWidgets import QVBoxLayout, QHBoxLayout, QWidget, QLabel, QDialog, QSlider, QSpinBox, QDoubleSpinBox, QCheckBox, \
QPlainTextEdit
from PyQt5.QtCore import QTimer, Qt
from PyQt6.QtCore import QTimer, Qt
from logging import getLogger
from ..widgets import make_icon_button, get_icon, get_monospace_font

Expand Down
6 changes: 3 additions & 3 deletions dronecan_gui_tool/panels/esc_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

import dronecan
from functools import partial
from PyQt5.QtWidgets import QVBoxLayout, QHBoxLayout, QWidget, QLabel, QDialog, QSlider, QSpinBox, QDoubleSpinBox, \
from PyQt6.QtWidgets import QVBoxLayout, QHBoxLayout, QWidget, QLabel, QDialog, QSlider, QSpinBox, QDoubleSpinBox, \
QPlainTextEdit, QCheckBox
from PyQt5.QtCore import QTimer, Qt
from PyQt6.QtCore import QTimer, Qt
from logging import getLogger
from ..widgets import make_icon_button, get_icon, get_monospace_font
import sip
from PyQt6 import sip
import time
import math

Expand Down
4 changes: 2 additions & 2 deletions dronecan_gui_tool/panels/hobbywing_esc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

import dronecan
from functools import partial
from PyQt5.QtWidgets import QVBoxLayout, QWidget, QLabel, QDialog, \
from PyQt6.QtWidgets import QVBoxLayout, QWidget, QLabel, QDialog, \
QPlainTextEdit, QPushButton, QLineEdit, QFileDialog, QComboBox, QHBoxLayout, QSpinBox
from PyQt5.QtCore import QTimer, Qt
from PyQt6.QtCore import QTimer, Qt
from logging import getLogger
from ..widgets import make_icon_button, get_icon, get_monospace_font
from ..widgets import table_display
Expand Down
8 changes: 4 additions & 4 deletions dronecan_gui_tool/panels/rc_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

import dronecan
from functools import partial
from PyQt5.QtWidgets import QWidget, QLabel, QDialog, \
from PyQt6.QtWidgets import QWidget, QLabel, QDialog, \
QVBoxLayout, QHBoxLayout, QSlider, QSpinBox, QPushButton
from PyQt5.QtGui import QPainter, QPen, QColor, QFont
from PyQt5.QtCore import Qt, pyqtSignal, QPointF, QRectF
from PyQt5 import sip
from PyQt6.QtGui import QPainter, QPen, QColor, QFont
from PyQt6.QtCore import Qt, pyqtSignal, QPointF, QRectF
from PyQt6 import sip
from ..widgets import get_icon

__all__ = 'PANEL_NAME', 'spawn', 'get_icon'
Expand Down
4 changes: 2 additions & 2 deletions dronecan_gui_tool/panels/serial_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

import dronecan
from functools import partial
from PyQt5.QtWidgets import QGridLayout, QWidget, QLabel, QDialog, \
from PyQt6.QtWidgets import QGridLayout, QWidget, QLabel, QDialog, \
QTableWidget, QVBoxLayout, QGroupBox, QTableWidgetItem, QLineEdit, \
QComboBox, QHBoxLayout, QSpinBox, QCheckBox
from PyQt5.QtCore import Qt, QTimer
from PyQt6.QtCore import Qt, QTimer
from ..widgets import get_icon
from . import rtcm3
import time
Expand Down
4 changes: 2 additions & 2 deletions dronecan_gui_tool/panels/stats_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

import dronecan
from functools import partial
from PyQt5.QtWidgets import QGridLayout, QWidget, QLabel, QDialog, \
from PyQt6.QtWidgets import QGridLayout, QWidget, QLabel, QDialog, \
QVBoxLayout, QGroupBox, QLineEdit, QPushButton
from PyQt5.QtCore import Qt, QTimer
from PyQt6.QtCore import Qt, QTimer
from ..widgets import get_icon
from ..widgets import table_display
from . import rtcm3
Expand Down
8 changes: 4 additions & 4 deletions dronecan_gui_tool/setup_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
import threading
import copy
from .widgets import show_error, get_monospace_font, directory_selection
from PyQt5.QtWidgets import QComboBox, QCompleter, QDialog, QDirModel, QFileDialog, QGroupBox, QHBoxLayout, QLabel, \
from PyQt6.QtWidgets import QComboBox, QCompleter, QDialog, QFileDialog, QGroupBox, QHBoxLayout, QLabel, \
QLineEdit, QPushButton, QSpinBox, QVBoxLayout, QGridLayout, QCheckBox, QWidget
from PyQt5.QtCore import Qt, QTimer
from PyQt5.QtGui import QIntValidator
from PyQt6.QtCore import Qt, QTimer
from PyQt6.QtGui import QIntValidator
from logging import getLogger
from collections import OrderedDict
from itertools import count
Expand Down Expand Up @@ -95,7 +95,7 @@ def list_ifaces():
return out
else:
# Windows, Mac, whatever
from PyQt5 import QtSerialPort
from PyQt6 import QtSerialPort

out = OrderedDict()
for port in QtSerialPort.QSerialPortInfo.availablePorts():
Expand Down
6 changes: 3 additions & 3 deletions dronecan_gui_tool/widgets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
import re
import queue
import importlib.resources
from PyQt5.QtWidgets import QTableWidget, QTableWidgetItem, QAbstractItemView, QHeaderView, QApplication, QWidget, \
from PyQt6.QtWidgets import QTableWidget, QTableWidgetItem, QAbstractItemView, QHeaderView, QApplication, QWidget, \
QComboBox, QCompleter, QPushButton, QHBoxLayout, QVBoxLayout, QMessageBox, QLineEdit
from PyQt5.QtCore import Qt, QTimer, QStringListModel
from PyQt5.QtGui import QColor, QKeySequence, QFont, QFontInfo, QIcon
from PyQt6.QtCore import Qt, QTimer, QStringListModel
from PyQt6.QtGui import QColor, QKeySequence, QFont, QFontInfo, QIcon
from logging import getLogger
import qtawesome
from functools import partial
Expand Down
8 changes: 4 additions & 4 deletions dronecan_gui_tool/widgets/about_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
import dronecan
from ..version import __version__
from . import get_icon, get_app_icon
from PyQt5.QtWidgets import QDialog, QTableWidget, QVBoxLayout, QHBoxLayout, QPushButton, QLabel, \
from PyQt6.QtWidgets import QDialog, QTableWidget, QVBoxLayout, QHBoxLayout, QPushButton, QLabel, \
QTableWidgetItem, QHeaderView
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import Qt, PYQT_VERSION_STR, QSize
from PyQt6.QtGui import QIcon
from PyQt6.QtCore import Qt, PYQT_VERSION_STR, QSize


ABOUT_TEXT = ('''
Expand Down Expand Up @@ -41,7 +41,7 @@ def _list_3rd_party():

return [
('PyDroneCAN', dronecan.__version__, 'MIT', 'http://dronecan.org/Implementations/Pydronecan'),
('PyQt5', PYQT_VERSION_STR, 'GPLv3', 'https://www.riverbankcomputing.com/software/pyqt/intro'),
('PyQt6', PYQT_VERSION_STR, 'GPLv3', 'https://www.riverbankcomputing.com/software/pyqt/intro'),
('PyQtGraph', pyqtgraph.__version__, 'MIT', 'http://www.pyqtgraph.org/'),
('QtAwesome', qtawesome.__version__, 'MIT', 'https://github.com/spyder-ide/qtawesome'),
('QtConsole', qtconsole_version, 'BSD', 'http://jupyter.org'),
Expand Down
4 changes: 2 additions & 2 deletions dronecan_gui_tool/widgets/bus_monitor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import queue
import logging
import multiprocessing
from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import QTimer
from PyQt6.QtWidgets import QApplication
from PyQt6.QtCore import QTimer
from .window import BusMonitorWindow

logger = logging.getLogger(__name__)
Expand Down
8 changes: 4 additions & 4 deletions dronecan_gui_tool/widgets/bus_monitor/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
from functools import partial
import dronecan
from dronecan.driver import CANFrame
from PyQt5.QtWidgets import QMainWindow, QHeaderView, QLabel, QSplitter, QSizePolicy, QWidget, QHBoxLayout, \
QPlainTextEdit, QDialog, QVBoxLayout, QMenu, QAction
from PyQt5.QtGui import QColor, QIcon, QTextOption
from PyQt5.QtCore import Qt, QTimer
from PyQt6.QtWidgets import QMainWindow, QHeaderView, QLabel, QSplitter, QSizePolicy, QWidget, QHBoxLayout, \
QPlainTextEdit, QDialog, QVBoxLayout, QMenu
from PyQt6.QtGui import QColor, QIcon, QTextOption, QAction
from PyQt6.QtCore import Qt, QTimer
from pyqtgraph import PlotWidget, mkPen
from logging import getLogger
from .. import BasicTable, map_7bit_to_color, RealtimeLogWidget, get_monospace_font, get_icon, flash, get_app_icon, \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Author: Pavel Kirienko <pavel.kirienko@zubax.com>
#

from PyQt5.QtWidgets import QProgressDialog, QMessageBox
from PyQt6.QtWidgets import QProgressDialog, QMessageBox
from . import slcan_cli


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

import re
import os
from PyQt5.QtWidgets import QLabel, QDoubleSpinBox, QHBoxLayout, QVBoxLayout, QDialog, QTabWidget, QWidget, \
from PyQt6.QtWidgets import QLabel, QDoubleSpinBox, QHBoxLayout, QVBoxLayout, QDialog, QTabWidget, QWidget, \
QCheckBox, QStatusBar, QHeaderView, QTableWidgetItem, QSpinBox, QLineEdit, QComboBox, QCompleter, QPlainTextEdit
from PyQt5.QtCore import QTimer, Qt
from PyQt6.QtCore import QTimer, Qt
from logging import getLogger
import yaml

Expand Down
4 changes: 2 additions & 2 deletions dronecan_gui_tool/widgets/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

import sys
import logging
from PyQt5.QtWidgets import QDialog, QVBoxLayout, QHBoxLayout, QComboBox, QLabel, QCheckBox
from PyQt5.QtCore import QTimer, Qt
from PyQt6.QtWidgets import QDialog, QVBoxLayout, QHBoxLayout, QComboBox, QLabel, QCheckBox
from PyQt6.QtCore import QTimer, Qt

logger = logging.getLogger(__name__)

Expand Down
9 changes: 6 additions & 3 deletions dronecan_gui_tool/widgets/directory_selection.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from PyQt5.QtWidgets import QGroupBox, QLineEdit, QCompleter, QPushButton, QDirModel, QHBoxLayout, QFileDialog
from PyQt5.QtCore import Qt
from PyQt6.QtWidgets import QGroupBox, QLineEdit, QCompleter, QPushButton, QHBoxLayout, QFileDialog
from PyQt6.QtCore import Qt, QDir
from PyQt6.QtGui import QFileSystemModel

class DirectorySelectionWidget(QGroupBox):
def __init__(self, parent, label, path=None, directory_only=False):
Expand All @@ -9,8 +10,10 @@ def __init__(self, parent, label, path=None, directory_only=False):
dir_textbox.setText(self._selection)

dir_text_completer = QCompleter(self)
model = QFileSystemModel(dir_text_completer)
model.setRootPath(QDir.rootPath())
dir_text_completer.setCaseSensitivity(Qt.CaseSensitive)
dir_text_completer.setModel(QDirModel(self))
dir_text_completer.setModel(model)
dir_textbox.setCompleter(dir_text_completer)

def on_edit():
Expand Down
11 changes: 7 additions & 4 deletions dronecan_gui_tool/widgets/dynamic_node_id_allocator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
#

import dronecan
from PyQt5.QtWidgets import QGroupBox, QVBoxLayout, QHBoxLayout, QHeaderView, QPushButton, QFileDialog, \
QCompleter, QDirModel
from PyQt5.QtCore import QTimer
from PyQt6.QtWidgets import QGroupBox, QVBoxLayout, QHBoxLayout, QHeaderView, QPushButton, QFileDialog, \
QCompleter
from PyQt6.QtCore import QTimer, QDir
from PyQt6.QtGui import QFileSystemModel
from logging import getLogger
from . import BasicTable, get_monospace_font, get_icon, show_error, CommitableComboBoxWithHistory, make_icon_button

Expand Down Expand Up @@ -62,7 +63,9 @@ def __init__(self, parent, node, node_monitor):
on_clicked=self._on_select_database_file)

db_file_completer = QCompleter()
db_file_completer.setModel(QDirModel(db_file_completer))
model = QFileSystemModel(db_file_completer)
model.setRootPath(QDir.rootPath())
db_file_completer.setModel(model)
self._database_file.setCompleter(db_file_completer)

self._sync_gui()
Expand Down
9 changes: 6 additions & 3 deletions dronecan_gui_tool/widgets/file_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
import zlib
import base64
import struct
from PyQt5.QtWidgets import QGroupBox, QVBoxLayout, QHBoxLayout, QWidget, QDirModel, QCompleter, QFileDialog, QLabel
from PyQt5.QtCore import QTimer
from PyQt6.QtWidgets import QGroupBox, QVBoxLayout, QHBoxLayout, QWidget, QCompleter, QFileDialog, QLabel
from PyQt6.QtCore import QTimer, QDir
from PyQt6.QtGui import QFileSystemModel
from logging import getLogger
from . import make_icon_button, CommitableComboBoxWithHistory, get_icon, flash, LabelWithIcon

Expand Down Expand Up @@ -42,7 +43,9 @@ def __init__(self, parent, default=None):
on_clicked=lambda: self.on_remove(self))

completer = QCompleter(self)
completer.setModel(QDirModel(completer))
model = QFileSystemModel(completer)
model.setRootPath(QDir.rootPath())
completer.setModel(model)

self._path_bar = CommitableComboBoxWithHistory(self)
if default:
Expand Down
4 changes: 2 additions & 2 deletions dronecan_gui_tool/widgets/local_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#

import dronecan
from PyQt5.QtWidgets import QGroupBox, QLabel, QSpinBox, QHBoxLayout, QCheckBox
from PyQt5.QtCore import QTimer
from PyQt6.QtWidgets import QGroupBox, QLabel, QSpinBox, QHBoxLayout, QCheckBox
from PyQt6.QtCore import QTimer
from logging import getLogger
from . import make_icon_button, flash

Expand Down
4 changes: 2 additions & 2 deletions dronecan_gui_tool/widgets/log_message_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

import dronecan
import datetime
from PyQt5.QtWidgets import QGroupBox, QVBoxLayout, QHBoxLayout, QHeaderView, QPushButton, QLabel
from PyQt5.QtCore import Qt
from PyQt6.QtWidgets import QGroupBox, QVBoxLayout, QHBoxLayout, QHeaderView, QPushButton, QLabel
from PyQt6.QtCore import Qt
from logging import getLogger
from . import BasicTable, RealtimeLogWidget

Expand Down
4 changes: 2 additions & 2 deletions dronecan_gui_tool/widgets/node_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import datetime
import dronecan
from . import BasicTable, get_monospace_font
from PyQt5.QtWidgets import QGroupBox, QVBoxLayout, QHeaderView, QLabel
from PyQt5.QtCore import Qt, QTimer, pyqtSignal
from PyQt6.QtWidgets import QGroupBox, QVBoxLayout, QHeaderView, QLabel
from PyQt6.QtCore import Qt, QTimer, pyqtSignal
from logging import getLogger


Expand Down
Loading
Loading