Multiplayer: Added mp indicator light, fix brake light. Control: fix broken ABS. Instruments: Added battery indicator.

This commit is contained in:
Sidi Liang 2019-07-26 20:03:03 +08:00
parent ef8c5fa2f7
commit ad494138e9
5 changed files with 33 additions and 9 deletions

View File

@ -7,8 +7,9 @@
<animation>
<type>rotate</type>
<object-name>needle</object-name>
<property>consumables/fuel/total-fuel-norm</property>
<factor>-90</factor>
<property>systems/electrical/e-tron/battery-kWh</property>
<factor>-1.125</factor>
<offset>22.5</offset>
<center>
<x-m>0.0</x-m>
<y-m>0.0</y-m>

View File

@ -7,7 +7,7 @@
<!--up -->
<path>speedometer.ac</path>
<path>speedometer.ac</path>
<animation>
<type>rotate</type>
<object-name>needle</object-name>

View File

@ -6,6 +6,12 @@
<load>
var livery_update = aircraft.livery_update.new("Aircraft/followme_e-tron/Models/Messages");
var liveryFuse_update = followme.liveryFuse_update.new("Aircraft/followme_e-tron/Models/Texture");
var rplayer = cmdarg();
# Set up property aliases for animations.
rplayer.getNode("/controls/lighting/indicator-left", 1).
alias(rplayer.getNode("sim/multiplay/generic/float[0]"));
rplayer.getNode("/controls/lighting/indicator-right", 1).
alias(rplayer.getNode("sim/multiplay/generic/float[1]"));
</load>
<unload>
livery_update.stop();
@ -463,11 +469,11 @@
<red>1.0</red>
<green>0.0</green>
<blue>0.0</blue>
<factor-prop>/controls/gear/brake-left</factor-prop>
<factor-prop>controls/gear/brake-left</factor-prop>
</emission>
<condition>
<greater-than>
<property>/controls/gear/brake-left</property>
<property>controls/gear/brake-left</property>
<value>0.3</value>
</greater-than>
</condition>

View File

@ -53,7 +53,7 @@ var brakesABS = func(){
var absTimer = maketimer(0.001, brakesABS);
var brakeWithABS = func(){
var brakeWithABS = func(){# Seems to have bugs
var brakeCmd = props.getNode("/",1).getValue("/controls/gear/brake-cmd");
if(brakeCmd){
absTimer.start();
@ -62,6 +62,6 @@ var brakeWithABS = func(){
}
}
setlistener("/controls/gear/brake-cmd", brakeWithABS);
#setlistener("/controls/gear/brake-cmd", brakeWithABS);

View File

@ -175,6 +175,13 @@
</lighting>
</controls>
<multiplay>
<generic>
<int n="0" alias="/controls/lighting/indicator-left"/>
<int n="1" alias="/controls/lighting/indicator-right"/>
</generic>
</multiplay>
<input>
<keyboard>
<key n="91">
@ -226,13 +233,23 @@
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>/controls/gear/brake-cmd</property>
<property>/controls/gear/brake-left</property>
<value>1</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/brake-right</property>
<value>1</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/brake-cmd</property>
<property>/controls/gear/brake-left</property>
<value>0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/brake-right</property>
<value>0</value>
</binding>
</mod-up>