Skip to content

Commit

Permalink
Davtron clock buttons are now visually depressed when clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
hbeni committed Dec 6, 2020
1 parent bd3e9c6 commit cb0fccd
Showing 1 changed file with 77 additions and 63 deletions.
140 changes: 77 additions & 63 deletions Models/Instruments/Davtron803/davtron803.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,41 @@


<!-- OAT button -->
<animation>
<type>translate</type>
<object-name>OAT.swt</object-name>
<property>/instrumentation/davtron803/oat-btn</property>
<factor>-0.003</factor>
<axis>
<x>1</x>
<y>0</y>
<z>0</z>
</axis>
</animation>
<animation>
<type>pick</type>
<object-name>OAT.swt</object-name>
<condition>
<property>/instrumentation/clock/serviceable</property>
<greater-than>
<property>/systems/electrical/volts</property>
<value>0</value>
</greater-than>
</condition>
<object-name>OAT.swt.cs</object-name>
<action>
<button>0</button>
<binding>
<command>property-toggle</command>
<property>/instrumentation/davtron803/oat-btn</property>
</binding>
<mod-up>
<binding>
<command>property-toggle</command>
<property>/instrumentation/davtron803/oat-btn</property>
</binding>
</mod-up>
<binding>
<condition>
<property>/instrumentation/clock/serviceable</property>
<greater-than>
<property>/systems/electrical/volts</property>
<value>0</value>
</greater-than>
</condition>
<command>property-cycle</command>
<property>/instrumentation/davtron803/top-mode</property>
<value type="string">E</value>
Expand All @@ -129,40 +151,44 @@
<object-name>OAT.swt.cs</object-name>
<visible>false</visible>
<nopreview/>
<condition>
<property>/instrumentation/clock/serviceable</property>
<greater-than>
<property>/systems/electrical/volts</property>
<value>0</value>
</greater-than>
</condition>
<action>
<button>0</button>
<binding>
<command>property-cycle</command>
<property>/instrumentation/davtron803/top-mode</property>
<value type="string">E</value>
<value type="string">F</value>
<value type="string">C</value>
</binding>
</action>
</animation>

<!-- Select button -->
<animation>
<type>translate</type>
<object-name>Select.btn</object-name>
<property>/instrumentation/davtron803/select-btn</property>
<factor>-0.003</factor>
<axis>
<x>1</x>
<y>0</y>
<z>0</z>
</axis>
</animation>
<animation>
<type>pick</type>
<object-name>Select.btn</object-name>
<object-name>Select.btn.cs</object-name>
<condition>
<property>/instrumentation/clock/serviceable</property>
<greater-than>
<property>/systems/electrical/volts</property>
<value>0</value>
</greater-than>
</condition>
<action>
<button>0</button>
<binding>
<command>property-toggle</command>
<property>/instrumentation/davtron803/select-btn</property>
</binding>
<mod-up>
<binding>
<command>property-toggle</command>
<property>/instrumentation/davtron803/select-btn</property>
</binding>
</mod-up>
<binding>
<condition>
<property>/instrumentation/clock/serviceable</property>
<greater-than>
<property>/systems/electrical/volts</property>
<value>0</value>
</greater-than>
</condition>
<command>property-cycle</command>
<property>/instrumentation/davtron803/bot-mode</property>
<value type="string">UT</value>
Expand All @@ -177,63 +203,51 @@
<object-name>Select.btn.cs</object-name>
<visible>false</visible>
<nopreview/>
<condition>
<property>/instrumentation/clock/serviceable</property>
<greater-than>
<property>/systems/electrical/volts</property>
<value>0</value>
</greater-than>
</condition>
<action>
<button>0</button>
<binding>
<command>property-cycle</command>
<property>/instrumentation/davtron803/bot-mode</property>
<value type="string">UT</value>
<value type="string">LT</value>
<value type="string">FT</value>
<value type="string">ET</value>
</binding>
</action>
</animation>

<!-- Control button -->
<animation>
<type>translate</type>
<object-name>Control.btn</object-name>
<property>/instrumentation/davtron803/control-btn</property>
<factor>-0.003</factor>
<axis>
<x>1</x>
<y>0</y>
<z>0</z>
</axis>
</animation>
<animation>
<type>pick</type>
<object-name>Control.btn</object-name>
<object-name>Control.btn.cs</object-name>
<action>
<button>0</button>
<binding>
<command>property-toggle</command>
<property>/instrumentation/davtron803/control-btn</property>
</binding>
<binding>
<command>nasal</command>
<script>davtron803.controlButtonPressed()</script>
</binding>
<mod-up>
<binding>
<command>property-toggle</command>
<property>/instrumentation/davtron803/control-btn</property>
</binding>
<binding>
<command>nasal</command>
<script>davtron803.controlButtonReleased()</script>
</binding>
</mod-up>
</action>
</animation>

<animation>
<type>pick</type>
<object-name>Control.btn.cs</object-name>
<visible>false</visible>
<nopreview/>
<action>
<button>0</button>
<binding>
<command>nasal</command>
<script>davtron803.controlButtonPressed()</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>davtron803.controlButtonReleased()</script>
</binding>
</mod-up>
</action>
</animation>


Expand Down

0 comments on commit cb0fccd

Please sign in to comment.