From 2d2e3879d79dafa6662d5771386c31f10b90291a Mon Sep 17 00:00:00 2001 From: xpxop <82467275+xpxop@users.noreply.github.com> Date: Sat, 23 Nov 2024 18:26:16 +0100 Subject: [PATCH] FIX (hopefully) for ALT overflow issues --- lua/improvedTCA.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/improvedTCA.lua b/lua/improvedTCA.lua index 31290dc..be70136 100644 --- a/lua/improvedTCA.lua +++ b/lua/improvedTCA.lua @@ -430,6 +430,10 @@ function calcValidALT(knobRef, chg) -- maxalt - 1 to be compatible with original script val = maxalt - 1 end + -- fixes (hopefully) ALT overflow issues + if val <= 0 then + val = 0 + end -- TODO: this has to be moved out of this function if PLANE_ICAO == "MD88" then set("Rotate/md80/autopilot/alt_sel_ft",val/100)