Closed BarusXXX closed 2 years ago
@BarusXXX, try logging a debug message from each part of this if statement to understand which one is triggered: https://github.com/mariuszhermansdorfer/SandWorm/blob/2b53d409f3cc18aa32da5d14bd61c5a1802dead8/SandWorm/Components/SetupComponent.cs#L123
Simply add:
output.Add("My debug statement"); // Debug Info
and it will be visible in the output node of the component
I did it with breakpoints earlier. At the point of of the error (marked with an arrow) it is still null. It should be declared earlier on no?
It is reflecting this line; but this has only the empty variable, so when it calls the array index it makes the component give this error... (This only get triggered when one toggles calibrate)
I have added a handle for the kinect type for calibration in my latest commit ebb1c3d,
However I am checking the runtime with breakpoints and runningSum Array is a Null throughout the calculation here... https://github.com/mariuszhermansdorfer/SandWorm/blob/2b53d409f3cc18aa32da5d14bd61c5a1802dead8/SandWorm/Components/SetupComponent.cs#L125
SetupKinect uses the elevation array to populate the runningSum if it is null? But elevation array is null at the moment runningSum is needed, so runningSum is also null... (maybe this is the issue)?
What function should be bringing it into the scope?