Systems: Bug fix
This commit is contained in:
parent
ccadf090c3
commit
3d79990d80
|
@ -37,6 +37,7 @@ var Steering = {
|
|||
|
||||
input: 0, #//-1: left, 1:right, 0: none
|
||||
command: 0, #//Steering command, range from -1 to 1
|
||||
commandNode: props.getNode("/controls/flight/rudder", 1),
|
||||
steeringAngle: 0, #//in rad
|
||||
#steeringAngleDeg: 0, #//in degrees
|
||||
|
||||
|
@ -65,7 +66,8 @@ var Steering = {
|
|||
if(math.abs(me.steeringAngle) <=0.2)
|
||||
{
|
||||
me.steeringAngle = 0;
|
||||
props.getNode("/",1).setValue("/controls/flight/rudder", me.command);
|
||||
me.command = me.steeringAngle / me.steeringLimit; #//The steering wheel could rotate for two circles and a half
|
||||
me.commandNode.setValue(me.command);
|
||||
#me.steeringAngleDeg = me.steeringAngle * R2D;
|
||||
#props.getNode("/",1).setValue("/controls/steering_wheel", me.steeringAngleDeg);
|
||||
}
|
||||
|
@ -102,7 +104,7 @@ var Steering = {
|
|||
|
||||
me.command = me.steeringAngle / me.steeringLimit; #//The steering wheel could rotate for two circles and a half
|
||||
#me.steeringAngleDeg = me.steeringAngle * R2D;
|
||||
props.getNode("/",1).setValue("/controls/flight/rudder", me.command);
|
||||
me.commandNode.setValue(me.command);
|
||||
#props.getNode("/",1).setValue("/controls/steering_wheel", me.steeringAngleDeg);
|
||||
if(me.debugMode)
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<sim>
|
||||
|
||||
<description>Follow Me e-tron</description>
|
||||
<author>Gijs de Rooy, 李维昊 (Weihao Li), 梁思地 (Sidi Liang), 罗启元 (Qiyuan Luo), ValKmjolnir, Marsdolphin</author>
|
||||
<author>Gijs de Rooy, 梁思地 (Sidi Liang), 罗启元 (Qiyuan Luo), ValKmjolnir, 李维昊 (Weihao Li), Marsdolphin</author>
|
||||
<status>early production</status>
|
||||
<long-description>
|
||||
An electronic, High-Performance version of a follow me car (Renault Kangoo I) with Chinese characteristics.
|
||||
|
@ -517,7 +517,6 @@
|
|||
<int n="1" alias="/sim/model/lights/indicator-right/state"/>
|
||||
<int n="2" alias="/systems/horn"/>
|
||||
<int n="3" alias="/controls/lighting/headlight"/>
|
||||
<int n="4" alias="/controls/gear/brake-left"/>
|
||||
<int n="5" alias="/services/service-truck/enable"/>
|
||||
<int n="6" alias="/systems/screen-enable"/>
|
||||
<int n="7" alias="/gear/gear[0]/tyre-smoke"/>
|
||||
|
@ -531,6 +530,7 @@
|
|||
<int n="15" alias="/systems/instruments/enable_switches"/>
|
||||
<int n="16" alias="/warninglight/start"/>
|
||||
|
||||
<!--float current num:25 -->
|
||||
<float n="0" alias="/controls/doors/rearright/position-norm"/>
|
||||
<float n="1" alias="/controls/doors/rearleft/position-norm"/>
|
||||
<float n="2" alias="/controls/doors/frontright/position-norm"/>
|
||||
|
@ -561,6 +561,7 @@
|
|||
|
||||
<float n="18" alias="/fdm/jsbsim/animation/steering_wheel_pos"/>
|
||||
<float n="19" alias="/controls/gear/brake-parking"/>
|
||||
<float n="25" alias="/controls/gear/brake-left"/>
|
||||
<float n="22" alias="/controls/engines/engine/throttle"/>
|
||||
|
||||
<float n="23" alias="/fdm/jsbsim/animation/storage_cover_pos"/>
|
||||
|
|
Loading…
Reference in New Issue