Problem with my project
So I need the 2nd panel event in the second attachment to call the method in the first attachment and use some of the variables ie timeOfFlight defined in the 3rd attachment really stuck with this would love some help
2 Replies
There are many ways of doing this, the simplest way would be to create a private field inside the class (outside the methods)
Change timeOfFlight to _timeOfFlight inside NoHorizontalAccelerationCalculation() method this way you are setting the value outside your method and so it becomes usable in others methods of the same class (private field)
This means now you can do
Note : This will work but is totally not the best way to do, you'll have to change this behaviour later., just gave you an easy solution in many solutions.
Is it ok for you ?
yep that has worked fine thank you