You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- instantiates remote adapters (if `RIO_REMOTE_MODULES` is set) to forward calls to API
146
146
- instantiates web controllers (Socket.IO handlers under `software/rio-webapp/controllers/`)
147
147
- registers HTTP routes and `/api/droplet/*` endpoints via `software/rio-webapp/routes.py`
@@ -150,7 +150,8 @@ If you want to verify that "who owns what logic" is consistent in code, start wi
150
150
## Configuration (what decides which parts run)
151
151
152
152
Configuration is primarily driven by environment variables (`RIO_*`) plus a small number of config/constants in `software/config.py`.
153
-
-**Hardware vs simulation**: routine dev/tests use `RIO_SIMULATION=true`; hardware runs use `RIO_SIMULATION=false`.
153
+
-**Hardware vs simulation**: routine dev/tests use `RIO_SIMULATION=true`; hardware runs use `RIO_SIMULATION=false`. `rio-config.yaml` can optionally set `runtime.default_backend` and per-module overrides when `RIO_SIMULATION` is not explicitly set.
154
+
-**Mixed backend (per-module)**: set `runtime.modules.syringe_pump: hardware` (or `RIO_MODULE_BACKENDS="syringe_pump=hardware"`) to run syringe pump hardware while keeping other modules in simulation.
154
155
-**Feature toggles**: modules such as droplet analysis, flow, heater can be enabled/disabled via env vars (see `software/README.md`).
155
156
-**Strobe pacing**: PIC-paced only (camera is triggered by the PIC; no multi-mode selection).
156
157
-**ROI mode**: `RIO_ROI_MODE=software|hardware` (software default). Hardware ROI applies only on camera backends that support it; otherwise the app falls back to software ROI.
Copy file name to clipboardExpand all lines: software/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ Use these short READMEs to navigate the codebase. Detailed implementation lives
27
27
28
28
The main runtime entry point is **`software/main.py`**, which wires the layers together in a fairly direct way:
29
29
30
-
-**SPI/GPIO backend selection** happens inside `drivers/spi_handler.py` (simulation vs hardware is chosen via `RIO_SIMULATION=true|false`).
30
+
-**SPI/GPIO backend selection** happens inside `drivers/spi_handler.py` (simulation vs hardware defaults to `RIO_SIMULATION=true|false`, but `runtime.default_backend` in `rio-config.yaml` can set this when `RIO_SIMULATION` is not explicitly set).
Need custom parameters for simulation (frame size, ROI defaults, feature flags)? See `configurations/README.md` for the environment-variable profiles and examples you can export before running.
172
+
Need custom parameters for simulation (frame size, ROI defaults, feature flags)? See `configurations/README.md` for the environment-variable profiles and examples you can export before running. Mixed backend selection (e.g., syringe pump hardware while other modules are simulated) is configured via the `runtime` block in `rio-config.yaml` or with `RIO_MODULE_BACKENDS`.
173
173
174
174
**Option 2: Manual setup**
175
175
```bash
@@ -181,7 +181,7 @@ python main.py
181
181
182
182
The `scripts/dev/setup-simulation.sh` script creates a conda/mamba environment named **`rio-simulation`** and installs dependencies. The `scripts/dev/run-simulation.sh` script activates that environment and runs the app in simulation mode.
183
183
184
-
Note: `setup-simulation.sh` also creates a `rio-config.yaml` file for simulation settings, but **the main app currently selects simulation via `RIO_SIMULATION=true`**; `rio-config.yaml`is not a primary runtime configuration source for `main.py`.
184
+
Note: `setup-simulation.sh` also creates a `rio-config.yaml` file for simulation settings. `software/main.py` now reads the `runtime` section from `rio-config.yaml`(or `RIO_CONFIG_FILE`) to choose the default backend and per-module overrides (currently used for the syringe pump).
185
185
186
186
This enables simulated SPI, GPIO, camera, and device controllers, allowing you to test the web interface and logic without physical hardware.
0 commit comments