broke out UpdateGlobalThrust into UpdateGlobalLateralThrust and UpdateGlobalAngularThrust to check if the sensor issue is isolated
This commit is contained in:
14
main.lua
14
main.lua
@@ -709,11 +709,19 @@ function UpdateGlobalThrust()
|
||||
-- each thruster has a power value from 0 to 1, which is the amount of thrust the thruster is currently applying
|
||||
-- depending on the desired thrust vectors, some counteractive desired thrust vectors will be ignored
|
||||
|
||||
-- lateral thrust
|
||||
UpdateGlobalLateralThrust()
|
||||
|
||||
-- angular thrust
|
||||
UpdateGlobalAngularThrust()
|
||||
end
|
||||
|
||||
function UpdateGlobalLateralThrust()
|
||||
-- lateral thrust
|
||||
-- verify that SensorData.Velocity.Raw is not nil
|
||||
if SensorData.Velocity == nil or SensorData.Velocity.Raw == nil then
|
||||
if Config.Debug then
|
||||
print("DEBUG: SensorData.Velocity.Raw is nil, skipping UpdateGlobalThrust")
|
||||
print("DEBUG: SensorData.Velocity.Raw is nil, skipping UpdateGlobalLateralThrust")
|
||||
end
|
||||
return
|
||||
end
|
||||
@@ -745,12 +753,14 @@ function UpdateGlobalThrust()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function UpdateGlobalAngularThrust()
|
||||
-- angular thrust
|
||||
-- verify that SensorData.Gimbal.AngularRates is not nil
|
||||
if SensorData.Gimbal == nil or SensorData.Gimbal.AngularRates == nil then
|
||||
if Config.Debug then
|
||||
print("DEBUG: SensorData.Gimbal.AngularRates is nil, skipping UpdateGlobalThrust")
|
||||
print("DEBUG: SensorData.Gimbal.AngularRates is nil, skipping UpdateGlobalAngularThrust")
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user