iFlag via WS2812B R...
 
Notifications
Clear all

iFlag via WS2812B RGB LEDs : Formulas

2 Posts
2 Users
0 Reactions
2,765 Views
(@kolbinator88)
New Member
Joined: 4 years ago
Posts: 1
Topic starter  

Hi all,

 

due to the fact that I built 2x iflags for right and left (and I wanted to mirror the effects and also to only have the spotter on the correct side) I had to use the WS2812B RGB LEDs.

Most of the stuff is working pretty good e.g. blue flag (mostly with custom animation).

There are still a few effects that I want to add:

- One Lap to Green ( [GameRawData.Telemetry.SessionFlagsDetails.IsoneLapToGreen])

- Incidents  ( [GameRawData.SessionData.DriverInfo.DriverIncidentCount])

- Show a custom sysmbol when not in car (Iracing) to remind me to use the correct setup > Is it possible to only show in the menu, before joining the car?

I tried a few formulas for that and it technically is working but once the leds light up for this specific effects it wont go away anymore. Is there a possibility to add a specific time period I want to have them shown?

Further for the symbol for the setup I tried to use the "When ingame formula" but then it always shows it. Any suggestion how I can make it just as a period effect?

Last question: Is there also a formula for beeing in the DRS Zone when it shows if you are allowed to use it (1 green LED in the cockpit dash)?

Thanks in advance for your support.

Best regards


   
Quote
(@romainrob)
Honorable Member
Joined: 5 years ago
Posts: 530
 

Hi.
Use the changed, isincreasing or isdecreasing function, to control the effect duration:
https://github.com/SHWotever/SimHub/wiki/NCalc-scripting#changeddelay-value

This is the formula I use to display a 15sec "load car setup" reminder on my dash:

changed(15000,
(
changed(10,isnull([DataCorePlugin.GameData.NewData.SessionTypeName],''))
or
isincreasing(10,isnull([DataCorePlugin.GameRunning],0))
)
)
and
isnull([DataCorePlugin.GameRawData.SessionData.WeekendInfo.WeekendOptions.IsFixedSetup],0)!=1

 

You can get the DRS info from DataCorePlugin.GameRawData.Telemetry.DRS_Status
But the values are inconsistent across the cars so it's trickier than it should be:(


   
ReplyQuote
Share: