Skip to content

Water temperature HUD in LocalCarData, AMS2 DSX/mapper support, DSX and ACC fixes#301

Open
aaronfang wants to merge 7 commits intoRiddleTime:devfrom
aaronfang:dev
Open

Water temperature HUD in LocalCarData, AMS2 DSX/mapper support, DSX and ACC fixes#301
aaronfang wants to merge 7 commits intoRiddleTime:devfrom
aaronfang:dev

Conversation

@aaronfang
Copy link
Copy Markdown
Contributor

What changed

Data and game adapters

  • LocalCarData: Add engine coolant (water) and oil temperature fields for overlays.
  • Richard Burns Rally (RBRDataProvider): Map relevant temperatures from Kelvin to Celsius for consistency with other titles.
  • Automobilista 2 (Mapper): Compute signed slip ratio per wheel from wheel speed and ground speed; fix longitudinal acceleration unit conversion (m/s² → g).

New overlay

  • WaterTemperature: New overlay with configurable font, threshold-based coloring, and Celsius/Fahrenheit unit selection (WaterTemperatureConfiguration + WaterTemperatureOverlay).

DSX

  • Shared DSX (Race Element.HUD.Common): AMS2 support including signed slip handling;
  • extract CalculateFrequency helper;
  • add InvertFrequency for brake and throttle.
  • Bugfix: AddCustomAdaptiveTriggerToPacket no longer overwrites the valueMode argument (DsxPacketExtensions / DsxOverlay and related call sites).
  • ACC-specific (Race_Element.HUD.ACC): Fix operator precedence for averageRearTyreSlip so the expression evaluates correctly.

Files touched (high level)

  • Race Element.Data/Common/SimulatorData/LocalCar/LocalCarData.cs
  • Race Element.Data/Games/Automobilista2/DataMapper/Mapper.cs
  • Race Element.Data/Games/RichardBurnsRally/RBRDataProvider.cs
  • Race Element.HUD.Common/Overlays/Driving/DSX/* ( and new WaterTemperature/* )
  • Race_Element.HUD.ACC/Overlays/Driving/DSX/TriggerHaptics.cs

Suggested checks for reviewers

  • AMS2: Verify per-wheel slip sign and DSX trigger behaviour (including reverse / opposite slip).
  • RBR: Confirm coolant temperatures match expectations versus other readouts.
  • ACC DSX: Compare rear-slip-driven haptics before/after the precedence fix under similar conditions.
  • Water temperature overlay: Threshold colours and ℃/℉ switching.

…temperatures from Kelvin to Celsius

Made-with: Cursor
… and unit (Celsius/Fahrenheit)

Made-with: Cursor
…round speed, fix acceleration unit conversion from m/s2 to G

Made-with: Cursor
…quency helper, add InvertFrequency option for brake and throttle

Made-with: Cursor
…ter, fix ACC averageRearTyreSlip operator precedence

Made-with: Cursor
Copy link
Copy Markdown
Owner

@RiddleTime RiddleTime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most looks good except some data modification that should happen within the data provider of AMS.


float slipRatioFrontLeft, slipRatioFrontRight, slipRatioRearLeft, slipRatioRearRight;

if (useSignedSlip)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be within the data provider.


float slipRatioFrontLeft, slipRatioFrontRight, slipRatioRearLeft, slipRatioRearRight;

if (useSignedSlip)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, this should be within the data provider. Handle negative slip ratio values there.

@aaronfang
Copy link
Copy Markdown
Contributor Author

Thanks for the review! I've addressed both points:

Changes made:

  1. AMS2 Data Provider (Race Element.Data/Games/Automobilista2/DataMapper/Mapper.cs, line 168-174)

    • Modified to return absolute slip ratio values using Math.Abs() for consistency with other games
  2. DSX TriggerHaptics (Race Element.HUD.Common/Overlays/Driving/DSX/TriggerHaptics.cs)

    • Removed game-specific logic from HandleBrakingGeneric (previously line 40-63)
    • Removed game-specific logic from HandleAccelerationGeneric (previously line 110-133)
    • Now uniformly handles absolute slip values from all data providers

The signed slip handling is now properly contained within the AMS2 data provider, and the HUD layer no longer needs to know which games use signed vs unsigned slip ratios.

Let me know if there's anything else that needs adjustment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants