You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, just a heads up to anyone else running into this, but my ctrlLog.txt was logging mostly zeros and the post-processing of the autopilot was then dropping all frames. The problem turned out to be this method.
The problem is likely that across Java compilers the order of operations on line 845 and 846 is such that the author's Java compiler was converting to int after the multiplication occurred. In my compiler the (int) conversion was happening prior to the multiplication, so I was ending up with mostly zeros because the getLeft() and getRight() returns a float unless you're at full speed for which you get a 1. Those were the only lines where I got a value in ctrlLog.txt.
So, the fix is to put quotes around the multiplication step so it occurs first.
My ctrlLog.txt now looks like this:
It used to look almost completely like this:
The text was updated successfully, but these errors were encountered:
Hey, just a heads up to anyone else running into this, but my ctrlLog.txt was logging mostly zeros and the post-processing of the autopilot was then dropping all frames. The problem turned out to be this method.
The problem is likely that across Java compilers the order of operations on line 845 and 846 is such that the author's Java compiler was converting to int after the multiplication occurred. In my compiler the (int) conversion was happening prior to the multiplication, so I was ending up with mostly zeros because the getLeft() and getRight() returns a float unless you're at full speed for which you get a 1. Those were the only lines where I got a value in ctrlLog.txt.
So, the fix is to put quotes around the multiplication step so it occurs first.
My ctrlLog.txt now looks like this:
It used to look almost completely like this:
The text was updated successfully, but these errors were encountered: