From b9f25b3ca7296610fce555bdb85d6f6e328b2de7 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Mon, 20 Apr 2020 15:27:39 +0100 Subject: [PATCH] Invalid egt (Why would that ever happen) no longer crashes lower ECAM --- Models/Instruments/Lower-ECAM/Lower-ECAM.nas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas index 488080e9..648f27fb 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas @@ -688,14 +688,14 @@ var canvas_lowerECAM_apu = { # APU N and EGT if (apu_master.getValue() == 1) { me["APUN"].setColor(0.0509,0.7529,0.2941); - me["APUN"].setText(sprintf("%s", math.round(apu_rpm.getValue()))); + me["APUN"].setText(sprintf("%s", math.round(apu_rpm.getValue() or 0))); me["APUEGT"].setColor(0.0509,0.7529,0.2941); - me["APUEGT"].setText(sprintf("%s", math.round(apu_egt.getValue(), 5))); + me["APUEGT"].setText(sprintf("%s", math.round(apu_egt.getValue() or 0, 5))); } else if (apu_rpm.getValue() >= 1) { me["APUN"].setColor(0.0509,0.7529,0.2941); - me["APUN"].setText(sprintf("%s", math.round(apu_rpm.getValue()))); + me["APUN"].setText(sprintf("%s", math.round(apu_rpm.getValue() or 0))); me["APUEGT"].setColor(0.0509,0.7529,0.2941); - me["APUEGT"].setText(sprintf("%s", math.round(apu_egt.getValue(), 5))); + me["APUEGT"].setText(sprintf("%s", math.round(apu_egt.getValue() or 0, 5))); } else { me["APUN"].setColor(0.7333,0.3803,0); me["APUN"].setText(sprintf("%s", "XX"));