Fix battery percent
This commit is contained in:
parent
258eae0fda
commit
a443e0aa83
2 changed files with 4 additions and 2 deletions
|
@ -137,8 +137,6 @@ var ELEC = {
|
|||
me.Switch.idg1Disc.setBoolValue(1);
|
||||
me.Switch.idg2Disc.setBoolValue(1);
|
||||
me.Switch.emerElecManOn.setBoolValue(0);
|
||||
me.Source.Bat1.percent.setValue(math.round((rand() * 50) + 50 , 0.1)); # Random between 50 and 100
|
||||
me.Source.Bat2.percent.setValue(math.round((rand() * 50) + 50 , 0.1)); # Random between 50 and 100
|
||||
},
|
||||
resetFail: func() {
|
||||
me.Fail.acEssBusFault.setBoolValue(0);
|
||||
|
|
|
@ -172,9 +172,11 @@
|
|||
<default value="0"/>
|
||||
<test logic="AND" value="40">
|
||||
/systems/electrical/sources/bat-1/load-kw ne 0
|
||||
/systems/electrical/sources/bat-1/direction eq 1
|
||||
</test>
|
||||
<test logic="AND" value="2">
|
||||
/systems/electrical/sources/bat-1/contact eq 1
|
||||
/systems/electrical/sources/bat-1/direction eq -1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
|
@ -342,9 +344,11 @@
|
|||
<default value="0"/>
|
||||
<test logic="AND" value="40">
|
||||
/systems/electrical/sources/bat-2/load-kw ne 0
|
||||
/systems/electrical/sources/bat-2/direction eq 1
|
||||
</test>
|
||||
<test logic="AND" value="2">
|
||||
/systems/electrical/sources/bat-2/contact eq 1
|
||||
/systems/electrical/sources/bat-2/direction eq -1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
|
|
Loading…
Reference in a new issue