Conversation
There was a problem hiding this comment.
Pull request overview
This pull request updates the War Thunder telemetry integration to handle the inconsistent /state endpoint responses, which reliably returns data for air battles but often returns {"valid": false} for ground and naval battles. The PR restructures the data models to match actual API responses and adds configuration for handling invalid frames.
Changes:
- Changed
Validfield fromint(1/0) tobool(true/false) across War Thunder data structures to match actual API responses - Restructured
StateDataandIndicatorsDatato support multiple vehicle types (air, ground, naval) with vehicle-specific fields - Added
StateSourceOptionsfor configurable invalid frame handling - Enhanced error handling and debug logging in HTTP polling infrastructure
- Updated demo and examples to display comprehensive flight telemetry dashboard
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| mockoon/war-thunder-environment.json | Updated mock API responses to use boolean valid field and added vehicle-specific response examples (tank, plane) matching real API structure |
| GamesDat/Telemetry/Sources/WarThunder/StateSourceOptions.cs | New configuration class for controlling invalid frame filtering and logging behavior |
| GamesDat/Telemetry/Sources/WarThunder/StateSource.cs | Added constructor overloads and override for filtering invalid frames (implementation incomplete) |
| GamesDat/Telemetry/Sources/WarThunder/StateData.cs | Complete restructure from generic XYZ coordinates to detailed aircraft telemetry fields with units in property names; removed StructLayout |
| GamesDat/Telemetry/Sources/WarThunder/IndicatorsData.cs | Added vehicle type fields (army, type as strings), expanded to support air/ground/naval indicators; documented BinarySessionWriter incompatibility |
| GamesDat/Telemetry/Sources/HttpPollingSourceOptions.cs | Increased MaxConsecutiveErrors default from 10 to 30, added EnableDebugLogging option |
| GamesDat/Telemetry/Sources/HttpPollingSourceBase.cs | Removed unmanaged constraint, enhanced debug logging, changed OperationCanceledException handling to always terminate |
| GamesDat/GameSession.cs | Improved cancellation diagnostics to distinguish expected vs unexpected cancellation |
| GamesDat.Demo/Program.cs | Enhanced with comprehensive flight telemetry dashboard UI displaying flight parameters, controls, and engine status |
| Examples/WarThunderExample.cs | Updated property references to match new StateData field names (e.g., IndicatedAirspeedKmh, AltitudeMeters) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot open a new pull request to apply changes based on the following feedback:
|
|
@codegefluester I've opened a new pull request, #18, to work on those changes. Once the pull request is ready, I'll request review from you. |
…taVersion, combine if statements Co-authored-by: codegefluester <203914+codegefluester@users.noreply.github.com>
- Change StateData.Valid field type from int to bool (breaking change from PR #18) - Add parameter validation documentation for hz parameter (from PR #16) - Update troubleshooting section to reference boolean Valid field This update reflects changes from merged PRs #14, #16, #17, and #18. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Document breaking change: Valid field changed from int to bool - Add parameter validation section for hz parameter - Add breaking changes section at top of document - Update troubleshooting section to reference boolean type - Add notes about complete field listings in source files Addresses changes from PR #18, #16, #17, and #14. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Document breaking change: Valid field changed from int to bool - Add parameter validation section for hz parameter - Add breaking changes section at top of document - Update troubleshooting section to reference boolean type - Add notes about complete field listings in source files Addresses changes from PR #18, #16, #17, and #14. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Looks like the
/stateendpoint is only returning data (reliably) for air battles. For ground and naval battles the response is more than often just{"valid": false}