Flashing lights

Discussion in 'General Discussion' started by Rui Santos, Aug 5, 2019.

  1. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    504
    Likes Received:
    519
    https://www.fiawec.com/en/lights/88
    Any flash of headlights on the track needs to be individually actioned by the driver without any assistance. A sequence cannot last more than 2 seconds and cannot have more than 4 flashes.
     
  2. Rui Santos

    Rui Santos Registered

    Joined:
    Jan 8, 2012
    Messages:
    554
    Likes Received:
    501
    Guys, let's not be lost in technical aspects, we need flashing lights, like there is in some simulators, i see lots of people talking about this, we don't want 10 seconds flash, but a brief 5 flashes for example, 1 or 1,5 seconds...
     
  3. Bill Worrel

    Bill Worrel Registered

    Joined:
    May 1, 2019
    Messages:
    55
    Likes Received:
    37
    I guess I shouldn't be surprised, but that's a good way to determine the rule - just use the one from the real sanctioning body.
     
  4. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    504
    Likes Received:
    519
    There's a simpler way for Crew Chief users:

    CCFlashMacro.jpg

    @The Iron Wolf strikes again! :cool:
     
  5. Rui Santos

    Rui Santos Registered

    Joined:
    Jan 8, 2012
    Messages:
    554
    Likes Received:
    501
    It's a great trick and i love creative people, but again... we need this integrated in the sim... :D
     
  6. davehenrie

    davehenrie Registered

    Joined:
    Jul 6, 2016
    Messages:
    1,762
    Likes Received:
    1,042
    I have created the above macro, but I don't see any way to use it. Looking at the button commands in the console and there is no macro listed to assign either voice or button.
     
  7. The Iron Wolf

    The Iron Wolf Member

    Joined:
    Feb 20, 2016
    Messages:
    850
    Likes Received:
    715
    currently, binding button to macro is not supported, but we will look into adding that. You can trigger it via voice command in the "Voice Command" group box, under "Integer Type"
     
  8. davehenrie

    davehenrie Registered

    Joined:
    Jul 6, 2016
    Messages:
    1,762
    Likes Received:
    1,042
    That worked! Thanks IW. I think the delay between flashes was alittle slow. I'm gonna reduce the timings some.
     
    JimmyT likes this.
  9. JimmyT

    JimmyT Registered

    Joined:
    Jan 16, 2012
    Messages:
    464
    Likes Received:
    245
    How good is that?
    Pretty sure I've said it before but "CC is the best plugin EVER" Thanks again @The Iron Wolf you're a genius.
     
    davidporeilly likes this.
  10. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    504
    Likes Received:
    519
    Excellent!
    It worked for me with "Regular Type", I'll have to find out what "Integer Type" means...

    I did find two issues (I'm using the ACC beta version) with the macros
    1. The "Repeated key presses" option didn't work, the headlights came on and stayed on. When I used the macro again they turned off.
    2. I selected a "Confirmation message" but it didn't save it in the macro and I never heard it.
    I didn't look into either in any depth.
     
  11. The Iron Wolf

    The Iron Wolf Member

    Joined:
    Feb 20, 2016
    Messages:
    850
    Likes Received:
    715
    Thanks, all credit here goes to Morten on our team, he came up with Macro Editor idea :)
     
  12. JimmyT

    JimmyT Registered

    Joined:
    Jan 16, 2012
    Messages:
    464
    Likes Received:
    245
    Well done that man.
     
  13. davehenrie

    davehenrie Registered

    Joined:
    Jul 6, 2016
    Messages:
    1,762
    Likes Received:
    1,042
    so I had another thought, (ssshhh) how would I edit this flashing light to include a 2nd use. When entering the pits, many cars engage a flashing headlight whenever the pitlane speed limiter is engaged. I don't imagine we could tie the two together, but how would I edit the flashes so that if I say "Pitlane Flash" the lights start blinking, and remain blinking til I say "Pitlane Flash" again.(as I remove the pitlane speed limiter for example)
     
  14. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    6,229
    Likes Received:
    2,162
    @davehenrie that would be a perfect problem for a plugin to solve, from Seven Smiles for example. A plugin can see when you're in the pits, and can see whether the headlights are on, so could automatically flash the headlights. I started work on such a plugin (doing manual headlight flashes, and could do pitlane flashing too) then discovered the headlights are a 'vehicle control' and can't be (directly) controlled via a plugin, and stopped because I really wanted a neat solution. If Seven Smiles has already got a 'flasher' plugin prototype working that would be ideal, it just simulates the appropriate keypress sent to the game (same system as he's used for the realistic gearshift plugin, which does the same thing with clutch).
     
  15. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    504
    Likes Received:
    519
    Simple enough, the shared memory has
    Code:
    ('mSpeedLimiter', ctypes.c_ubyte),   # whether speed limiter is on
    
    and also
    Code:
    ('mInPits', ctypes.c_ubyte),                  # between pit entrance and pit exit (not always accurate for remote vehicles)
    
    Simplest answer (for me) would be to add it to the gearshift program - I can see this ending up as "rF2 general add-ons" program :)
     
    davehenrie likes this.
  16. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    504
    Likes Received:
    519
    I have something that works: https://github.com/TonyWhitley/rF2headlights/releases/tag/V0.3.23, just download the two .exe files.

    To set it up the way you want run rF2headlightsConfigurer.exe
    HeadlightConfigurer.jpg
    On the left are the buttons or keys that you use
    • You don't have to use all of the controls
    • Toggle headlights is the same as the present control
    • Flash headlights will flash them 4 times
    • Headlights on and off switch the headlights no matter whether they are on or off (like the switch in a real car)
    On the right the key that is sent to rFactor to control the headlights, the H key in this case.
    • Flash when pit limiter will flash them when the pit limiter is on (wherever you are)
    • Flash when in pit lane will flash them automatically when you enter the pit lane and stop them when you leave.
    That's just to set things up. Once you've done that run rF2headlights.exe before you start rFactor (it minimises itself to the toolbar as there's nothing to see).
     
    Last edited: Aug 17, 2019 at 12:27 PM
    davehenrie and Lazza like this.

Share This Page