From 77877584f80f4c9a631bf9f1b8786f810fdf0f60 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 19 Jan 2024 14:46:10 +1100 Subject: [PATCH] AP_Scripting: fixed example script --- libraries/AP_Scripting/examples/plane-wind-fs.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libraries/AP_Scripting/examples/plane-wind-fs.lua b/libraries/AP_Scripting/examples/plane-wind-fs.lua index 0f22e1aa8f..23b643c7bf 100644 --- a/libraries/AP_Scripting/examples/plane-wind-fs.lua +++ b/libraries/AP_Scripting/examples/plane-wind-fs.lua @@ -48,11 +48,9 @@ if value then else error('LUA: get MIN_GNDSPD_CM failed') end -value = param:get('LIM_ROLL_CD') -if value then - max_bank_angle = value / 100 -else - error('LUA: get LIM_ROLL_CD failed') +max_bank_angle = param:get('LIM_ROLL_DEG') +if not max_bank_angle then + error('LUA: get LIM_ROLL_DEG failed') end -- https://en.wikipedia.org/wiki/Standard_rate_turn#Radius_of_turn_formula