FDM: Bug of can not reverse fixed, Bugs in electrical system fixed, more liveries by 0404

This commit is contained in:
Sidi Liang 2019-08-06 20:20:33 +08:00
parent ca4e45f290
commit 0b66fbe907
15 changed files with 68 additions and 22 deletions

BIN
Models/Instruments/fuelgauge/Concept/fuelgauge.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 61 KiB

BIN
Models/Instruments/fuelgauge/Concept/fuelgauge_LIT.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

BIN
Models/Texture/marble-blue.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

11
Models/Texture/marble-blue.xml Executable file
View File

@ -0,0 +1,11 @@
<?xml version="1.0"?>
<PropertyList>
<sim>
<model>
<livery>
<name type="string">marble-blue</name>
<texture-fuse>Texture/marble-blue.png</texture-fuse>
</livery>
</model>
</sim>
</PropertyList>

BIN
Models/Texture/red.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

11
Models/Texture/red.xml Executable file
View File

@ -0,0 +1,11 @@
<?xml version="1.0"?>
<PropertyList>
<sim>
<model>
<livery>
<name type="string">red</name>
<texture-fuse>Texture/red.png</texture-fuse>
</livery>
</model>
</sim>
</PropertyList>

BIN
Models/Texture/the fall.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

11
Models/Texture/the fall.xml Executable file
View File

@ -0,0 +1,11 @@
<?xml version="1.0"?>
<PropertyList>
<sim>
<model>
<livery>
<name type="string">the fall</name>
<texture-fuse>Texture/the fall.png</texture-fuse>
</livery>
</model>
</sim>
</PropertyList>

BIN
Models/Texture/white-red.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

11
Models/Texture/white-red.xml Executable file
View File

@ -0,0 +1,11 @@
<?xml version="1.0"?>
<PropertyList>
<sim>
<model>
<livery>
<name type="string">white-red</name>
<texture-fuse>Texture/white-red.png</texture-fuse>
</livery>
</model>
</sim>
</PropertyList>

View File

@ -5,9 +5,7 @@ var electric_init = func(){ #Initialize
props.getNode("/",1).setValue("/systems/electrical/e-tron/switch/bat-fwd-eng",0);
props.getNode("/",1).setValue("/systems/electrical/e-tron/switch/bat-bwd-eng",0);
props.getNode("/",1).setValue("/systems/electrical/e-tron/fwd-eng-U-V",0);
props.getNode("/",1).setValue("/systems/electrical/e-tron/fwd-eng-U-V-max",0);
props.getNode("/",1).setValue("/systems/electrical/e-tron/bwd-eng-U-V",0);
props.getNode("/",1).setValue("/systems/electrical/e-tron/bwd-eng-U-V-max",0);
props.getNode("/",1).setValue("/systems/electrical/e-tron/fwd-eng-I-A",0);
props.getNode("/",1).setValue("/systems/electrical/e-tron/fwd-eng-I-A-max",0);
props.getNode("/",1).setValue("/systems/electrical/e-tron/bwd-eng-I-A",0);
@ -26,19 +24,19 @@ var electric_update = func(){
if(props.getNode("/",1).getValue("/systems/electrical/e-tron/switch/bat-fwd-eng") == 1){
props.getNode("/",1).setValue("/systems/electrical/e-tron/fwd-eng-U-V-max",380);
props.getNode("/",1).setValue("/systems/electrical/e-tron/fwd-eng-I-A-max",747);
props.getNode("/",1).setValue("/systems/electrical/e-tron/fwd-eng-U-V",380);
}else if(props.getNode("/",1).getValue("/systems/electrical/e-tron/switch/bat-fwd-eng") == 0){
props.getNode("/",1).setValue("/systems/electrical/e-tron/fwd-eng-U-V-max",0);
props.getNode("/",1).setValue("/systems/electrical/e-tron/fwd-eng-I-A-max",0);
props.getNode("/",1).setValue("/systems/electrical/e-tron/fwd-eng-U-V",0);
}
if(props.getNode("/",1).getValue("/systems/electrical/e-tron/switch/bat-bwd-eng") == 1){
props.getNode("/",1).setValue("/systems/electrical/e-tron/bwd-eng-U-V-max",380);
props.getNode("/",1).setValue("/systems/electrical/e-tron/bwd-eng-U-V",380);
props.getNode("/",1).setValue("/systems/electrical/e-tron/bwd-eng-I-A-max",747);
}else if(props.getNode("/",1).getValue("/systems/electrical/e-tron/switch/bat-bwd-eng") == 0){
props.getNode("/",1).setValue("/systems/electrical/e-tron/bwd-eng-U-V-max",0);
props.getNode("/",1).setValue("/systems/electrical/e-tron/bwd-eng-I-A-max",0);
props.getNode("/",1).setValue("/systems/electrical/e-tron/bwd-eng-U-V",0);
}
@ -47,21 +45,12 @@ var electric_update = func(){
props.getNode("/",1).setValue("/systems/electrical/e-tron/fwd-eng-I-A-max",0);
props.getNode("/",1).setValue("/systems/electrical/e-tron/bwd-eng-U-V-max",0);
props.getNode("/",1).setValue("/systems/electrical/e-tron/bwd-eng-I-A-max",0);
}
if(props.getNode("/",1).getValue("/systems/electrical/e-tron/switch/bat-fwd-eng") == 1){
props.getNode("/",1).setValue("/systems/electrical/e-tron/fwd-eng-U-V",380);
}else{
props.getNode("/",1).setValue("/systems/electrical/e-tron/fwd-eng-U-V",0);
}
if(props.getNode("/",1).getValue("/systems/electrical/e-tron/switch/bat-bwd-eng") == 1){
props.getNode("/",1).setValue("/systems/electrical/e-tron/bwd-eng-U-V",380);
}else{
props.getNode("/",1).setValue("/systems/electrical/e-tron/bwd-eng-U-V",0);
}
#battery consume

View File

@ -14,6 +14,13 @@ var Engine = {
setDirection: func(dir){
me.direction = dir;
},
toggleDirection: func(){
if(me.direction == 1){
me.direction = -1;
}else{
me.direction = 1;
}
},
getDirection: func(){
return me.direction;
},
@ -82,6 +89,14 @@ var Engine = {
var throttle = props.getNode("/",1).getValue("/controls/engines/engine/throttle");
var direction = me.direction;
var mode = props.getNode("/",1).getValue("/controls/mode");
var volt = me.elecNodeV.getValue();
if(!volt){
me.rpm = 0;
props.getNode("/",1).setValue("/controls/engines/engine/rpma", 0);
outputForce(0);
return 0;
}
throttle = throttle * mode;
#print("throttle:" ~throttle);

View File

@ -430,10 +430,8 @@
<name>m</name>
<desc>Toggle direction</desc>
<binding>
<command>property-cycle</command>
<property>controls/engines/engine/direction</property>
<value type="double">-1</value>
<value type="double">1</value>
<command>nasal</command>
<script>engine.engine_1.toggleDirection();</script>
</binding>
</key>
<key n="119">