Local development

Run drDRO on your Linux desktop

drDRO is a normal Python / Kivy application managed with uv. You can run and hack on the whole UI on any Linux machine — a board is optional; without one the app simply shows a disconnected link.

Prerequisites

  • Python 3.10+ (the dev venv pins 3.11).
  • uv — the project's package / venv manager.
  • A working OpenGL stack for Kivy's SDL2 window (any desktop GL is fine).
  • Optional: the drDRO board on a USB-serial / RS-485 adapter to see live data.

Latest app version: v1.4.0


1 · Get the code

bash
git clone https://github.com/bartei/drdro-software-f4.git
cd drdro-software-f4

2 · Install dependencies

uv sync creates a virtual environment and installs everything from the locked uv.lock — Kivy, pyserial, pydantic, aiohttp and the rest.

bash
uv sync

3 · Point it at your board (optional)

Serial settings live in config.ini at the repo root. Set serial_port to your adapter — a stable /dev/serial/by-id/… path is best, or a plain /dev/ttyUSB0.

config.ini
[device]
serial_port = /dev/ttyUSB0
baudrate    = 115200
current_mode = 1
scales_count = 4
📜

On most distros the serial device is owned by the dialout group. Add yourself and re-login so you can open the port without sudo:

bash
sudo usermod -aG dialout "$USER"   # then log out & back in

No board? Skip this — the app launches fine and just shows COM disconnected; every configuration screen still works.

4 · Run the app

bash
uv run python -m dro.main

A 1024×600-ish window opens on the home screen. Everything you see in the screenshots is reachable from here.

See drDRO in action →

NixOS notes

On NixOS the manylinux wheels for SDL2/Kivy dlopen system libraries by soname (libGL.so.1, libmtdev.so.1) that aren't on LD_LIBRARY_PATH by default. The repo ships a shell.nix that wires them up:

bash
# enter the dev shell (sets LD_LIBRARY_PATH), then run
nix-shell --run 'uv run python -m dro.main'

# or drop into the shell first
nix-shell
uv run python -m dro.main

The shell exports paths for libglvnd (the libGL.so.1 GLX dispatcher), mtdev (touch) and libstdc++, plus /run/opengl-driver/lib for the Mesa vendor driver.

Tests & build

bash
uv run pytest          # run the unit test suite
uv build               # build the wheel / sdist

The suite covers the protocol client, dispatchers, encoder-filter maths, profiles and the firmware-update helpers — no board required (the serial layer is mocked).

Project layout

dro/
dro/
├── main.py            # entry point (asyncio + Kivy loop)
├── app.py             # MainApp
├── feeds.py           # feed / thread pitch tables
├── comms/             # RS-485 line-protocol driver
│   ├── protocol_client.py   # framed request/response, CRC, retries
│   ├── ymodem.py            # YMODEM sender (firmware push)
│   └── updater.py           # firmware update + bank management
├── dispatchers/       # state: board, axis, input, servo, els, formats…
├── components/        # UI: screens, home bars, popups, widgets, plot
├── help/              # contextual RST help text
└── utils/             # platform detect, kv loader, encoder filter…

Coding standards

  • Python 3.10+ modern syntax (list[X], X | Y).
  • Logging via Kivy's logger — from kivy.logger import Logger.
  • Companion .kv files loaded per-module; YAML persistence via SavingDispatcher under ~/.config/drdro-software/.
  • Branches main (releases) / dev (betas), conventional commits, semantic-release.
🔧

drDRO is the successor to rotary-controller-python — the same UI with the Modbus driver replaced by the RS-485 line protocol. See the reference for the protocol and architecture.