Skip to content

Commit

Permalink
renaming esb -> osb
Browse files Browse the repository at this point in the history
  • Loading branch information
a-mosquito committed Jun 13, 2024
1 parent 903622f commit f91be60
Show file tree
Hide file tree
Showing 79 changed files with 148 additions and 148 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ jobs:
source .venv/bin/activate
pip install pyinstaller
pyinstaller start_gui.spec
zip esb_gui_macos.zip ./dist/start_gui
zip osb_gui_macos.zip ./dist/start_gui
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: /Users/runner/work/empkins-sync-board-gui/empkins-sync-board-gui/esb_gui_macos.zip
asset_name: esb_gui_macos.zip
asset_path: /Users/runner/work/empkins-sync-board-gui/empkins-sync-board-gui/osb_gui_macos.zip
asset_name: osb_gui_macos.zip
asset_content_type: application/zip

6 changes: 3 additions & 3 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
.venv/Scripts/activate
pip install pyinstaller
pyinstaller start_gui.spec
7z a -tzip esb_gui_windows.zip ./dist/start_gui.exe
7z a -tzip osb_gui_windows.zip ./dist/start_gui.exe
ls
- name: Upload Release Asset
Expand All @@ -37,7 +37,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: D:\a\empkins-sync-board-gui\empkins-sync-board-gui\esb_gui_windows.zip
asset_name: esb_gui_windows.zip
asset_path: D:\a\empkins-sync-board-gui\empkins-sync-board-gui\osb_gui_windows.zip
asset_name: osb_gui_windows.zip
asset_content_type: application/zip

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ MANIFEST
.doit.*

