Skip to content

Commit

Permalink
FIX (hopefully) for ALT overflow issues
Browse files Browse the repository at this point in the history
  • Loading branch information
xpxop authored Nov 23, 2024
1 parent a5db5c5 commit 2d2e387
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/improvedTCA.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2d2e387

Please sign in to comment.