From 3fde37d108e32b90d925600596907c523fc93eac Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Fri, 14 Sep 2018 08:45:23 -0400 Subject: [PATCH] DU: Fix numerous PFD bugs after props.nas transition --- Models/Instruments/PFD/PFD.nas | 26 +++++++++++++------------- revision.txt | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index f5403d2d..3c14e043 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -59,18 +59,18 @@ var hdg_scale = props.globals.initNode("/instrumentation/pfd/heading-scale", 0.0 var track = props.globals.initNode("/instrumentation/pfd/track-deg", 0.0, "DOUBLE"); var track_diff = props.globals.initNode("/instrumentation/pfd/track-hdg-diff", 0.0, "DOUBLE"); var speed_pred = props.globals.initNode("/instrumentation/pfd/speed-lookahead", 0.0, "DOUBLE"); -var du1_test = props.globals.getNode("/instrumentation/du/du1-test", 1); -var du1_test_time = props.globals.getNode("/instrumentation/du/du1-test-time", 1); -var du1_test_amount = props.globals.getNode("/instrumentation/du/du1-test-amount", 1); -var du2_test = props.globals.getNode("/instrumentation/du/du2-test", 1); -var du2_test_time = props.globals.getNode("/instrumentation/du/du2-test-time", 1); -var du2_test_amount = props.globals.getNode("/instrumentation/du/du2-test-amount", 1); -var du5_test = props.globals.getNode("/instrumentation/du/du5-test", 1); -var du5_test_time = props.globals.getNode("/instrumentation/du/du5-test-time", 1); -var du5_test_amount = props.globals.getNode("/instrumentation/du/du5-test-amount", 1); -var du6_test = props.globals.getNode("/instrumentation/du/du6-test", 1); -var du6_test_time = props.globals.getNode("/instrumentation/du/du6-test-time", 1); -var du6_test_amount = props.globals.getNode("/instrumentation/du/du6-test-amount", 1); +var du1_test = props.globals.initNode("/instrumentation/du/du1-test", 0, "BOOL"); +var du1_test_time = props.globals.initNode("/instrumentation/du/du1-test-time", 0.0, "DOUBLE"); +var du1_test_amount = props.globals.initNode("/instrumentation/du/du1-test-amount", 0.0, "DOUBLE"); +var du2_test = props.globals.initNode("/instrumentation/du/du2-test", 0, "BOOL"); +var du2_test_time = props.globals.initNode("/instrumentation/du/du2-test-time", 0.0, "DOUBLE"); +var du2_test_amount = props.globals.initNode("/instrumentation/du/du2-test-amount", 0.0, "DOUBLE"); +var du5_test = props.globals.initNode("/instrumentation/du/du5-test", 0, "BOOL"); +var du5_test_time = props.globals.initNode("/instrumentation/du/du5-test-time", 0.0, "DOUBLE"); +var du5_test_amount = props.globals.initNode("/instrumentation/du/du5-test-amount", 0.0, "DOUBLE"); +var du6_test = props.globals.initNode("/instrumentation/du/du6-test", 0, "BOOL"); +var du6_test_time = props.globals.initNode("/instrumentation/du/du6-test-time", 0.0, "DOUBLE"); +var du6_test_amount = props.globals.initNode("/instrumentation/du/du6-test-amount", 0.0, "DOUBLE"); var vspeed_pfr = props.globals.getNode("/it-autoflight/internal/vert-speed-fpm-pfd", 1); var gear_agl = props.globals.getNode("/position/gear-agl-ft", 1); var aileron_input = props.globals.getNode("/controls/flight/aileron-input-fast", 1); @@ -207,7 +207,7 @@ var canvas_PFD_base = { du1_test.setValue(1); du1_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1)); du1_test_time.setValue(elapsedtime_act); - } else if (acconfig.getValue() == 1 and du1_test != 1) { + } else if (acconfig.getValue() == 1 and du1_test.getValue() != 1) { du1_test.setValue(1); du1_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1)); du1_test_time.setValue(elapsedtime_act - 30); diff --git a/revision.txt b/revision.txt index 3074f759..bf388ea4 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -4636 \ No newline at end of file +4637 \ No newline at end of file