set Branch to updated version#2
Conversation
remove test data comments
add extra debugging to info panel
this should reset the controller to the user profile (like leds etc and release control over it)
merge releasenotes 2.5.3.0 it is
2.5.3.0 DSX - Race Element now disconnects from DSX if there is no supported game running. iRacing - Lap Delta Bar HUD: Added 3 sources for delta calculation: Session Best, Last Lap and Optimal Lap. (By ConnorMolz)
add a base for a new hud that can collect data about acceleration
more progress
add working concept, use handbrake at slow speed to initiate
refactor
refactor
add better stuff
refactor
There was a problem hiding this comment.
Pull request overview
This pull request updates Race Element to version 2.5.3.0, adding a new DSX feature that disconnects from DSX when no supported game is running. The PR also includes a code style fix and a reordering of the contributors list.
- Added version 2.5.3.0 release notes documenting the DSX disconnect feature
- Added defensive null check for font field in InfoPanel.Draw method
- Fixed readonly modifier placement in BroadcastConfig to follow C# conventions
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Race_Element/Controls/Info/ReleaseNotes.cs | Added version 2.5.3.0 entry with DSX disconnect feature notes |
| Race_Element.HUD/Overlay/OverlayUtil/InfoPanel.cs | Added null check for _font field and imported LogWriter utility |
| Race_Element.Broadcast/BroadcastConfig.cs | Corrected readonly modifier order to match C# style guidelines |
| README.md | Moved ConnorMolz up in contributors list |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (_font == null) | ||
| { | ||
| LogWriter.WriteToLog("InfoPanel font is null, cannot draw panel."); | ||
| return; | ||
| } | ||
|
|
There was a problem hiding this comment.
The null check for _font is unnecessary because _font is a readonly field that is always initialized in the constructor (line 45). Since the field is readonly and cannot be reassigned after construction, and the constructor always assigns it via FontUtil.FontSegoeMono, this defensive check will never be true in normal operation. If FontUtil.FontSegoeMono can return null, the constructor itself should validate this rather than checking on every Draw call.
| if (_font == null) | |
| { | |
| LogWriter.WriteToLog("InfoPanel font is null, cannot draw panel."); | |
| return; | |
| } |
No description provided.