refine nil check in last commit

This commit is contained in:
2026-06-27 17:50:08 -05:00
parent 621c27e551
commit f229d407f8

View File

@@ -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