1
0
Fork 0

chrono + clock + ET + Rudder trim indicator

This commit is contained in:
vezza 2020-03-30 22:42:09 +02:00 committed by Jonathan Redpath
parent 323c146b90
commit eeb73edae1
2 changed files with 391 additions and 102 deletions

View file

@ -439,6 +439,7 @@
<object-name>vs-text-test</object-name>
<object-name>wpt_led</object-name>
<object-name>wpt_led.001</object-name>
<object-name>terr_on_nd_label</object-name>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
@ -482,7 +483,6 @@
<object-name>qnh-test</object-name>
<object-name>radio_opt_led</object-name>
<object-name>rudder-trim-test</object-name>
<object-name>terr_on_nd_on</object-name>
<object-name>ver.fmgc</object-name>
<condition>
<property>controls/switches/annun-test</property>
@ -595,9 +595,10 @@
<text>
<name>rudder-trim</name>
<offsets>
<x-m>0.118</x-m>
<x-m>0.108</x-m>
<y-m>-0.016</y-m>
<z-m>-0.134</z-m>
<z-m>-0.133</z-m>
<!--<z-m>-0.134</z-m>-->
<heading-deg>90</heading-deg>
<roll-deg>0</roll-deg>
</offsets>
@ -607,15 +608,17 @@
<format type="string">%2.1f</format>
<property>fdm/jsbsim/hydraulics/rudder/trim-cmd-deg</property>
<truncate>false</truncate>
<layout>left-to-right</layout>
<font type="string">led.txf</font>
<draw-text>true</draw-text>
<draw-alignment>false</draw-alignment>
<draw-boundingbox>false</draw-boundingbox>
<character-size>0.009</character-size>
<character-size>0.008</character-size>
<font-resolution>
<width type="int">32</width>
<height type="int">32</height>
</font-resolution>
<kerning>default</kerning>
</text>
<text>
@ -631,7 +634,7 @@
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">-88.8</format>
<property>autopilot/servicable</property>
<property>autopilot/serviceable</property>
<truncate>false</truncate>
<font type="string">led.txf</font>
<draw-text>true</draw-text>
@ -2225,7 +2228,7 @@
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">STD</format>
<property>autopilot/servicable</property>
<property>autopilot/serviceable</property>
<truncate>false</truncate>
<font type="string">led.txf</font>
<draw-text>true</draw-text>
@ -2251,7 +2254,7 @@
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">STD</format>
<property>autopilot/servicable</property>
<property>autopilot/serviceable</property>
<truncate>false</truncate>
<font type="string">led.txf</font>
<draw-text>true</draw-text>
@ -2277,7 +2280,7 @@
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">88.88</format>
<property>autopilot/servicable</property>
<property>autopilot/serviceable</property>
<truncate>false</truncate>
<font type="string">led.txf</font>
<draw-text>true</draw-text>
@ -2303,7 +2306,7 @@
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">88.88</format>
<property>autopilot/servicable</property>
<property>autopilot/serviceable</property>
<truncate>false</truncate>
<font type="string">led.txf</font>
<draw-text>true</draw-text>
@ -3641,7 +3644,7 @@
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">.888</format>
<property>autopilot/servicable</property>
<property>autopilot/serviceable</property>
<truncate>false</truncate>
<font type="string">led.txf</font>
<draw-text>true</draw-text>
@ -3693,7 +3696,7 @@
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">888</format>
<property>autopilot/servicable</property>
<property>autopilot/serviceable</property>
<truncate>false</truncate>
<font type="string">led.txf</font>
<draw-text>true</draw-text>
@ -3745,7 +3748,7 @@
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">88888</format>
<property>autopilot/servicable</property>
<property>autopilot/serviceable</property>
<truncate>false</truncate>
<font type="string">led.txf</font>
<draw-text>true</draw-text>
@ -3823,7 +3826,7 @@
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">-8888</format>
<property>autopilot/servicable</property>
<property>autopilot/serviceable</property>
<truncate>false</truncate>
<font type="string">led.txf</font>
<draw-text>true</draw-text>
@ -5116,6 +5119,12 @@
<object-name>brakes_accum_psi.mark</object-name>
<object-name>brakes_lb_psi.mark</object-name>
<object-name>brakes_rb_psi.mark</object-name>
<object-name>clock_et_selector</object-name>
<object-name>clock_utc_selector</object-name>
<object-name>clock_reset_pushbutton</object-name>
<object-name>clock_chr_pushbutton</object-name>
<object-name>clock_date_set_pushbutton</object-name>
<object-name>clock_display</object-name>
<object-name>clock_glare</object-name>
<object-name>flood_lt_main.mark</object-name>
<object-name>flood_lt_ped.mark</object-name>
@ -6318,12 +6327,12 @@
<object-name>compass_box</object-name>
<object-name>iesi</object-name>
<object-name>clock_body</object-name>
<object-name>clock_glare</object-name>
<object-name>clock_et_selector</object-name>
<object-name>clock_utc_selector</object-name>
<object-name>clock_reset_pushbutton</object-name>
<object-name>clock_chr_pushbutton</object-name>
<object-name>clock_date_set_pushbutton</object-name>
<!--<object-name>clock_glare</object-name>-->
<object-name>gear_lever_body</object-name>
<object-name>ParkBrk</object-name>
<object-name>RudderTrim</object-name>
@ -6452,7 +6461,12 @@
<inherits-from>Aircraft/A320-family/Models/Effects/clock</inherits-from>
<object-name>clock</object-name>
<object-name>clock_body</object-name>
<object-name>clock_glare</object-name>
<object-name>clock_et_selector</object-name>
<object-name>clock_utc_selector</object-name>
<object-name>clock_reset_pushbutton</object-name>
<object-name>clock_chr_pushbutton</object-name>
<object-name>clock_date_set_pushbutton</object-name>
<object-name>clock_display</object-name>
</effect>
@ -6474,12 +6488,12 @@
<object-name>ceiling</object-name>
<object-name>compass_box</object-name>
<object-name>clock_body</object-name>
<object-name>clock_glare</object-name>
<object-name>clock_et_selector</object-name>
<object-name>clock_utc_selector</object-name>
<object-name>clock_reset_pushbutton</object-name>
<object-name>clock_chr_pushbutton</object-name>
<object-name>clock_date_set_pushbutton</object-name>
<object-name>clock_glare</object-name>
<object-name>DoorC</object-name>
<object-name>efis_box_1</object-name>
<object-name>efis_box_2</object-name>
@ -6577,6 +6591,7 @@
<object-name>dec_low_on</object-name>
<object-name>dec_max_on</object-name>
<object-name>dec_med_on</object-name>
<object-name>terr_on_nd_label</object-name>
<object-name>foot_warmer_cpt_sw</object-name>
<object-name>foot_warmer_cpt_sw.mark</object-name>
<object-name>foot_warmer_fo_sw</object-name>
@ -6676,6 +6691,7 @@
<object-name>sts.007</object-name>
<object-name>thr_l</object-name>
<object-name>rev_l</object-name>
<object-name>terr_on_nd_label</object-name>
<object-name>thr_l_body</object-name>
<object-name>thr_l_button</object-name>
<object-name>thr_l_screw</object-name>
@ -6742,15 +6758,124 @@
</animation>
<!-- Chrono -->
<animation>
<type>select</type>
<object-name>chrono1</object-name>
<condition>
<or>
<property>instrumentation/chrono/running</property>
<property>instrumentation/chrono/paused</property>
</or>
<and>
<not-equals>
<property>instrumentation/chrono/chrono-reset</property>
<value>2</value>
</not-equals>
<property>instrumentation/clock/serviceable</property>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>chrono2_1</object-name>
<condition>
<and>
<property>instrumentation/clock/serviceable</property>
<or>
<equals>
<property>instrumentation/clock/set-knob</property>
<value>0</value>
</equals>
<and>
<equals>
<property>instrumentation/clock/set-knob</property>
<value>1</value>
</equals>
<equals>
<property>instrumentation/clock/utc-selector</property>
<value>2</value>
</equals>
</and>
</or>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>chrono2_2</object-name>
<condition>
<and>
<property>instrumentation/clock/serviceable</property>
<or>
<equals>
<property>instrumentation/clock/set-knob</property>
<value>0</value>
</equals>
<and>
<equals>
<property>instrumentation/clock/set-knob</property>
<value>1</value>
</equals>
<equals>
<property>instrumentation/clock/utc-selector</property>
<value>2</value>
</equals>
</and>
</or>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>UTC_1</object-name>
<condition>
<not>
<and>
<property>instrumentation/clock/serviceable</property>
<or>
<equals>
<property>instrumentation/clock/set-knob</property>
<value>0</value>
</equals>
<and>
<equals>
<property>instrumentation/clock/set-knob</property>
<value>1</value>
</equals>
<equals>
<property>instrumentation/clock/utc-selector</property>
<value>2</value>
</equals>
</and>
</or>
</and>
</not>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>UTC_2</object-name>
<condition>
<not>
<and>
<property>instrumentation/clock/serviceable</property>
<or>
<equals>
<property>instrumentation/clock/set-knob</property>
<value>0</value>
</equals>
<and>
<equals>
<property>instrumentation/clock/set-knob</property>
<value>1</value>
</equals>
<equals>
<property>instrumentation/clock/utc-selector</property>
<value>2</value>
</equals>
</and>
</or>
</and>
</not>
</condition>
</animation>
<animation>
@ -6765,8 +6890,8 @@
<name>chrono1</name>
<offsets>
<x-m>-0.553</x-m>
<y-m>0.159</y-m>
<z-m>0.215</z-m>
<y-m>0.160</y-m>
<z-m>0.2155</z-m>
<heading-deg>90</heading-deg>
<roll-deg>72.81</roll-deg>
</offsets>
@ -6774,14 +6899,14 @@
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>instrumentation/chrono/text</property>
<property>instrumentation/chrono/elapsed-string</property>
<truncate>false</truncate>
<layout>left-to-right</layout>
<draw-text type="bool">true</draw-text> <!-- draw the text itself -->
<draw-alignment type="bool">false</draw-alignment> <!-- draw crosshair at object center -->
<draw-boundingbox type="bool">false</draw-boundingbox> <!-- draw a bounding box -->
<font>led.txf</font> <!-- The font file name, relative to data/Fonts -->
<character-size type="double">0.009</character-size> <!-- size (height) im meters -->
<character-size type="double">0.008</character-size> <!-- size (height) im meters -->
<character-aspect-ratio type="double">1.0</character-aspect-ratio>
<max-height>0.012</max-height> <!-- the maximum height of the text -->
<max-width>0.050</max-width> <!-- the maximum width of the text -->
@ -6793,10 +6918,10 @@
</text>
<text>
<name>chrono2</name>
<name>chrono2_1</name>
<offsets>
<x-m>-0.546</x-m>
<y-m>0.159</y-m>
<y-m>0.153</y-m>
<z-m>0.196</z-m>
<heading-deg>90</heading-deg>
<roll-deg>72.81</roll-deg>
@ -6805,37 +6930,6 @@
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>instrumentation/clock/indicated-string</property>
<truncate>false</truncate>
<layout>left-to-right</layout>
<draw-text type="bool">true</draw-text> <!-- draw the text itself -->
<draw-alignment type="bool">false</draw-alignment> <!-- draw crosshair at object center -->
<draw-boundingbox type="bool">false</draw-boundingbox> <!-- draw a bounding box -->
<font>led.txf</font> <!-- The font file name, relative to data/Fonts -->
<character-size type="double">0.009</character-size> <!-- size (height) im meters -->
<character-aspect-ratio type="double">1.0</character-aspect-ratio>
<max-height>0.012</max-height> <!-- the maximum height of the text -->
<max-width>0.050</max-width> <!-- the maximum width of the text -->
<font-resolution>
<width type="int">32</width>
<height type="int">32</height>
</font-resolution>
<kerning>default</kerning>
</text>
<text>
<name>chrono3</name>
<offsets>
<x-m>-0.54</x-m>
<y-m>0.159</y-m>
<z-m>0.178</z-m>
<heading-deg>90</heading-deg>
<roll-deg>72.81</roll-deg>
</offsets>
<alignment>center-center</alignment>
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>instrumentation/clock/indicated-short-string</property>
<truncate>false</truncate>
<layout>left-to-right</layout>
@ -6843,7 +6937,131 @@
<draw-alignment type="bool">false</draw-alignment> <!-- draw crosshair at object center -->
<draw-boundingbox type="bool">false</draw-boundingbox> <!-- draw a bounding box -->
<font>led.txf</font> <!-- The font file name, relative to data/Fonts -->
<character-size type="double">0.009</character-size> <!-- size (height) im meters -->
<character-size type="double">0.008</character-size> <!-- size (height) im meters -->
<character-aspect-ratio type="double">1.0</character-aspect-ratio>
<max-height>0.012</max-height> <!-- the maximum height of the text -->
<max-width>0.060</max-width> <!-- the maximum width of the text -->
<font-resolution>
<width type="int">32</width>
<height type="int">32</height>
</font-resolution>
<kerning>default</kerning>
</text>
<text>
<name>chrono2_2</name>
<offsets>
<x-m>-0.546</x-m>
<y-m>0.172</y-m>
<z-m>0.196</z-m>
<heading-deg>90</heading-deg>
<roll-deg>72.81</roll-deg>
</offsets>
<alignment>center-center</alignment>
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>instrumentation/clock/indicated-seconds</property>
<truncate>false</truncate>
<layout>left-to-right</layout>
<draw-text type="bool">true</draw-text> <!-- draw the text itself -->
<draw-alignment type="bool">false</draw-alignment> <!-- draw crosshair at object center -->
<draw-boundingbox type="bool">false</draw-boundingbox> <!-- draw a bounding box -->
<font>led.txf</font> <!-- The font file name, relative to data/Fonts -->
<character-size type="double">0.006</character-size> <!-- size (height) im meters -->
<character-aspect-ratio type="double">1.0</character-aspect-ratio>
<max-height>0.012</max-height> <!-- the maximum height of the text -->
<max-width>0.060</max-width> <!-- the maximum width of the text -->
<font-resolution>
<width type="int">32</width>
<height type="int">32</height>
</font-resolution>
<kerning>default</kerning>
</text>
<text>
<name>UTC_1</name>
<offsets>
<x-m>-0.546</x-m>
<y-m>0.153</y-m>
<z-m>0.196</z-m>
<heading-deg>90</heading-deg>
<roll-deg>72.81</roll-deg>
</offsets>
<alignment>center-center</alignment>
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>instrumentation/clock/utc-date1</property>
<truncate>false</truncate>
<layout>left-to-right</layout>
<draw-text type="bool">true</draw-text> <!-- draw the text itself -->
<draw-alignment type="bool">false</draw-alignment> <!-- draw crosshair at object center -->
<draw-boundingbox type="bool">false</draw-boundingbox> <!-- draw a bounding box -->
<font>led.txf</font> <!-- The font file name, relative to data/Fonts -->
<character-size type="double">0.008</character-size> <!-- size (height) im meters -->
<character-aspect-ratio type="double">1.0</character-aspect-ratio>
<max-height>0.012</max-height> <!-- the maximum height of the text -->
<max-width>0.060</max-width> <!-- the maximum width of the text -->
<font-resolution>
<width type="int">32</width>
<height type="int">32</height>
</font-resolution>
<kerning>default</kerning>
</text>
<text>
<name>UTC_2</name>
<offsets>
<x-m>-0.546</x-m>
<y-m>0.172</y-m>
<z-m>0.196</z-m>
<heading-deg>90</heading-deg>
<roll-deg>72.81</roll-deg>
</offsets>
<alignment>center-center</alignment>
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>instrumentation/clock/utc-date2</property>
<truncate>false</truncate>
<layout>left-to-right</layout>
<draw-text type="bool">true</draw-text> <!-- draw the text itself -->
<draw-alignment type="bool">false</draw-alignment> <!-- draw crosshair at object center -->
<draw-boundingbox type="bool">false</draw-boundingbox> <!-- draw a bounding box -->
<font>led.txf</font> <!-- The font file name, relative to data/Fonts -->
<character-size type="double">0.006</character-size> <!-- size (height) im meters -->
<character-aspect-ratio type="double">1.0</character-aspect-ratio>
<max-height>0.012</max-height> <!-- the maximum height of the text -->
<max-width>0.060</max-width> <!-- the maximum width of the text -->
<font-resolution>
<width type="int">32</width>
<height type="int">32</height>
</font-resolution>
<kerning>default</kerning>
</text>
<text>
<name>chrono3</name>
<offsets>
<x-m>-0.54</x-m>
<y-m>0.160</y-m>
<z-m>0.1785</z-m>
<heading-deg>90</heading-deg>
<roll-deg>72.81</roll-deg>
</offsets>
<alignment>center-center</alignment>
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>instrumentation/clock/elapsed-string</property>
<truncate>false</truncate>
<layout>left-to-right</layout>
<draw-text type="bool">true</draw-text> <!-- draw the text itself -->
<draw-alignment type="bool">false</draw-alignment> <!-- draw crosshair at object center -->
<draw-boundingbox type="bool">false</draw-boundingbox> <!-- draw a bounding box -->
<font>led.txf</font> <!-- The font file name, relative to data/Fonts -->
<character-size type="double">0.008</character-size> <!-- size (height) im meters -->
<character-aspect-ratio type="double">1.0</character-aspect-ratio>
<max-height>0.012</max-height> <!-- the maximum height of the text -->
<max-width>0.040</max-width> <!-- the maximum width of the text -->
@ -6943,14 +7161,14 @@
<animation>
<type>pick</type>
<object-name>clock_reset_pushbutton</object-name>
<property>controls/switches/clock_reset_pushbutton</property>
<property>instrumentation/chrono/chrono-reset</property>
<action>
<button>1</button>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-cycle</command>
<property>instruments/clock/chrono-reset</property>
<value>1</value>
<property>instrumentation/chrono/chrono-reset</property>
<value>2</value>
</binding>
</action>
</animation>
@ -6958,14 +7176,25 @@
<animation>
<type>pick</type>
<object-name>clock_chr_pushbutton</object-name>
<property>instruments/clock/time-knob</property>
<property>instrumentation/chrono/chrono-reset</property>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-cycle</command>
<property>instrumentation/chrono/chrono-reset</property>
<value>1</value><!-- Start Timer -->
<value>0</value><!-- Stop Timer -->
</binding>
</action>
<action>
<button>1</button>
<repeatable>false</repeatable>
<binding>
<command>property-cycle</command>
<property>instruments/clock/time-knob</property>
<value>1</value>
<property>instrumentation/chrono/started</property>
<value>0</value><!-- Stop Timer -->
<value>1</value><!-- Start Timer -->
</binding>
</action>
</animation>
@ -6973,18 +7202,27 @@
<animation>
<type>pick</type>
<object-name>clock_date_set_pushbutton</object-name>
<property>controls/switches/clock_date_set_pushbutton</property>
<property>instrumentation/clock/set-knob</property>
<action>
<button>0</button><!-- Date Mode -->
<button>1</button><!-- Time Mode -->
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-cycle</command>
<property>instruments/clock/set-knob</property>
<property>instrumentation/clock/set-knob</property>
<value>0</value><!-- Date Mode -->
<value>1</value><!-- Time Mode -->
</binding>
</action>
<action>
<button>1</button>
<repeatable>false</repeatable>
<binding>
<command>property-cycle</command>
<property>instrumentation/clock/set-knob</property>
<value>1</value><!-- Time Mode -->
<value>0</value><!-- Date Mode -->
</binding>
</action>
</animation>
<animation>
@ -7038,7 +7276,7 @@
<repeatable type="bool">false</repeatable>
<binding>
<command>property-cycle</command>
<property>instrumentation/clock/et-knob</property>
<property>instrumentation/clock/et-selector</property>
<value>0</value><!-- RUN -->
<value>1</value><!-- STP -->
<value>2</value><!-- RST -->
@ -7049,7 +7287,7 @@
<repeatable type="bool">false</repeatable>
<binding>
<command>property-cycle</command>
<property>instrumentation/clock/et-knob</property>
<property>instrumentation/clock/et-selector</property>
<value>2</value><!-- RST -->
<value>1</value><!-- STP -->
<value>0</value><!-- RUN -->
@ -7061,7 +7299,7 @@
<name>ET selector rotate</name>
<type>rotate</type>
<object-name>clock_et_selector</object-name>
<property>instrumentation/clock/et-knob</property>
<property>instrumentation/clock/et-selector</property>
<interpolation>
<entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>1</ind><dep>45</dep></entry>

