FastRIO certified: 31250v2 final runs clean; config plumbing for baud/poll
Operator-verified zero lamp misses/hangs through the slow-chord test (62500's killer) and 392/min mash. Final run: NAK=0, 25 timeout resends silently healing inbound response loss, counters flat, zero wedges. --poll 20 delivered ~31Hz analog (1.7x legacy); the shortfall vs 50Hz is additive host pacing (delay after awaited exchange), not board saturation - noted as a future host tweak. AppConfig gains RioBaudRate (default 9600) + AnalogPollMs (default 55), plumbed through RioCoordinator; existing configs unchanged. Production matrix recorded in ANALYSIS.md: 9600 patched chip for native-game cabinets, 31250v2 + poll 20-25 + FTDI for RIOJoy cockpits. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,21 @@ public sealed class AppConfig
|
||||
/// <summary>Default RIO COM port when a profile doesn't specify one.</summary>
|
||||
public string DefaultRioComPort { get; set; } = "COM1";
|
||||
|
||||
/// <summary>
|
||||
/// RIO link baud rate. 9600 = stock/wedge-patched firmware (native-game
|
||||
/// compatible). 31250 = the validated FastRIO chip
|
||||
/// (rio-firmware/RIOv4_2_patched_31250v2.bin) — needs an FTDI-class
|
||||
/// adapter; classic 16550 UARTs cannot make this rate.
|
||||
/// </summary>
|
||||
public int RioBaudRate { get; set; } = 9600;
|
||||
|
||||
/// <summary>
|
||||
/// Analog poll interval in milliseconds (legacy cadence 55 → ~18 Hz).
|
||||
/// The FastRIO chip sustains ~20-25 ms (~30+ Hz effective; bench
|
||||
/// 2026-07-19). Leave at 55 for stock-speed boards.
|
||||
/// </summary>
|
||||
public int AnalogPollMs { get; set; } = 55;
|
||||
|
||||
/// <summary>Default plasma COM port when a profile doesn't specify one.</summary>
|
||||
public string? DefaultPlasmaComPort { get; set; } = "COM2";
|
||||
|
||||
|
||||
@@ -47,7 +47,8 @@ public sealed class RioCoordinator : IDisposable
|
||||
public RioCoordinator(Func<AppConfig> config, Func<string, IRioTransport>? transportFactory = null)
|
||||
{
|
||||
_config = config ?? throw new ArgumentNullException(nameof(config));
|
||||
_transportFactory = transportFactory ?? (port => new SerialPortTransport(port));
|
||||
_transportFactory = transportFactory
|
||||
?? (port => new SerialPortTransport(port, _config().RioBaudRate));
|
||||
}
|
||||
|
||||
/// <summary>Raised (with a short status string) whenever the active state changes.</summary>
|
||||
@@ -211,7 +212,11 @@ public sealed class RioCoordinator : IDisposable
|
||||
}
|
||||
|
||||
_transport = _transportFactory(port);
|
||||
_link = new RioSerialLink(_transport);
|
||||
_link = new RioSerialLink(_transport, new RioSerialLinkOptions
|
||||
{
|
||||
AnalogPollInterval = TimeSpan.FromMilliseconds(
|
||||
Math.Max(10, config.AnalogPollMs)), // floor guards a typo'd config
|
||||
});
|
||||
_runtime = new RioRuntime(
|
||||
_link,
|
||||
profile.ToInputMap(),
|
||||
|
||||
Reference in New Issue
Block a user