Add multi-decoder split and pit timing support

This commit is contained in:
larssand
2026-08-25 19:45:40 +02:00
parent 6f02e955a5
commit 8ea8b3a84e
20 changed files with 876 additions and 147 deletions

View File

@@ -433,10 +433,23 @@ Important:
- if you only browse from another laptop, no process starts there
- the `AMMC executable` field in `Settings` is a path on the backend host, not the client browser machine
#### Decoder topology
| Role | Physical placement | Example decoder IP | AMMC WS port | Effect |
|---|---|---:|---:|---|
| Main start/finish | Start/finish loop | `192.168.1.10` | `9000` | Counts laps and controls lap time |
| Split | Intermediate loop | `192.168.1.11` | `9001` | Records split from the latest main crossing; never counts a lap |
| Pit entry | Entry to pit lane | `192.168.1.12` | `9002` | Opens a pit stop |
| Pit exit | Exit from pit lane | `192.168.1.13` | `9003` | Closes and times a pit stop |
The decoder IP and WebSocket address are different things. The decoder IP points from AMMC to physical hardware. The browser connects to AMMC on the backend host, for example `ws://192.168.1.100:9001`. Each decoder must have a unique network address and each AMMC process must have a unique WebSocket port.
Use only the channels physically installed at the track. One decoder on `9000` remains the default and needs no optional settings. Split timing requires one additional decoder. Pit timing requires two additional decoders because entry and exit are separate events. A complete setup therefore uses four decoders.
1. Place AMMC binaries in the `AMMC/` project folder.
2. Open `Settings`.
3. Enable `Managed AMMC`.
4. Set `Decoder IP / host`, verify port `9000`, save.
4. Set the Main `Decoder IP / host`, verify port `9000`, and optionally enable/configure Split and Pit channels from the table above.
5. Click `Start AMMC`.
6. Click `Use server WS URL` so the client uses for example `ws://<server-ip>:9000`.
@@ -448,7 +461,15 @@ Default binaries:
### B. Manual start
Example:
```powershell
ammc-amb.exe -w 9000 192.168.1.11
ammc-amb.exe -w 9000 192.168.1.10
```
Complete four-decoder example, using four separate terminals/processes:
```powershell
ammc-amb.exe -w 9000 192.168.1.10
ammc-amb.exe -w 9001 192.168.1.11
ammc-amb.exe -w 9002 192.168.1.12
ammc-amb.exe -w 9003 192.168.1.13
```
In the app:
@@ -461,6 +482,7 @@ In the app:
If Linux firewall/UFW is enabled:
```bash
sudo ufw allow 8081/tcp
sudo ufw allow 9000:9003/tcp
```
## Auto reload during development