diff --git a/main.lua b/main.lua index f40d7ba..0db4477 100644 --- a/main.lua +++ b/main.lua @@ -711,7 +711,7 @@ function UpdateGlobalThrust() -- lateral thrust -- verify that SensorData.Velocity.Raw is not nil - if SensorData.Velocity.Raw == nil then + if SensorData.Velocity == nil or SensorData.Velocity.Raw == nil then if Config.Debug then print("DEBUG: SensorData.Velocity.Raw is nil, skipping UpdateGlobalThrust") end @@ -748,7 +748,7 @@ function UpdateGlobalThrust() -- angular thrust -- verify that SensorData.Gimbal.AngularRates is not nil - if SensorData.Gimbal.AngularRates == nil then + if SensorData.Gimbal == nil or SensorData.Gimbal.AngularRates == nil then if Config.Debug then print("DEBUG: SensorData.Gimbal.AngularRates is nil, skipping UpdateGlobalThrust") end