[Go back to index]

Asobo\Common\Inputs\Instrument_Inputs.xml

Source XML
<ModelBehaviors> <Include ModelBehaviorFile="ASOBO\Inputs\Helpers.xml"/> <InputEvent ID="INSTRUMENT"> <Presets> <Switch> <Case NotEmpty="BARO_ID"> <Preset ID="INSTRUMENT_Altimeter_#BARO_ID#"> <Parameters Type="Default"> <UPPER_LIMIT>1060</UPPER_LIMIT> <INCREMENT>1</INCREMENT> <LOWER_LIMIT>955</LOWER_LIMIT> <ON_BEFORE_INC/> <ON_BEFORE_DEC/> <ON_BEFORE_SET/> <ON_AFTER_INC_EXTERNAL_CODE/> <ON_AFTER_DEC_EXTERNAL_CODE/> <ON_AFTER_SET/> <ON_AFTER_INC/> <ON_AFTER_DEC/> <INPUTEVENT_VAR_TYPE>L</INPUTEVENT_VAR_TYPE> <INPUTEVENT_VAR_NAME>INSTRUMENT_Altimeter_#BARO_ID#</INPUTEVENT_VAR_NAME> </Parameters> <Parameters Type="Default"> <ON_STATE_CHANGED_EXTERNAL_CODE/> </Parameters> <Parameters Type="Override"> <TT_VALUE>(A:KOHLSMAN SETTING HG:#BARO_ID#, inHg) '%.2fIN' @sprintf</TT_VALUE> <INC_EVENT>(#INPUTEVENT_VAR_TYPE#:#INPUTEVENT_VAR_NAME#) p0 + (&gt;B:INSTRUMENT_Altimeter_#BARO_ID#_Set)</INC_EVENT> <DEC_EVENT>(#INPUTEVENT_VAR_TYPE#:#INPUTEVENT_VAR_NAME#) p0 - (&gt;B:INSTRUMENT_Altimeter_#BARO_ID#_Set)</DEC_EVENT> <SET_EVENT>#BARO_ID# p0 #LOWER_LIMIT# max #UPPER_LIMIT# min s0 16 * (&gt;K:2:KOHLSMAN_SET) l0 (&gt;#INPUTEVENT_VAR_TYPE#:#INPUTEVENT_VAR_NAME#)</SET_EVENT> <INIT_VALUE>(A:KOHLSMAN SETTING HG:#BARO_ID#, Millibar) (&gt;#INPUTEVENT_VAR_TYPE#:#INPUTEVENT_VAR_NAME#)</INIT_VALUE> <ON_STATE_CHANGED/> </Parameters> <Parameters Type="Override"> <ON_STATE_CHANGED>#ON_STATE_CHANGED# #ON_STATE_CHANGED_EXTERNAL_CODE#</ON_STATE_CHANGED> <ON_AFTER_INC>#ON_AFTER_INC# #ON_AFTER_INC_EXTERNAL_CODE#</ON_AFTER_INC> <ON_AFTER_DEC>#ON_AFTER_DEC# #ON_AFTER_DEC_EXTERNAL_CODE#</ON_AFTER_DEC> </Parameters> <Parameters Type="Default"> <INTERACTION_FLAGS>PRIMARY_DOWN+X_AXIS</INTERACTION_FLAGS> <INTERACTION_LOCKABLE_FLAGS>X_AXIS</INTERACTION_LOCKABLE_FLAGS> <TT_ICON>ROTATE</TT_ICON> </Parameters> <Tooltip> <Icon>#TT_ICON#</Icon> <Interaction>#INTERACTION_FLAGS#</Interaction> <InteractionLockable>#INTERACTION_LOCKABLE_FLAGS#</InteractionLockable> <TTDescription>@TT_Package.INSTRUMENT_KNOB_ALTIMETER_ACTION_SET</TTDescription> <TTValue RPN="True">#TT_VALUE#</TTValue> </Tooltip> <Value> <Units>bool</Units> <Code>(#INPUTEVENT_VAR_TYPE#:#INPUTEVENT_VAR_NAME#)</Code> <Init>#INIT_VALUE#</Init> <WatchVars> <Simvar ID="KOHLSMAN SETTING HG:#BARO_ID#"/> </WatchVars> </Value> <Inc> <Code>#ON_BEFORE_INC# #INC_EVENT# #ON_AFTER_INC#</Code> <Parameters> <Param Type="Float" RPN="True">p0 #INCREMENT# *</Param> </Parameters> <Bindings> <Binding EventID="KOHLSMAN_INC"> <Param RPN="True">p0 #INCREMENT# *</Param> </Binding> </Bindings> </Inc> <Dec> <Code>#ON_BEFORE_DEC# #DEC_EVENT# #ON_AFTER_DEC#</Code> <Parameters> <Param Type="Float" RPN="True">p0 #INCREMENT# *</Param> </Parameters> <Bindings> <Binding EventID="KOHLSMAN_DEC"> <Param RPN="True">p0 #INCREMENT# *</Param> </Binding> </Bindings> </Dec> <Set> <Code>#ON_BEFORE_SET# #SET_EVENT# #ON_AFTER_SET# #ON_STATE_CHANGED#</Code> <Parameters> <Param Type="Float" RPN="True">p0</Param> </Parameters> <Bindings> <Binding EventID="KOHLSMAN_SET"> <Param RPN="True">p0</Param> </Binding> </Bindings> </Set> </Preset> </Case> <Case NotEmpty="CRS_ID"> <Preset ID="INSTRUMENT_Course_#CRS_ID#"> <Parameters Type="Default"> <UPPER_LIMIT>359</UPPER_LIMIT> <INCREMENT>1</INCREMENT> <LOWER_LIMIT>0</LOWER_LIMIT> <ON_BEFORE_INC/> <ON_BEFORE_DEC/> <ON_BEFORE_SET/> <ON_AFTER_INC_EXTERNAL_CODE/> <ON_AFTER_DEC_EXTERNAL_CODE/> <ON_AFTER_SET/> <ON_AFTER_INC/> <ON_AFTER_DEC/> <INPUTEVENT_VAR_TYPE>L</INPUTEVENT_VAR_TYPE> <INPUTEVENT_VAR_NAME>INSTRUMENT_Course_#CRS_ID#</INPUTEVENT_VAR_NAME> </Parameters> <Parameters Type="Default"> <ON_STATE_CHANGED_EXTERNAL_CODE/> </Parameters> <Parameters Type="Override"> <TOOLTIP_VALUE>(#INPUTEVENT_VAR_TYPE#:#INPUTEVENT_VAR_NAME#) '%.0f°' @sprintf</TOOLTIP_VALUE> <INC_EVENT>(#INPUTEVENT_VAR_TYPE#:#INPUTEVENT_VAR_NAME#) p0 + (&gt;B:INSTRUMENT_Course_#CRS_ID#_Set)</INC_EVENT> <DEC_EVENT>(#INPUTEVENT_VAR_TYPE#:#INPUTEVENT_VAR_NAME#) p0 - (&gt;B:INSTRUMENT_Course_#CRS_ID#_Set)</DEC_EVENT> <SET_EVENT>p0 dnor #LOWER_LIMIT# max #UPPER_LIMIT# min s0 (&gt;K:VOR#CRS_ID#_SET) l0 (&gt;#INPUTEVENT_VAR_TYPE#:#INPUTEVENT_VAR_NAME#)</SET_EVENT> <INIT_VALUE>(A:NAV OBS:#CRS_ID#, Degrees) (&gt;#INPUTEVENT_VAR_TYPE#:#INPUTEVENT_VAR_NAME#)</INIT_VALUE> <ON_STATE_CHANGED/> </Parameters> <Parameters Type="Override"> <ON_STATE_CHANGED>#ON_STATE_CHANGED# #ON_STATE_CHANGED_EXTERNAL_CODE#</ON_STATE_CHANGED> <ON_AFTER_INC>#ON_AFTER_INC# #ON_AFTER_INC_EXTERNAL_CODE#</ON_AFTER_INC> <ON_AFTER_DEC>#ON_AFTER_DEC# #ON_AFTER_DEC_EXTERNAL_CODE#</ON_AFTER_DEC> </Parameters> <Parameters Type="Default"> <INTERACTION_FLAGS>PRIMARY_DOWN+X_AXIS</INTERACTION_FLAGS> <INTERACTION_LOCKABLE_FLAGS>X_AXIS</INTERACTION_LOCKABLE_FLAGS> <TT_ICON>ROTATE</TT_ICON> </Parameters> <Tooltip> <Icon>#TT_ICON#</Icon> <Interaction>#INTERACTION_FLAGS#</Interaction> <InteractionLockable>#INTERACTION_LOCKABLE_FLAGS#</InteractionLockable> <TTDescription RPN="True">(R:1:@TT_Package.AUTOPILOT_KNOB_COURSE_ACTION_ADJUST)</TTDescription> <TTValue RPN="True">#TOOLTIP_VALUE#</TTValue> </Tooltip> <Value> <Units>bool</Units> <Code>(#INPUTEVENT_VAR_TYPE#:#INPUTEVENT_VAR_NAME#)</Code> <Init>#INIT_VALUE#</Init> </Value> <Inc> <Code>#ON_BEFORE_INC# #INC_EVENT# #ON_AFTER_INC#</Code> <Parameters> <Param Type="Float" RPN="True">p0 #INCREMENT# *</Param> </Parameters> <Bindings> <Binding EventID="KEY_VOR#CRS_ID#_INC"> <Param RPN="True">p1 #INCREMENT# *</Param> </Binding> </Bindings> </Inc> <Dec> <Code>#ON_BEFORE_DEC# #DEC_EVENT# #ON_AFTER_DEC#</Code> <Parameters> <Param Type="Float" RPN="True">p0 #INCREMENT# *</Param> </Parameters> <Bindings> <Binding EventID="KEY_VOR#CRS_ID#_DEC"> <Param RPN="True">p1 #INCREMENT# *</Param> </Binding> </Bindings> </Dec> <Set> <Code>#ON_BEFORE_SET# #SET_EVENT# #ON_AFTER_SET# #ON_STATE_CHANGED#</Code> <Parameters> <Param Type="Float" RPN="True">p0</Param> </Parameters> <Bindings> <Binding EventID="KEY_VOR#CRS_ID#_SET"> <Param RPN="True">p1</Param> </Binding> </Bindings> </Set> </Preset> </Case> <Case NotEmpty="ADF_ID"> <Preset ID="INSTRUMENT_ADF"> <Parameters Type="Default"> <UPPER_LIMIT>359</UPPER_LIMIT> <INCREMENT>1</INCREMENT> <LOWER_LIMIT>0</LOWER_LIMIT> <ON_BEFORE_INC/> <ON_BEFORE_DEC/> <ON_BEFORE_SET/> <ON_AFTER_INC_EXTERNAL_CODE/> <ON_AFTER_DEC_EXTERNAL_CODE/> <ON_AFTER_SET/> <ON_AFTER_INC/> <ON_AFTER_DEC/> <INPUTEVENT_VAR_TYPE>L</INPUTEVENT_VAR_TYPE> <INPUTEVENT_VAR_NAME>INSTRUMENT_ADF</INPUTEVENT_VAR_NAME> </Parameters> <Parameters Type="Default"> <ON_STATE_CHANGED_EXTERNAL_CODE/> </Parameters> <Parameters Type="Override"> <TOOLTIP_VALUE>(#INPUTEVENT_VAR_TYPE#:#INPUTEVENT_VAR_NAME#) '%.0f°' @sprintf</TOOLTIP_VALUE> <INC_EVENT>(#INPUTEVENT_VAR_TYPE#:#INPUTEVENT_VAR_NAME#) p0 + (&gt;B:INSTRUMENT_ADF_Set)</INC_EVENT> <DEC_EVENT>(#INPUTEVENT_VAR_TYPE#:#INPUTEVENT_VAR_NAME#) p0 - (&gt;B:INSTRUMENT_ADF_Set)</DEC_EVENT> <SET_EVENT>p0 dnor #LOWER_LIMIT# max #UPPER_LIMIT# min s0 (&gt;K:ADF_CARD_SET) l0 (&gt;#INPUTEVENT_VAR_TYPE#:#INPUTEVENT_VAR_NAME#)</SET_EVENT> <INIT_VALUE>(A:ADF RADIAL, degrees) (&gt;#INPUTEVENT_VAR_TYPE#:#INPUTEVENT_VAR_NAME#)</INIT_VALUE> <ON_STATE_CHANGED/> </Parameters> <Parameters Type="Override"> <ON_STATE_CHANGED>#ON_STATE_CHANGED# #ON_STATE_CHANGED_EXTERNAL_CODE#</ON_STATE_CHANGED> <ON_AFTER_INC>#ON_AFTER_INC# #ON_AFTER_INC_EXTERNAL_CODE#</ON_AFTER_INC> <ON_AFTER_DEC>#ON_AFTER_DEC# #ON_AFTER_DEC_EXTERNAL_CODE#</ON_AFTER_DEC> </Parameters> <Parameters Type="Default"> <INTERACTION_FLAGS>PRIMARY_DOWN+X_AXIS</INTERACTION_FLAGS> <INTERACTION_LOCKABLE_FLAGS>X_AXIS</INTERACTION_LOCKABLE_FLAGS> <TT_ICON>ROTATE</TT_ICON> </Parameters> <Tooltip> <Icon>#TT_ICON#</Icon> <Interaction>#INTERACTION_FLAGS#</Interaction> <InteractionLockable>#INTERACTION_LOCKABLE_FLAGS#</InteractionLockable> <TTDescription RPN="True">(R:1:@TT_Package.ADF_KNOB_COURSESELECTOR_ACTION)</TTDescription> <TTValue RPN="True">#TOOLTIP_VALUE#</TTValue> </Tooltip> <Value> <Units>bool</Units> <Code>(#INPUTEVENT_VAR_TYPE#:#INPUTEVENT_VAR_NAME#)</Code> <Init>#INIT_VALUE#</Init> </Value> <Inc> <Code>#ON_BEFORE_INC# #INC_EVENT# #ON_AFTER_INC#</Code> <Parameters> <Param Type="Float" RPN="True">p0 #INCREMENT# *</Param> </Parameters> <Bindings> <Binding EventID="ADF_CARD_INC"> <Param RPN="True">p1 #INCREMENT# *</Param> </Binding> </Bindings> </Inc> <Dec> <Code>#ON_BEFORE_DEC# #DEC_EVENT# #ON_AFTER_DEC#</Code> <Parameters> <Param Type="Float" RPN="True">p0 #INCREMENT# *</Param> </Parameters> <Bindings> <Binding EventID="ADF_CARD_DEC"> <Param RPN="True">p1 #INCREMENT# *</Param> </Binding> </Bindings> </Dec> <Set> <Code>#ON_BEFORE_SET# #SET_EVENT# #ON_AFTER_SET# #ON_STATE_CHANGED#</Code> <Parameters> <Param Type="Float" RPN="True">p0</Param> </Parameters> <Bindings> <Binding EventID="ADF_CARD_SET"> <Param RPN="True">p1</Param> </Binding> </Bindings> </Set> </Preset> </Case> <Case NotEmpty="COMPASS_ID"> <!-- Used for a compass value with some offset controlled by a knob --> <Preset ID="INSTRUMENT_COMPASS_Calibration_#COMPASS_ID#"> <Parameters Type="Default"> <!-- Those can be changed but it is recommanded not to --> <CALIBRATION_SPEED>0.3</CALIBRATION_SPEED> <CALIBRATION_VAR>LOCAL_Compass_Calibration</CALIBRATION_VAR> <INPUT_EVENT_NAME>INSTRUMENT_COMPASS_Calibration_#COMPASS_ID#</INPUT_EVENT_NAME> </Parameters> <Tooltip> <Icon>ROTATE</Icon> <Interaction>PRIMARY_DOWN+X_AXIS</Interaction> <InteractionLockable>X_AXIS</InteractionLockable> <TTDescription>@TT_Package.INSTRUMENT_COMPASS_CALIBRATION_ACTION</TTDescription> <TTValue RPN="True">(O:#CALIBRATION_VAR#, degrees) (A:#COMPASS_SIMVAR#, degrees) + flr 360 % near '°' scat</TTValue> </Tooltip> <Value> <Units>degrees</Units> <Code>(O:#CALIBRATION_VAR#, degrees) flr 360 %</Code> <Init>0 (&gt;O:#CALIBRATION_VAR#, degrees)</Init> </Value> <Inc> <Code>(O:#CALIBRATION_VAR#) #CALIBRATION_SPEED# + (&gt;B:#INPUT_EVENT_NAME#_Set)</Code> </Inc> <Dec> <Code>(O:#CALIBRATION_VAR#) #CALIBRATION_SPEED# - (&gt;B:#INPUT_EVENT_NAME#_Set)</Code> </Dec> <Set> <Code>p0 dnor (&gt;O:#CALIBRATION_VAR#)</Code> <Parameters> <Param Type="Float" RPN="True">p0</Param> </Parameters> </Set> </Preset> </Case> <Default> <Extend Target="ASOBO_GIE_Anim_Handling"> <Parameters Type="Default"> <INPUT_EVENT_ID_SOURCE>INSTRUMENT</INPUT_EVENT_ID_SOURCE> </Parameters> </Extend> </Default> </Switch> </Presets> </InputEvent> </ModelBehaviors>

Includes