Skip to content

Commit

Permalink
Tweak of source code after fork
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbuzz committed Oct 24, 2021
1 parent b0199c5 commit 5010d4a
Show file tree
Hide file tree
Showing 43 changed files with 220 additions and 214 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "uavcan_gui_tool/thirdparty/pyqtgraph"]
path = uavcan_gui_tool/thirdparty/pyqtgraph
url = https://github.com/pyqtgraph/pyqtgraph-core
[submodule "dronecan_gui_tool/thirdparty/pyqtgraph"]
path = dronecan_gui_tool/thirdparty/pyqtgraph
url = https://github.com/pyqtgraph/pyqtgraph
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ deploy:
secure: oX7kxpjb/C1PjeYl3kUWoynCjE7XvcR6nlvXHtRv4X9Jja8EIS4SgYxb1+d6yYI5eCDhyC6q5eMwFVcaAGOw6THnZ3Nx6saYBZf91fdSMWOhvOfqrsS7SkK7WEa2+XO9t7fBDZ3/kPo+3N6Aowv3tG7NUo30n+3qx2CfaJN60mNRCmoQjlUi34M19macOClAJ592PsZQIKZUX6aHvjwdNDbGq8qmkMCV/6P7wWlA0RezwematVVevzV72tncch5KPPPPXaSXbranQG+KM+SKR8ry0i+W+5HS+9oD94KhhLuzIXi+ZlKvLW7Ijg/KETalQWvYAREx9Ud05fscIcPOMx2TAuGGUyqmPX5W5xL5mQemTnnmGsWz5QPnfpB44CjTDRvhfUhHRAaNsi+e1AaKVOFBZClNCIEt6TJivrDhLT9zruDb6KGfari94S1jxQilHCG2pJb+wiOLjn/NXYtsxFZH02gSxRVs1NaNSHyFHZYmrlgZ6CikLzYMPliES8rTnH4CIDg/3HvHbOK+44TGtHyQhL6da4OAzl0xWEJksYbJ4Kk8anCIMl9qEmMJbLzGPGYUvbmsSRe9SICG44+bzoGlyBUpzgcUbOL83X5JU5Bor4iHyCk7u2xwGOhZjtzKgX4/NOsf9j157JB5AEfyvnjutVYqKFJ3Ffonrrqr6kU=
on:
tags: true
repo: UAVCAN/gui_tool
repo: DroneCAN/gui_tool
distributions: bdist_wheel
skip_cleanup: true
40 changes: 18 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,36 @@
UAVCAN GUI Tool (legacy)
========================
DroneCAN GUI Tool
=======================

UAVCAN GUI Tool is a cross-platform (Windows/Linux/OSX) application for UAVCAN/CAN v0 management and diagnostics.
DroneCAN GUI Tool is a cross-platform (Windows/Linux/OSX) application for UAVCAN v0.9 and/or DroneCAN V1 management and diagnostics.

