Vortex FPV Simulator - test build
=================================

Build
-----
Check the build first with:

    ./vortex --version

It prints something like `vortex v0.1.0-b26100215 (2026-10-02 15:00 UTC)` -
the b-date/hour shows exactly when this package was built.

Requirements
------------
- Linux desktop with OpenGL 3.3 (any normal Mesa/intel/amd/nvidia setup).
- Read access to /dev/input/* for your RC radio (see install.sh).
- No install needed; everything is in this folder.

Run
---
From THIS folder:

    ./vortex

If you see a "Permission denied" message about the radio device, run
./install.sh once from this folder, log out and back in, and retry.

First start (radio not configured yet):

    ./vortex

In the window, press C, choose RADIO SETUP, select the transmitter with
Left/Right, then press Enter. Follow the on-screen assignment: Arm switch,
Reset switch, then throttle/roll/pitch/yaw. The result is saved to
config/input.toml in this folder, so run the app from here from now on.
Pressing X cancels a running calibration session.

Optional recovery/developer calibration entry point:

    VORTEX_CALIBRATE=1 ./vortex

Flying
------
- Arm switch: arms/disarms (motors only spin when armed).
- Reset switch: respawns the drone at the start point.
- Acro mode: sticks command angular rate. Center = hold attitude.
- Close the window or press Escape to quit.

Keyboard shortcuts
------------------
- C       config menu (RADIO SETUP / RATES / MAP)
- S       toggle race mode (needs a generated track with gates)
- H       toggle the flight HUD
- O       toggle the stick-position overlay
- V       toggle VSync/RAW FPS (the HUD FPS line shows which is active)
- F11     fullscreen on/off
- Escape  close menu / quit

Config menu (rates, radio, map)
-------------------------------
- Press C to open the menu. Screens: RADIO SETUP / RATES / MAP.
- RATES: edit Center rate, Max rate, Expo per axis, plus Throttle Mid/Expo.
  - Left/Right changes the highlighted value (Shift = larger step).
  - Enter on a value resets just that one to its default; Enter on the
    RESET DEFAULTS row resets everything.
  - Changes apply live and save to config/settings.toml when you close the menu.
- MAP: choose Demo or Auto Generated (Enter loads it immediately). In Auto
  Generated mode there is a SEED row: Left/Right steps the seed, number keys
  type one directly, Enter commits and loads, Escape cancels typing, and the
  RANDOM row draws a fresh random seed.
- Escape backs out of a screen; C or Escape closes the menu.

Which settings are active?
--------------------------
The first lines in the terminal tell you the build and which feel-values are
loaded, e.g.:

    INFO vortex_app: vortex build build="v0.1.0-b26100215" date="2026-10-02 15:00 UTC"
    INFO vortex_app: drone config active ... build="v0.1.0-b26100215"

If you do not see these lines, run `RUST_LOG=vortex=info ./vortex`. When
reporting feedback, always quote the build= value plus the drone-config line
so the coordinator knows exactly which binary and tuning you flew with.

Troubleshooting
---------------
- "Permission denied" opening the radio: you need the input group.
  Run ./install.sh, log out/in, try again.
- No window / black screen: run from a terminal and report the error output.
- Wrong stick feel or wrong build: tell the test coordinator the build= value
  plus the thrust_to_weight / rate values from the startup lines above.
