Repository navigation
Issue #274 solved: send from a flight loop, not the window's draw callback - #275
Merged
Merged
Conversation
…lback On Windows and Linux the 20 Hz send lived in the "Positional Flight Data" window's draw callback, so a window X-Plane never drew sent nothing, even with baton connected. Send from a flight loop instead, registered while the plugin is enabled, as the macOS build already does. The window now only displays values. Reading a sample moves into read_sample(), shared by the flight loop and the window's Send Packet button, which had its own copy. At start-up, write the window's position and each monitor's bounds to Log.txt, so a window that does not appear can be found.
Send from one place: send_sample() reads, logs and sends, and both the flight loop and the window's Send Packet button call it, so every sample gets its Log.txt line as the README says. Log the window's position as X-Plane placed it, rather than the bounds the plugin asked for, and list the monitors from XPLMGetAllMonitorBoundsOS as well. XPLMGetAllMonitorBoundsGlobal lists only full-screen X-Plane monitors, so in windowed mode it gave nothing to compare the window against. Correct the telemetry schema, which still described the removed draw callback throttle, and a comment that still spoke of two send sites.
The macOS build writes nothing to Log.txt, so the new guidance and the troubleshooting row now say which platforms they cover. The (OS) monitor lines are in the operating system's pixels, not Windows', since Linux builds the same file. A connected baton with no Send lines points at an old plugin build still installed, not an unticked plugin: baton and the flight loop start together.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Closes #274. On Windows and Linux the plugin sent only from the "Positional Flight Data" window's draw callback, so a window X-Plane never drew sent nothing. Sending now runs in a flight loop, as the macOS build already does. The window only displays values.
The README,
inference/README.md,AGENTS.mdanddocs/telemetry_schema.mdno longer say that data needs the window open. The Log.txt guidance is limited to Windows and Linux, because the macOS build writes nothing there.Evidence
Log.txthad no[PDS PLUGIN] Draw sendlines,baton_debug.loghad noAttempted to sendlines, and the logger's CSV stayed empty.After: On the same PC with 2cfa261, telemetry reached the relay and
data_loggerwrote rows to the CSV.send_sample(), the monitor logging and the docs) build and passmeson testbut have not been run in X-Plane yet.meson testonly coverstest_threading_tools(gtest target tests a locally redefined function, not production code #191). The plugin calls the X-Plane SDK directly, so no automated test exercises it.main's draw-callback send. Both yaw halves and both G-force halves still carry the flightmodel value.Merge Danger
Door: two-way
Reverting restores the draw-callback send. The payload, the relay, the CSV columns and the config are unchanged.
Blast Radius: plugin
PilotDataSync.xpl. The relay andinferenceneed no change.Log.txtgets one line per sample (up to 20 a second), which was already the case while the window was drawn.