oss-slu / oss-slu/PilotDataSynchronization
Relay sends the pilot value twice, so FlightModel fields carry pilot data
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4
- Forks
- 8
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 2
Description
Describe the bug
The generated XML declares two fields per sample, FlightModel* and Pilot* (for example relay/src/update.rs:222-223). The relay fills both with the same number, cloning the single value it received (relay/src/state.rs:584-602).
The duplication originates in the relay, not the plugin. The plugin reads both the flightmodel and pilot datarefs and displays both, but transmits only the eight pilot values (xplane_plugin/src/pilotdatasync-xp11.cpp:418-428). The relay then fabricates the missing half.
Expected behavior
FlightModel* carries the flightmodel value and Pilot* carries the pilot value, so the two can be compared. Being able to see instrument versus true state is the reason there are two fields.
Additional context
The relay already has a generic branch that pairs values correctly (relay/src/state.rs:605-624), but it is unreachable because the 8-field branch matches first. The likely fix is widening the plugin payload to 16 paired values. Yaw is a known exception: no pilot yaw dataref exists, so the plugin deliberately uses the flightmodel value (xplane_plugin/src/pilotdatasync-xp11.cpp:138-139).
Found while writing the setup documentation in #138 / #178.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with relay/src/update.rs:222-223 and relay/src/state.rs:584-624, then trace the plugin payload in xplane_plugin/src/pilotdatasync-xp11.cpp:418-428 and the yaw exception at 138-139. Verify that the relay receives and preserves paired flightmodel and pilot values, that the 8-field branch no longer masks the generic pairing, and that yaw retains its documented behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, rust
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100