removed debug statements from previous commit and (hopefully) fixed the array not empty check, since the check was designed for tables and not arrays
This commit is contained in:
7
main.lua
7
main.lua
@@ -487,16 +487,11 @@ end
|
||||
|
||||
function PollVelocity()
|
||||
local velSensors = { peripheral.find("velocity_sensor") }
|
||||
if (Config.Debug) then
|
||||
print("DEBUG: Found "..#velSensors.." velocity sensors.")
|
||||
print("DEBUG: Velocity sensors: "..tableToString(velSensors))
|
||||
end
|
||||
|
||||
-- Velocity Sensors
|
||||
VelocityVectors = {}
|
||||
|
||||
local next = next
|
||||
if next(velSensors) == nil then -- verify table is not empty
|
||||
if velSensors[0] == nil then -- verify array is not empty
|
||||
|
||||
SensorData.Velocity = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user