<?xml version="1.0"?>
<!--
    This file is part of do228

    The do228 is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 2 of the License, or
    (at your option) any later version.

    The do228 is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with do228.  If not, see <http://www.gnu.org/licenses/>.

    Dornier DO228 simulation by Benedikt Wolf (D-ECHO)
    Started 06/2020
-->

<!--	Universal EFI-890R simulation
		References:	http://www.uasc.com/home/shop/avionics/efi-890r
				https://www.uasc.com/docs/default-source/documents/brochures/uasc_efi-890r_brochure.pdf?sfvrsn=9e13985c_4
				Dornier 228-212 POH (ref. [1], see do228-212.xml)
				-->
				
<PropertyList>

	<path>efi-890r.ac</path>
	
	<params>
		<brightness-prop>/instrumentation/efi-890r/display-unit[0]/brightness</brightness-prop>
		<brightness-btn-prop>/instrumentation/efi-890r/display-unit[0]/brightness-btn</brightness-btn-prop>
	</params>
	
	<animation>
		<type>pick</type>
		<object-name>btn.brightness.plus</object-name>
		<visible>0</visible>
		<action>
			<button>0</button>
			<binding>
				<command>property-assign</command>
				<property alias="../../../../params/brightness-btn-prop"/>
				<value>1</value>
			</binding>
			<binding>
				<command>property-adjust</command>
				<property alias="../../../../params/brightness-prop"/>
				<min>0.5</min>
				<max>1.0</max>
				<step>0.05</step>
			</binding>
			<mod-up>
				<binding>
					<command>property-assign</command>
					<property alias="../../../../../params/brightness-btn-prop"/>
					<value>0</value>
				</binding>
			</mod-up>
		</action>
	</animation>
	<animation>
		<type>pick</type>
		<object-name>btn.brightness.minus</object-name>
		<visible>0</visible>
		<action>
			<button>0</button>
			<binding>
				<command>property-assign</command>
				<property alias="../../../../params/brightness-btn-prop"/>
				<value>-1</value>
			</binding>
			<binding>
				<command>property-adjust</command>
				<property alias="../../../../params/brightness-prop"/>
				<min>0.5</min>
				<max>1.0</max>
				<step>-0.05</step>
			</binding>
			<mod-up>
				<binding>
					<command>property-assign</command>
					<property alias="../../../../../params/brightness-btn-prop"/>
					<value>0</value>
				</binding>
			</mod-up>
		</action>
	</animation>
	<animation>
		<type>rotate</type>
		<object-name>btn.brightness</object-name>
		<object-name>btn.brightness.plus</object-name>
		<object-name>btn.brightness.minus</object-name>
		<property alias="../../params/brightness-btn-prop"/>
		<factor>4</factor>
		<center>
			<x-m>0.013266</x-m>
			<y-m>0.052865</y-m>
		</center>
		<axis>
			<z>1</z>
		</axis>
	</animation>
    
</PropertyList>