**This is a legacy application; it is not compatible with the stable UAVCAN v1.
There is [work underway on the new GUI solution called Yukon](https://forum.uavcan.org/c/app/yukon/14)
that will support UAVCAN v1.
While Yukon is unavailable, users of UAVCAN v1 are recommended to use the
[Yakut command line tool](https://github.com/UAVCAN/yakut).**
**This application is not compatible with UAVCAN v1, it is designed for DroneCAN V1 [formerly known as UAVCAN v 0.9]

[Read the docs at **legacy.uavcan.org/GUI_Tool**](http://legacy.uavcan.org/GUI_Tool).
[Read the docs at **http://dronecan.org/GUI_Tool**](http://dronecan.org/GUI_Tool).

[Ask questions at **forum.uavcan.org**](https://forum.uavcan.org).
[Ask questions at **https://ardupilot.org/copter/docs/common-contact-us.html**](https://ardupilot.org/copter/docs/common-contact-us.html).

Read installation instructions:

- [**GNU/LINUX**](#installing-on-gnulinux)
- [**WINDOWS**](#installing-on-windows)
- [**MACOS**](#installing-on-macos)

![UAVCAN GUI Tool screenshot](screenshot.png "UAVCAN GUI Tool screenshot")
![DroneCAN GUI Tool screenshot](screenshot.png "DroneCAN GUI Tool screenshot")

## Installing on GNU/Linux

The general approach is simple:

1. Install PyQt5 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/UAVCAN/gui_tool@master`
`pip3 install git+https://github.com/DroneCAN/gui_tool@master`
(it is not necessary to clone this repository manually).
Alternatively, if you're a developer and you want to install your local copy, use `pip3 install .`.

It also may be necessary to install additional dependencies, depending on your distribution (see details below).

Once the application is installed, you should see new desktop entries available in your desktop menu;
also a new executable `uavcan_gui_tool` will be available in your `PATH`.
also a new executable `dronecan_gui_tool` will be available in your `PATH`.
If your desktop environment doesn't update the menu automatically, you may want to do it manually, e.g.
by invoking `sudo update-desktop-database` (command depends on the distribution).

Expand All @@ -46,7 +42,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 pip3 install git+https://github.com/UAVCAN/gui_tool@master
sudo pip3 install git+https://github.com/DroneCAN/gui_tool@master
```

#### Troubleshooting
Expand All @@ -65,13 +61,13 @@ If you're still unable to install the package, please open a ticket.
#### Fedora 29+
```bash
sudo dnf install python3-PyQt5
sudo pip3 install git+https://github.com/UAVCAN/gui_tool@master
sudo pip3 install git+https://github.com/DroneCAN/gui_tool@master
```

## Installing on Windows

In order to install this application,
**download and install the latest `.msi` package from here: <https://files.zubax.com/products/org.uavcan.gui_tool/>**.
**download and install the latest `.msi` package from here: <https://dronecan.github.io/gui_tool/>**.

### Building the MSI package

Expand All @@ -87,8 +83,8 @@ Make sure that `python` can be invoked from the terminal; if it can't, check you
Having done that, execute the following (the script will prompt you for password to read the certificate file):

```dos
python -m pip uninstall -y uavcan
python -m pip uninstall -y uavcan_gui_tool
python -m pip uninstall -y dronecan
python -m pip uninstall -y dronecan_gui_tool
python setup.py install
python setup.py bdist_msi
```
Expand All @@ -112,8 +108,8 @@ as these ports are supported much better at the moment.
brew install python3
brew postinstall python3
pip3 install PyQt5
pip3 install git+https://github.com/UAVCAN/gui_tool@master
uavcan_gui_tool
pip3 install git+https://github.com/DroneCAN/gui_tool@master
dronecan_gui_tool
```

### MacPorts option
Expand All @@ -125,7 +121,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 python3.5 -m pip install git+https://github.com/UAVCAN/gui_tool@master
sudo python3.5 -m pip install git+https://github.com/DroneCAN/gui_tool@master
```

We would like to provide prebuilt application packages instead of the mess above.
Expand All @@ -146,4 +142,4 @@ the distribution server.

### Code style

Please follow the [Zubax Python Coding Conventions](https://kb.zubax.com/x/_oAh).
Please follow the existing code styles .
2 changes: 1 addition & 1 deletion bin/uavcan_gui_tool → bin/dronecan_gui_tool
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ except NameError:
#
if __name__ == '__main__':
multiprocessing.freeze_support()
from uavcan_gui_tool.main import main
from dronecan_gui_tool.main import main
main()
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#

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


Expand All @@ -34,12 +34,12 @@ def reset(self):

def _on_transfer(self, tr):
try:
dtname = pyuavcan_v0.get_uavcan_data_type(tr.payload).full_name
dtname = dronecan.get_dronecan_data_type(tr.payload).full_name
except Exception:
try:
kind = pyuavcan_v0.dsdl.CompoundType.KIND_SERVICE if tr.service_not_message else \
pyuavcan_v0.dsdl.CompoundType.KIND_MESSAGE
dtname = pyuavcan_v0.DATATYPES[(tr.data_type_id, kind)].full_name
kind = dronecan.dsdl.CompoundType.KIND_SERVICE if tr.service_not_message else \
dronecan.dsdl.CompoundType.KIND_MESSAGE
dtname = dronecan.DATATYPES[(tr.data_type_id, kind)].full_name
except Exception:
logger.error('Could not detect data type name from transfer %r', tr, exc_info=True)
return
Expand All @@ -62,7 +62,7 @@ def get_names_of_active_services(self):
@staticmethod
def get_names_of_all_message_types_with_data_type_id():
message_types = []
for (dtid, kind), dtype in pyuavcan_v0.DATATYPES.items():
if dtid is not None and kind == pyuavcan_v0.dsdl.CompoundType.KIND_MESSAGE:
for (dtid, kind), dtype in dronecan.DATATYPES.items():
if dtid is not None and kind == dronecan.dsdl.CompoundType.KIND_MESSAGE:
message_types.append(str(dtype))
return list(sorted(message_types))
File renamed without changes.
File renamed without changes
Loading

0 comments on commit 5010d4a

Please sign in to comment.