View file

@ -1,50 +1,101 @@
#
# Chrono - Clock - ET
#
#
var chronometer = aircraft.timer.new("instrumentation/clock/ET-sec",1);
var elapsetime = aircraft.timer.new("instrumentation/clock/elapsetime-sec",1);
var chr_et = aircraft.timer.new("instrumentation/chrono/elapsetime-sec",1);
var et = aircraft.timer.new("instrumentation/clock/elapsetime-sec",1);
setlistener("sim/signals/fdm-initialized", func {
chronometer.stop();
props.globals.initNode("instrumentation/clock/ET-display",0,"INT");
props.globals.initNode("instrumentation/clock/time-display",0,"INT");
props.globals.initNode("instrumentation/clock/time-knob",0,"INT");
props.globals.initNode("instrumentation/clock/et-knob",0,"INT");
chr_et.stop();
et.stop();
props.globals.initNode("instrumentation/clock/indicated-string",0,"STRING");
props.globals.initNode("instrumentation/clock/elapsed-string",0,"STRING");
props.globals.initNode("instrumentation/chrono/elapsed-string",0,"STRING");
props.globals.initNode("instrumentation/clock/display-string",0,"STRING");
props.globals.initNode("instrumentation/clock/et-selector",1,"INT");
props.globals.initNode("instrumentation/clock/utc-selector",0,"INT");
props.globals.initNode("instrumentation/clock/set-knob",0,"INT");
props.globals.initNode("instrumentation/clock/utc_date",0,"STRING");
#settimer(start_updates,1);
start_loop();
#writeSettings();
props.globals.initNode("instrumentation/chrono/chrono-reset",2,"INT");
props.globals.initNode("instrumentation/clock/et-hr",0,"INT");
props.globals.initNode("instrumentation/clock/et-min",0,"INT");
props.globals.initNode("instrumentation/chrono/et-hr",0,"INT");
props.globals.initNode("instrumentation/chrono/et-min",0,"INT");
start_loop.start();
});
setlistener("instrumentation/clock/et-knob", func(et){
var tmp = et.getValue();
if(tmp == -1){
chronometer.reset();
}elsif(tmp==0){
chronometer.stop();
setlistener("instrumentation/chrono/chrono-reset", func(chrono){
var tmp = chrono.getValue();
if(tmp == 2){
chr_et.stop();
chr_et.reset();
#setprop("instrumentation/chrono/chrono-reset", 0);
}elsif(tmp==1){
chronometer.start();
chr_et.stop();
}elsif(tmp==0){
chr_et.start();
}
},0,0);
var start_loop = func {
var UTC_date = sprintf("%02d %02d %02d", getprop("sim/time/utc/month"), getprop("sim/time/utc/day"), getprop("sim/time/utc/year"));
var et_tmp = getprop("instrumentation/clock/ET-sec");
if(et_tmp == 0)
{
et_tmp = getprop("instrumentation/clock/elapsetime-sec");
setlistener("instrumentation/clock/et-selector", func(clock_et){
var tmp1 = clock_et.getValue();
if(tmp1 == 2){
et.reset();
setprop("instrumentation/clock/et-selector", 1);
}elsif(tmp1==1){
et.stop();
}elsif(tmp1==0){
et.start();
}
},0,0);
var start_loop = maketimer(0.1, func {
var UTC_date = sprintf("%02d %02d %02d", getprop("sim/time/utc/month"), getprop("sim/time/utc/day"), substr(sprintf("%2d", getprop("sim/time/utc/year")),1,2));
setprop("instrumentation/clock/utc-date", UTC_date);
var UTC_date1 = sprintf("%02d %02d", getprop("sim/time/utc/month"), getprop("sim/time/utc/day"));
var UTC_date2 = substr(sprintf(" %2d", getprop("sim/time/utc/year")),1,2);
var clock2_2 = substr(getprop("instrumentation/clock/indicated-string"),6,2);
setprop("instrumentation/clock/indicated-seconds", sprintf(":%02d", clock2_2));
setprop("instrumentation/clock/utc-date", UTC_date);
setprop("instrumentation/clock/utc-date1", UTC_date1);
setprop("instrumentation/clock/utc-date2", UTC_date2);
if (getprop("instrumentation/clock/set-knob")=="")
{
setprop("instrumentation/clock/set-knob", 0);
};
if (getprop("instrumentation/clock/utc-selector")=="")
{
setprop("instrumentation/clock/utc-selector", 0);
};
# ET clock
var et_tmp = getprop("instrumentation/clock/elapsetime-sec");
var et_min = int(et_tmp * 0.0166666666667);
var et_hr = int(et_min * 0.0166666666667);
et_min = et_min - (et_hr * 60);
et_tmp = et_hr * 100 + et_min;
setprop("instrumentation/clock/ET-display",et_tmp);
setprop("instrumentation/clock/elapsed-string",et_tmp);
et_tmp = int(getprop("instrumentation/clock/elapsetime-sec") * 0.0166666666667);
et_hr = int(et_tmp * 0.0166666666667);
et_min = et_tmp - (et_hr * 60);
setprop("instrumentation/clock/et-hr",et_hr);
setprop("instrumentation/clock/et-min",et_min);
et_tmp = sprintf("%02d:%02d", et_hr, et_min);
setprop("instrumentation/clock/elapsed-string", et_tmp);
setprop("instrumentation/clock/utc_date", UTC_date);
settimer(update_systems,0);
}
# Chrono
var et_tmp = getprop("instrumentation/chrono/elapsetime-sec");
var et_min = int(et_tmp * 0.0166666666667);
var et_hr = int(et_min * 0.0166666666667);
et_min = et_min - (et_hr * 60);
et_sec = int(et_tmp) - (et_min * 60) - (et_hr * 3600);
et_tmp = et_hr * 100 + et_min + et_sec;
setprop("instrumentation/chrono/elapsed-string",et_tmp);
et_tmp = int(getprop("instrumentation/chrono/elapsetime-sec") * 0.0166666666667);
et_hr = int(et_tmp * 0.0166666666667);
et_min = et_tmp - (et_hr * 60);
setprop("instrumentation/chrono/et-hr",et_hr);
setprop("instrumentation/chrono/et-min",et_min);
setprop("instrumentation/chrono/et-min",et_sec);
et_tmp = sprintf("%02d %02d", et_min, et_sec);
setprop("instrumentation/chrono/elapsed-string", et_tmp);
});