2021-06-12 13:54:08 +02:00
|
|
|
# TMTC Commander EIVE
|
2020-12-17 17:50:00 +01:00
|
|
|
|
2022-05-17 14:46:23 +02:00
|
|
|
This application can be used to test the EIVE On-Board Software. Furthermore, it can
|
|
|
|
also be used to retrieve all sorts of telemetry data like housekeeping data.
|
|
|
|
|
|
|
|
It is recommended to use this application with a virtual environment.
|
2022-05-17 14:57:54 +02:00
|
|
|
The [virtual environemnt](#venv) chapter describes how to set one up. The [requirements](#reqs)
|
|
|
|
describes how to install all required packages.
|
2022-05-17 14:46:23 +02:00
|
|
|
|
|
|
|
The configuration file can currently be found at `tmtc_conf.json`. It caches settings
|
|
|
|
like the default communication interface or parameters like the TCP port when using the TCP
|
|
|
|
communication interface.
|
|
|
|
|
2022-05-17 14:57:54 +02:00
|
|
|
# Examples
|
|
|
|
|
|
|
|
Assuming you are running in a [virtual environment](#venv) and all [package requirements](#reqs)
|
|
|
|
were installed properly.
|
|
|
|
|
|
|
|
Run CLI mode
|
|
|
|
|
|
|
|
```sh
|
2022-12-01 14:44:34 +01:00
|
|
|
./tmtcc.py
|
2022-05-17 14:57:54 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
Run GUI mode
|
|
|
|
|
|
|
|
```sh
|
2022-12-01 14:44:34 +01:00
|
|
|
./tmtcc.py -g
|
2022-05-17 14:57:54 +02:00
|
|
|
```
|
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
# <a id="venv"></a> Set up virtual environment
|
2022-05-17 14:46:23 +02:00
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
## Linux
|
2022-05-17 14:46:23 +02:00
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
1. Create virtual environment
|
2022-05-17 14:46:23 +02:00
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
```sh
|
|
|
|
python3 -m venv venv
|
|
|
|
```
|
2022-05-17 14:46:23 +02:00
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
2. Activate virtual environment
|
2022-05-17 14:46:23 +02:00
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
```sh
|
|
|
|
. venv/bin/activate
|
|
|
|
```
|
2022-05-17 14:46:23 +02:00
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
## Windows
|
2021-08-09 11:45:01 +02:00
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
1. Create virtual environment
|
2021-08-09 11:45:01 +02:00
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
```sh
|
2022-05-18 18:32:20 +02:00
|
|
|
py -m venv venv
|
2022-05-17 14:55:23 +02:00
|
|
|
```
|
2021-08-09 11:45:01 +02:00
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
2. Activate virtual environment
|
2021-08-09 11:45:01 +02:00
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
```sh
|
|
|
|
venv\Scripts\activate.bat
|
|
|
|
```
|
2021-08-09 11:45:01 +02:00
|
|
|
|
2022-05-17 14:57:54 +02:00
|
|
|
# <a id="reqs"></a> Install requirements
|
2021-08-09 11:45:01 +02:00
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
There are two ways to install the requirements. One is to install the primary dependency
|
|
|
|
`tmtccmd` interactively. This is the recommended way
|
2021-08-09 11:45:01 +02:00
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
Assuming you are running in a virtual environment:
|
2021-06-12 13:54:08 +02:00
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
1. Install `tmtccmd` for virtual environment. `-e` for interactive installation.
|
2021-06-12 13:54:08 +02:00
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
```sh
|
2022-12-15 11:02:54 +01:00
|
|
|
cd deps/tmtccmd
|
2022-05-17 14:55:23 +02:00
|
|
|
pip install -e .[gui]
|
|
|
|
```
|
|
|
|
|
|
|
|
Alternatively you can also install the packages from PyPI completely, but the risk of
|
|
|
|
incompatibilities will be high there
|
2021-06-12 13:54:08 +02:00
|
|
|
|
|
|
|
```sh
|
2022-05-17 14:55:23 +02:00
|
|
|
pip install -r requirements.txt
|
2021-06-12 13:54:08 +02:00
|
|
|
```
|
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
# Run Linter
|
2021-06-12 13:54:08 +02:00
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
Can be used to quickly check validity of script. Install `flake8` first
|
2021-06-12 13:54:08 +02:00
|
|
|
|
|
|
|
```sh
|
2022-05-17 14:55:23 +02:00
|
|
|
python3 -m pip install flake8
|
2021-06-12 13:54:08 +02:00
|
|
|
```
|
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
or on Windows
|
2021-06-12 13:54:08 +02:00
|
|
|
|
|
|
|
```sh
|
2022-05-17 14:55:23 +02:00
|
|
|
py -m pip install flake8
|
2021-06-12 13:54:08 +02:00
|
|
|
```
|
|
|
|
|
2022-05-17 14:55:23 +02:00
|
|
|
and then run the `lint.py` script
|
2021-06-12 13:54:08 +02:00
|
|
|
|
|
|
|
```sh
|
2022-05-17 14:55:23 +02:00
|
|
|
./lint.py
|
2021-06-12 13:54:08 +02:00
|
|
|
```
|
2022-05-17 14:57:54 +02:00
|
|
|
|
|
|
|
# Run Auto-Formatter
|
|
|
|
|
|
|
|
This repo is auto-formatted using `black`. Assuming `black` is installed, you can simply run
|
|
|
|
|
|
|
|
```sh
|
|
|
|
black .
|
|
|
|
```
|