# log files
/empkins_sync_board_gui/events/*
/open_sync_board_gui/events/*
22 changes: 11 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to Empkins Sync Board GUI
# Contributing to Open Sync Board GUI

This document contains information for developers that want to contribute to ``empkins-sync-board-gui``.
This document contains information for developers that want to contribute to ``open-sync-board-gui``.

It includes further in-depth information on how to set up and use required tools
and learn about programing methods used in the development of this project.
Expand All @@ -10,7 +10,7 @@ and learn about programing methods used in the development of this project.

### General Information

`empkins-sync-board-gui` is under active development and welcomes everyone to contribute to code improvements, documentation,
`open-sync-board-gui` is under active development and welcomes everyone to contribute to code improvements, documentation,
testing, and new features! [Why should I contribute?](https://github.com/jonschlinkert/idiomatic-contributing/)

Before adding new features, please think about on where your features might suit best into the project structure
Expand All @@ -21,12 +21,12 @@ tests (more on that below) to your code.

### Git Workflow

As multiple people are expected to contribute to `empkins-sync-board-gui` at the same time, `empkins-sync-board-gui` implements a proper
As multiple people are expected to contribute to `open-sync-board-gui` at the same time, `open-sync-board-gui` implements a proper
[Git workflow](https://guides.github.com/introduction/flow/) to prevent possible issues.

#### Branching structure

In `empkins-sync-board-gui` we use a *main + feature branches* structure.
In `open-sync-board-gui` we use a *main + feature branches* structure.
This workflow is well explained [here](https://www.atlassian.com/blog/git/simple-git-workflow-is-simple).

All changes to the `main` branch should be performed using feature branches.
Expand Down Expand Up @@ -66,11 +66,11 @@ As a reminder, feature branches...

##### Pushing Code

As soon as your new contribution to `empkins-sync-board-gui` is ready, it's time to ensure your code passes all necessary checks,
As soon as your new contribution to `open-sync-board-gui` is ready, it's time to ensure your code passes all necessary checks,
such as formatting, linting, building documentation, and performing tests. To run these checks more easily this project
uses [poethepoet](https://github.com/nat-n/poethepoet), a task runner that runs well with poetry and that provides
a cross-platform CLI for common tasks. More details on that are explained in a
[later Section](#Tools-used-in-empkins-sync-board-gui).
[later Section](#Tools-used-in-open-sync-board-gui).


##### Ask to Merge Pull Request
Expand Down Expand Up @@ -136,13 +136,13 @@ It will act as a `develop` branch for just this feature.

### Project Setup and Poetry

`empkins-sync-board-gui` only supports Python 3.8 and newer. First, install a compatible version of Python.
`open-sync-board-gui` only supports Python 3.8 and newer. First, install a compatible version of Python.
If you do not want to modify your system installation of Python you can use [conda](https://docs.conda.io/en/latest/)
or [pyenv](https://github.com/pyenv/pyenv).
However, there are some issues with using conda.
Please, check the [trouble shooting guide](#Troubleshooting) below.

`empkins-sync-board-gui` uses [poetry](https://python-poetry.org) to manage its dependencies.
`open-sync-board-gui` uses [poetry](https://python-poetry.org) to manage its dependencies.
Once you installed poetry, run the following commands to initialize a virtual env and install all development
dependencies:

Expand Down Expand Up @@ -180,7 +180,7 @@ poetry update
Running `poetry install` will only install packages that are not yet installed. `poetry update` will also check if
newer versions of already installed packages exist.

### Tools used in empkins-sync-board-gui
### Tools used in open-sync-board-gui

To make it easier to run command-line tasks this project uses [poethepoet](https://github.com/nat-n/poethepoet) to
provide a cross-platform CLI for common tasks.
Expand Down Expand Up @@ -255,7 +255,7 @@ You can instruct Pycharm to automatically reload modules upon changing by adding

### Release Model

`empkins-sync-board-gui` follows typically semantic versioning: A.B.C (e.g. 1.3.5)
`open-sync-board-gui` follows typically semantic versioning: A.B.C (e.g. 1.3.5)

- `A` is the major version, which will be updated once there were fundamental changes to the project
- `B` is the minor version, which will be updated whenever new features are added
Expand Down
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# EmpkinS Sync Board GUI
# Open Sync Board GUI

[![PyPI](https://img.shields.io/pypi/v/empkins-sync-board-gui)](https://pypi.org/project/empkins-sync-board-gui/)
![GitHub](https://img.shields.io/github/license/empkins/empkins-sync-board-gui)
Expand All @@ -7,14 +7,14 @@

## Description

This Repository is part of the [EmpkinS Sync Board](https://github.com/empkins/empkins-sync-board) project. The EmpkinS Sync Board (ESB) can be used
This Repository is part of the [Open Sync Board](https://github.com/empkins/empkins-sync-board) project. The Open Sync Board (OSB) can be used
to **precisely synchronize different measurement modalities** on hardware level.
The accompanying **Graphical User Interface (GUI)** allows to easily adjust the outputs
of the ESB with the required synchronization signals for the connected modalities, and is also **suited for non-technical users**.
of the OSB with the required synchronization signals for the connected modalities, and is also **suited for non-technical users**.

<img src="img/esb_gui.png">
<img src="img/osb_gui.png">

The main UI window resembles the layout of the ESB, and thus enables an intuitive workflow. The GUI allows to:
The main UI window resembles the layout of the OSB, and thus enables an intuitive workflow. The GUI allows to:
- Select and deselect outputs to use
- Configure the behavior of each output signal either manually or by selecting a connected device from a list of default devices
- Select and configure input ports to process received signals, e.g., for triggered measurements
Expand All @@ -28,10 +28,10 @@ To use the GUI **out-of-the-box** without any adaptations, you can download the
If you are comfortable with python/pip, or if you are a linux user, please install the package **via pip**:

```bash
pip install empkins_sync_board_gui
pip install open_sync_board_gui
```

To use the GUI, make sure you have the readily flashed ESB connected to your computer via USB.
To use the GUI, make sure you have the readily flashed OSB connected to your computer via USB.
You can then run the GUI by executing the following command in your shell:

```bash
Expand All @@ -43,28 +43,28 @@ the [Setup remarks when using Linux](#setup-remarks-when-using-linux) section be

## Usage

Before starting the GUI, make sure the **ESB is connected** to your computer **via USB**.
Before starting the GUI, make sure the **OSB is connected** to your computer **via USB**.
When executing the GUI, at first, a dialog will pop up asking you for the storage location and name of the log files that will be generated.

<img src="img/configure_path.png" width="300">

Every time the GUI is executed, a new file is created storing the timestamps when a measurement is started or stopped, and when an event (e.g., Button press, Input trigger) is reported.
Select a path and filename of your choice and click `OK`.

Afterwards, the **main window** of the GUI will open. The main UI window resembles the layout of the ESB, and thus simplifies setting up the GUI as well as the ESB correctly.
Afterwards, the **main window** of the GUI will open. The main UI window resembles the layout of the OSB, and thus simplifies setting up the GUI as well as the OSB correctly.
First, you can select the connections (measuring devices) that you want to use for connecting devices. Activated connections are highlighted in green and provide a settings button to configure their behavior.

### Configuration of Measurement Device (MD) Ports

The connections MD1-MD4 and MD7 are **output ports**, i.e., they send a synchronization signal of your choice after starting the measurement. When clicking the settings button, a dialog will open that allows you to configure the behavior of the selected output connection.
You can either select a **default device** from the list of available devices, or configure the behavior manually. In the latter case, **depending on the sychronization signal** that you choose from the `Sync Signal` dropdown, different properties are available for configuration. Click `OK` to save your changes and close the dialog.
In case you selected a default device, you will be prompted how to proceed with connecting the device to the ESB, more precisely, which plug to use for the connection, and which voltage level to use. To configure the voltage level, you have to move the little plastic jumper that you can find next to the corresponding connection to the desired position. It should be either placed at the `1.8`, `3.3`, or `5` position labeled in the GUI and moved to the position you are prompted to use. If your device requires a different logic level (between 1V and 7.5V), you may use the `NC` position and solder in a suitable resistor. If your device doesn't bring its own power supply for regulating the logic level, make sure you have another jumper set on `Vint`. Otherwise, move this jumper to the `NC` position next to `Vint`.
In case you selected a default device, you will be prompted how to proceed with connecting the device to the OSB, more precisely, which plug to use for the connection, and which voltage level to use. To configure the voltage level, you have to move the little plastic jumper that you can find next to the corresponding connection to the desired position. It should be either placed at the `1.8`, `3.3`, or `5` position labeled in the GUI and moved to the position you are prompted to use. If your device requires a different logic level (between 1V and 7.5V), you may use the `NC` position and solder in a suitable resistor. If your device doesn't bring its own power supply for regulating the logic level, make sure you have another jumper set on `Vint`. Otherwise, move this jumper to the `NC` position next to `Vint`.
If you chose manual configuration, you need to figure out the required logic level for your device from its manual.

<img src="img/default_config.png" width="300">
<img src="img/manual_config.png" width="300">

The connections MD5 and MD6 can be configured either as **output ports** analogously to the other connections, or as **input ports**. On one hand, you can use the input ports to connect some kind of switch to the ESB and log every time it sends the selected signal. This can i.e. be used for event logging, and can thus be achieved by selecting the `Event Input` option in the connection settings.
The connections MD5 and MD6 can be configured either as **output ports** analogously to the other connections, or as **input ports**. On one hand, you can use the input ports to connect some kind of switch to the OSB and log every time it sends the selected signal. This can i.e. be used for event logging, and can thus be achieved by selecting the `Event Input` option in the connection settings.
On the other hand, a connected input can be used to start or stop the measurement. This can be configured in the [source settings](todo#configuration-of-sources).
When using MD5 or MD6, make sure to move the plastic jumper for switching between input and output mode as prompted by the GUI.

Expand All @@ -73,7 +73,7 @@ When using MD5 or MD6, make sure to move the plastic jumper for switching betwee
### Configuration of Sources

The start and stop source are used to launch and terminate the measurement (i.e. the output of synchronization signals to all connected devices), respectively.
When selecting `GUI` from the respective dropdown lists, you can start/stop the measurement with the start/stop button in the GUI. Alternatively, you could control the measurement with the buttons on the ESB (labeled Button1 and Button2, also schematically displayed in the GUI).
When selecting `GUI` from the respective dropdown lists, you can start/stop the measurement with the start/stop button in the GUI. Alternatively, you could control the measurement with the buttons on the OSB (labeled Button1 and Button2, also schematically displayed in the GUI).
To trigger a measurement from an input source, select the input port you want to connect this external source to.
In this case, you must select the desired receive signal by clicking on the source configuration button and choosing from the `Sync Signal` dropdown.
For all types of sources, you can also set a delay for the measurement to start/stop in the source settings.
Expand All @@ -82,7 +82,7 @@ For all types of sources, you can also set a delay for the measurement to start/

### During the measurement

When you are all set up, you can start the measurement from the selected source and monitor the Sync Board its status via the GUI as well as the ESB by its status LED. When the LED is turned off, the board is in idle state. When the LED is blue, the measurement is running. When the LED is red, an error has occurred that will be displayed to you in the GUI.
When you are all set up, you can start the measurement from the selected source and monitor the Sync Board its status via the GUI as well as the OSB by its status LED. When the LED is turned off, the board is in idle state. When the LED is blue, the measurement is running. When the LED is red, an error has occurred that will be displayed to you in the GUI.

<img src="img/led.png" width="150">

Expand Down Expand Up @@ -129,7 +129,7 @@ Afterwards open a shell inside the project folder (`your_path_to/empkins-sync-bo

```bash
poetry shell
cd empkins_sync_board_gui
cd open_sync_board_gui
python start_gui.py
```

Expand All @@ -140,7 +140,7 @@ to start the GUI.
The repository is structured as follows:

```bash
├── empkins_sync_board_gui/
├── open_sync_board_gui/
├── components/ # Contains automatically compiled ui files. Do not modify!
├── config/ # Contains hardware configuration files. When hardware is adapted, changes might be required!
├── constants/ # Contains general constants, command messages for board interface, and default devices
Expand All @@ -157,11 +157,11 @@ The repository is structured as follows:
### Mock mode
For experimenting and debugging, there is a mock mode available.
In this mode, the GUI does not require a connection to a physical SyncBoard, but instead simulates the behavior of the board.
To enable the mock mode, set the `mock_mode` variable in the entry script `empkins_sync_board_gui/script/start_gui.py` to `True`.
To enable the mock mode, set the `mock_mode` variable in the entry script `open_sync_board_gui/script/start_gui.py` to `True`.

### Adding a new default device

All default devices are defined in the `empkins_sync_board_gui/constants/default_devices.py` file. To add a new device,
All default devices are defined in the `open_sync_board_gui/constants/default_devices.py` file. To add a new device,
you need to add its name to the comma separated list of `DEFAULT_DEVICES` and add a new entry to the `DEVICE_SETTINGS`
dictionary. The key of the dictionary entry is the name of the device, and the value is a dictionary containing the
following keys:
Expand Down Expand Up @@ -193,7 +193,7 @@ poe update_ui
```
Under the hood, this command runs the `scripts/compile_ui_files.sh` bash script. The designer and resource files are
compiled using the `pyside2-uic` and `pyside2-rcc` command line tools and stored in
the `empkins_sync_board_gui/components/` directory.
the `open_sync_board_gui/components/` directory.

## Setup remarks when using Linux

Expand Down Expand Up @@ -235,5 +235,5 @@ This project is licensed under the MIT License. See the LICENSE file for details

## Contributing

We welcome contributions to `EmpkinS Sync Board GUI`! For more information, have a look at
We welcome contributions to `Open Sync Board GUI`! For more information, have a look at
the [Contributing Guidelines](CONTRIBUTING.md).
3 changes: 0 additions & 3 deletions empkins_sync_board_gui/__init__.py

This file was deleted.

20 changes: 0 additions & 20 deletions empkins_sync_board_gui/components/__init__.py

This file was deleted.

8 changes: 0 additions & 8 deletions empkins_sync_board_gui/constants/__init__.py

This file was deleted.

21 changes: 0 additions & 21 deletions empkins_sync_board_gui/dialogs/__init__.py

This file was deleted.

Loading

0 comments on commit f91be60

Please sign in to comment.