<?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 Bea Wolf (D-ECHO)
    Started 06/2020
-->

<!--	Thommen B17 simulation
	References:	see docs/instruments.md	-->
				
<PropertyList>

	<path>thommen-b17-clock.ac</path>
	
	<!--	Clock	-->
	<animation>
		<type>rotate</type>
		<object-name>needle.hour</object-name>
		<property>instrumentation/clock/indicated-sec</property>
		<factor>-0.00833333333</factor>
		<axis>
			<x>1</x>
		</axis>
	</animation>
	<animation>
		<type>rotate</type>
		<object-name>needle.minute</object-name>
		<property>instrumentation/clock/indicated-sec</property>
		<factor>-0.1</factor>
		<axis>
			<x>1</x>
		</axis>
	</animation>
	<animation>
		<type>rotate</type>
		<object-name>needle.second</object-name>
		<property>instrumentation/clock/indicated-sec</property>
		<factor>-6</factor>
		<axis>
			<x>1</x>
		</axis>
	</animation>
	
	<!--	Stopwatch	-->
	<animation>
		<type>rotate</type>
		<object-name>needle.elapsed.hour</object-name>
		<property>instrumentation/clock/elapsed-sec</property>
		<factor>-0.00833333333</factor>
		<axis>
			<x>1</x>
		</axis>
		<center>
			<y-m>0.0</y-m>
			<z-m>0.011859</z-m>
		</center>
	</animation>
	<animation>
		<type>rotate</type>
		<object-name>needle.elapsed.minute</object-name>
		<property>instrumentation/clock/elapsed-sec</property>
		<factor>-0.1</factor>
		<axis>
			<x>1</x>
		</axis>
	</animation>
	<animation>
		<type>rotate</type>
		<object-name>needle.elapsed.second</object-name>
		<property>instrumentation/clock/elapsed-sec</property>
		<factor>-6</factor>
		<axis>
			<x>1</x>
		</axis>
		<center>
			<y-m>0.011957</y-m>
			<z-m>0.0</z-m>
		</center>
	</animation>
	
	<!--	Outer Bezel - can be used as additional stopwatch	-->
	<animation>
		<type>rotate</type>
		<object-name>outer_bezel</object-name>
		<property>instrumentation/clock/outer-bezel</property>
		<factor>1</factor>
		<axis>
			<x>1</x>
		</axis>
	</animation>
	
	<!--	Controls	-->
	<animation>
		<type>knob</type>
		<object-name>knob.outer_bezel</object-name>
		<property>instrumentation/clock/outer-bezel</property>
		<factor>15</factor>
		<axis>
			<x>1</x>
		</axis>
		<center>
			<y-m>0.026266</y-m>
			<z-m>-0.016185</z-m>
		</center>
		<action>
			<binding>
				<command>property-adjust</command>
				<property>instrumentation/clock/outer-bezel</property>
				<factor>-1</factor>
				<min>0</min>
				<max>360</max>
				<wrap>1</wrap>
			</binding>
		</action>
	</animation>
	<animation>
		<type>pick</type>
		<object-name>knob.elapsed.startstop</object-name>
		<action>
			<button>0</button>
			<binding>
				<command>nasal</command>
				<script>thommen_clock.btn_startstop();</script>
			</binding>
			<binding>
				<command>property-toggle</command>
				<property>instrumentation/clock/knob-startstop</property>
			</binding>
			<mod-up>
				<binding>
					<command>property-toggle</command>
					<property>instrumentation/clock/knob-startstop</property>
				</binding>
			</mod-up>
		</action>
	</animation>
	<animation>
		<type>pick</type>
		<object-name>knob.elapsed.reset</object-name>
		<action>
			<button>0</button>
			<binding>
				<command>nasal</command>
				<script>thommen_clock.btn_reset();</script>
			</binding>
			<binding>
				<command>property-toggle</command>
				<property>instrumentation/clock/knob-reset</property>
			</binding>
			<mod-up>
				<binding>
					<command>property-toggle</command>
					<property>instrumentation/clock/knob-reset</property>
				</binding>
			</mod-up>
		</action>
	</animation>
	<animation>
		<type>translate</type>
		<object-name>knob.elapsed.startstop</object-name>
		<object-name>knob.elapsed.reset</object-name>
		<property>instrumentation/clock/knob-startstop</property>
		<factor>-0.005</factor>
		<axis>
			<x>1</x>
		</axis>
	</animation>
	<animation>
		<type>rotate</type>
		<object-name>knob.elapsed.startstop</object-name>
		<object-name>knob.elapsed.reset</object-name>
		<property>instrumentation/clock/knob-reset</property>
		<factor>-45</factor>
		<center>
			<y-m>0.021699</y-m>
			<z-m>0.021956</z-m>
		</center>
		<axis>
			<x>1</x>
		</axis>
	</animation>
    
</PropertyList>
