• Dear visitors,

    The email issue has been finally solved.
    Thank you for your patience and happy browsing.

    Team ACM.

QUESTION F1 rain light status

LeGuyTremblay

New Member
When I’m driving a recent Formula One, I would like to know the state of the rain light. Based on what I saw the state are:

1-OFF, most of the time.
2-Flashing, when the pit limiter enabled or the battery is recharging.
3-ON, under rain condition.

Do you have any idea where can I seek to fulfill those three different states? So far, the AC Remote Telemetry UDP daemon seems to address the pit zone state. Does anybody know how can I get the other information?

Sincerely,
 

fughettaboutit

aka leBluem
two examples from user Xela1 on CSP discord, those are additions to the cars config, whether in
"...assettocorsa\content\cars\_carname_\extension\ext_config.ini"
or
"...assettocorsa\extension\config\cars\_carname_.ini"

Code:
; ks_Audi R8 GT3
[EMISSIVE_WIPERS_MODE_...] ; FOGLIGHT rear
NAME=LIGHT_m_brake
COLOR=15,1,1,80

; ks BMW Z4_GT3
[EMISSIVE_WIPERS_MODE_...] ; FOGLIGHT rear Xela1
NAME=LIGHT_CENTRAL_STOP
COLOR=15,1,1,30
 

fughettaboutit

aka leBluem
@Dany Hillary maybe its interesting for others too:
you put it in 'extended' CSP car config, whether in
\assettocorsa\content\cars\yourcar\extension\ext_config.ini
or
\assettocorsa\assettocorsa\extension\config\cars\yourcar.ini
(here you should search any sub folder for existing configs)

You have to know the name of the thing you want to have as that rain light, you can find out in showroom (or ingame with ObjectInspector):

upload_2021-8-4_17-45-12.png


In case of the vrc_formula_alpha_2007 there is no config in "loaded" folder, it has its own config:
"...cars\vrc_formula_alpha_2007_f07\extension\ext_config.ini"

There simply insert this:
Code:
[EMISSIVE_WIPERS_MODE_...]
NAME=EXT_rainlight
COLOR=15,1,1,30
upload_2021-8-4_17-45-23.png
 
Last edited:

fughettaboutit

aka leBluem
@Dany Hillary
if you want it to blink add this:

BLINK_REPEAT=1
BLINK_FREQENCY_HZ=4 ;;; make it blink faster (Hz is per second)

updated the CSP wiki on Github with correct info about this.
 
Last edited:

Dany Hillary

New Member
:) it worked. yep i checked it. is this one for adjusting the brightness of tail light?
BRAKELIGHT_LIGHT_MULT = 0.2
BRAKELIGHT_LIGHT_RANGE_MULT = 0.5
 

LeGuyTremblay

New Member
First that for your help. This is my first app and my spare time is limited but I hope to finish a first release this month.

After reading your comments, I used Object Inspector with a “Formula Hybrid 2021” car. I found under the mesh ERS_Harvest, the variable ksEmissive was 0,0,0 when light OFF and 333,0,0 when the light is ON. I can't comment if this is the right way or not. What I can say is I don’t think this is the right approach for me because each car model will use a different object name. I am sure there is another way having those informations.

My goal is to activate a real F1 light (McLaren Rainlight-3) when the virtual one is activated. That light is fully programable and so far, I can do anything with it. Honestly any light can do the job, I just want to learn what a thru one can do including CAN protocol. My missing part is how can I bridge the light activation with games like AC. For now, I will limit myself to F1 cars. The light can also accommodate LMP FIA rules with two zones (rain, braking). This maybe consider for another release, but I don't have the interest for now.

On my initial question, I was wrong with the 3 different states. Under rain the light isn’t always ON anymore, it is always flashing like when ERS is recharging.

I will keep searching/testing into the share memory to make sure I can cover all the scenarios.

Sincerely,
 
Last edited:

fughettaboutit

aka leBluem
First that for your help. This is my first app and my spare time is limited but I hope to finish a first release this month.

After reading your comments, I used Object Inspector with a “Formula Hybrid 2021” car. I found under the mesh ERS_Harvest, the variable ksEmisive was 0,0,0 when light OFF and 333,0,0 when the light is ON. I can't comment if this is the right way or not. What I can say is I don’t think this is the right approach for me because each car model will use a different object name. I am sure there is another way having those informations.

My goal is to activate a real F1 light (McLaren Rainlight-3) when the virtual one is activated. That light is fully programable and so far, I can do anything with it. Honestly any light can do the job, I just want to learn what a thru one can do including CAN protocol. My missing part is how can I bridge the light activation with games like AC. For now, I will limit myself to F1 cars. The light can also accommodate LMP FIA rules with two zones (rain, braking). This maybe consider for another release, but I don't have the interest for now.

On my initial question, I was wrong with the 3 different states. Under rain the light isn’t always ON anymore, it is always flashing like when ERS is recharging.

I will keep searching/testing into the share memory to make sure I can cover all the scenarios.

Sincerely,
there is no standard way to access stuff, every car is different, everyone needs a different config then...
 

fughettaboutit

aka leBluem
what works in an app is this:

RainParams = ac.ext_rainParams() # get current rain/wipers state from patch
print( RainParams[0] * 100 + ' percent rainy')
 

fughettaboutit

aka leBluem
see all available new "ac.ext_..." python-functions in this file:
Documents\Assetto Corsa\logs\custom_shaders_patch.log
upload_2021-8-8_23-18-38.png


For usage of a particular one, just ask here :whistle:
 

LeGuyTremblay

New Member
My Python app working fine (rain, KERS charge, pit limiter). I was able doing it without being restricted to any specific car light object.

My last error is with with a USB-Serial relay to activate or not the rear light. I don't know why but I can't import the serial lib that all Python bundle have. Does anybody having an idea?

***py.log***
[backLight: error] Traceback (most recent call last):
File "apps/python/backLight\backLight.py", line 20, in <module>
import serial
ImportError: No module named 'serial'

***backlight.py***
16 import os
17 import sys
18 import math
19 import time
20 import serial
21 import ac
22 import acsys
23
24 import platform
25 if platform.architecture()[0] == "64bit":
26 sysdir='apps/python/backLight/third_party/stdlib64'
27 else:
28 sysdir='apps/python/backLight/third_party/stdlib'
29 sys.path.insert(0, sysdir)
30 os.environ['PATH'] = os.environ['PATH'] + ";."
31 sys.path.insert(len(sys.path), 'apps/python/backLight/third_party')
32 from sim_info import info

Sincerely
 

fughettaboutit

aka leBluem
AC uses its own implementation/pack of python 3.3, if you unpack
assettocorsa\system\x64\Python33.zip
there is no serial module

You have to provide it yourself in the app folder maybe, but it might be that it needs other modules...
 
Top