1
0
Fork 0

Fix battery percent

This commit is contained in:
legoboyvdlp R 2020-08-13 19:54:58 +01:00
parent 258eae0fda
commit a443e0aa83
2 changed files with 4 additions and 2 deletions

View file

@ -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);

View file

@ -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>