To Use above code
Insert this into your logic area (between "<logic>...</logic>". You obviously need to replace the analogue id with the id you declare in the io section "<io>...</io>". And you must reference the above code in a seperate function file in the "<require></require>" area.
**Note: The "..." in the following code mean that there can/will be other non-related items between the code sections. Fusion Control Centre Uber Edition doesn't care about the order. It only cares about heirarchy. Meaning "<iochannel>...</iochannel>"
must occur between the opening "<io>" and closing "</io>" tags. If it is not in there, FCC will skip right over it, and that input channel will never be created.
Code:
...
<require>
...
<!-- Begin Function Instances -->
<function file="content\config\AirRidePressureSensorModule" id="AirPressureSensor"></function>
<!-- End Function Instances -->
...
</require>
...
...
<io>
...
<!-- Begin Analogue Input Instances -->
<iochannel id="RF Air" port="0" brain="TucciBrain2" type="analogue_input">
<options history="10" auto_average="true"></options>
</iochannel>
<iochannel id="LR Air" port="1" brain="TucciBrain2" type="analogue_input">
<options history="10" auto_average="true"></options>
</iochannel>
<iochannel id="LF Air" port="2" brain="TucciBrain2" type="analogue_input">
<options history="10" auto_average="true"></options>
</iochannel>
<iochannel id="RR Air" port="3" brain="TucciBrain2" type="analogue_input">
<options history="10" auto_average="true"></options>
</iochannel>
<!-- End Analogue Input Instances -->
...
</io>
...
...
<logic>
...
<!-- Begin Variable Declarations -->
<all_variables>
<variable name="Variable_LeftFrontAir">50.0</variable>
<variable name="Variable_LeftRearAir">50.0</variable>
<variable name="Variable_RightFrontAir">50.0</variable>
<variable name="Variable_RightRearAir">50.0</variable>
</all_variables>
<!-- End Variable Declarations -->
<all_statements>
<if fire_on="logic">
<parameter1>
<variable do="set" name="Variable_LeftFrontAir">
<evaluate function="AirPressureSensor">
<input order="1">
<analogue id="LF Air" time="0"></analogue>
</input>
</evaluate>
</variable>
</parameter1>
</if>
<if fire_on="logic">
<parameter1>
<variable do="set" name="Variable_LeftRearAir">
<evaluate function="AirPressureSensor">
<input order="1">
<analogue id="LR Air" time="0"></analogue>
</input>
</evaluate>
</variable>
</parameter1>
</if>
<if fire_on="logic">
<parameter1>
<variable do="set" name="Variable_RightFrontAir">
<evaluate function="AirPressureSensor">
<input order="1">
<analogue id="RF Air" time="0"></analogue>
</input>
</evaluate>
</variable>
</parameter1>
</if>
<if fire_on="logic">
<parameter1>
<variable do="set" name="Variable_RightRearAir">
<evaluate function="AirPressureSensor">
<input order="1">
<analogue id="RR Air" time="0"></analogue>
</input>
</evaluate>
</variable>
</parameter1>
</if>
...
</allstatements>
...
</logic>