Skip to content

#18 Limiter dashboard feedback Implementation, #14 debug fix#21

Open
byBlurr wants to merge 8 commits into
lespalt:mainfrom
byBlurr:main
Open

#18 Limiter dashboard feedback Implementation, #14 debug fix#21
byBlurr wants to merge 8 commits into
lespalt:mainfrom
byBlurr:main

Conversation

@byBlurr
Copy link
Copy Markdown

@byBlurr byBlurr commented Aug 23, 2023

RPM lights flash yellow if the limiter is enabled. flashes on for half second, off for half second.

I have tested this by reverting if (!(ir_EngineWarnings.getInt() & irsdk_pitSpeedLimiter)) but have not tested it by enabling the pit limiter in sim. I do not have access to my pc with iRacing installed. Please test that the if statement works when enabling/disabling the limiter in sim. If it doesn't, then OverlayDDU.h line 261 needs looking into. If there are any other issues, I can look into them.

- Needs testing, no iracing install
- Moved limiter lights out of rpm for loop.
- Tested by reverting if statement, not tested with iRacing client open.
@byBlurr byBlurr mentioned this pull request Aug 23, 2023
@lespalt
Copy link
Copy Markdown
Owner

lespalt commented Aug 23, 2023

I think I played around with irsdk_pitSpeedLimiter back then trying to do something similar, but it didn't quite work the way I expected. Please let me know once someone has had the chance to test this and I'll be happy to review/merge.

Comment thread OverlayDDU.h
D2D1_ELLIPSE l6 = { float2(r2ax(0.5f - ww / 2 + (6 + 0.5f) * ww / 8),r2ay(0.065f)), r2ax(0.007f), r2ax(0.007f) };
D2D1_ELLIPSE l7 = { float2(r2ax(0.5f - ww / 2 + (7 + 0.5f) * ww / 8),r2ay(0.065f)), r2ax(0.007f), r2ax(0.007f) };

int frames = 60;
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.

Would be nice if this was time-based rather than counting frames. I think there's some "blinking" logic in other places in the code.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Agreed, I will take a look

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This is the only thing left to do for this implementation now. I am unsure where blinking has been used elsewhere? I'll take another skim through.

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.

I might be misremembering about blinking used elsewhere. It was in there at some point for something, but I might have removed it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

For now I have opted for using the current tick count to work out if the lights should be on or off. Only thing is that I had to use a magic number (16) because the tick count was jumping 16 for every render call, however on odd occasions it would jump 17. There's definitely better ways of doing it, but this illuminates the need for incrementing a variable every tick.

The main rpm lights are moved out of the pit limiter if statement scope now, so this shouldn't affect performance at all if not using the limiter. I have fully tested this now on a laptop with lowest possible graphics settings, if anything would have performance issues it is this laptop. Tested on both 30Hz and 60Hz. I believe this is ready for merge.

Comment thread OverlayDDU.h Outdated
- Moved draw into its own for loop
- Changed to only draw outline on LEDs, allowing RPM to still be displayed on LEDs when limiter is enabled
- Gear indicator background flashes green in sync with LED outline
@byBlurr
Copy link
Copy Markdown
Author

byBlurr commented Aug 23, 2023

I also committed a small change adding a lap counter to the standings overlay. So this PR also covers issue #9

@byBlurr
Copy link
Copy Markdown
Author

byBlurr commented Aug 23, 2023

I am having no luck with fixing my issue #22... I am unable to diagnose it and therefor unable to test any features. I will leave it as is for now for someone else to test before I make any further changes.

- No longer crashes in debug mode
@byBlurr
Copy link
Copy Markdown
Author

byBlurr commented Aug 23, 2023

This pull request now also includes the commit 8a9221c which fixes issue #14 (thanks to them for fixing it but not creating a pull request).

I have tested the pit limiter now and everything is working as expected. Tested in 60Hz and 30Hz mode.

@byBlurr byBlurr changed the title Added flashing RPM LED's for pit limiter #18 Limiter dashboard feedback Implementation, #9 current lap implementation, #14 debug fix Aug 23, 2023
- Changed how timing works for pit limiter feedback
- Would prefer to not use as many magic numbers, but I am limited by inconsistency in tick numbers
@byBlurr
Copy link
Copy Markdown
Author

byBlurr commented Aug 23, 2023

Should be good for this pr to be merged. Will close issues #18 #9 and #14

This reverts commit cddd59c.

Reverted as this would create a conflict with the @frmjar fork.
@byBlurr
Copy link
Copy Markdown
Author

byBlurr commented Aug 24, 2023

a4d3118 reverts laps on leaderboard, as this would create a conflict with the @frmjar fork.

@byBlurr byBlurr changed the title #18 Limiter dashboard feedback Implementation, #9 current lap implementation, #14 debug fix #18 Limiter dashboard feedback Implementation, #14 debug fix Aug 24, 2023
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