A3XX: Fix nasal error

This commit is contained in:
Joshua Davidson 2018-01-20 16:46:22 -05:00
parent 0e17ef7685
commit efb31509db

View file

@ -672,8 +672,8 @@ var fpa_calc = func {
} }
setlistener("/it-autoflight/input/kts-mach", func { setlistener("/it-autoflight/input/kts-mach", func {
var ias = getprop("/it-autoflight/input/spd-kts"); var ias = getprop("/it-autoflight/input/spd-kts") or 0;
var mach = getprop("/it-autoflight/input/spd-mach"); var mach = getprop("/it-autoflight/input/spd-mach") or 0;
if (getprop("/it-autoflight/input/kts-mach") == 0) { if (getprop("/it-autoflight/input/kts-mach") == 0) {
if (ias >= 100 and ias <= 350) { if (ias >= 100 and ias <= 350) {
setprop("/it-autoflight/input/spd-kts", math.round(ias, 1)); setprop("/it-autoflight/input/spd-kts", math.round(ias, 1));