Closed GraniteBots10230 closed 5 years ago
Hey!
Inside the GoldAlignDetector
class, there is two public fields: alignPosOffset
and alignSize
. I believe this is what you are looking for.
Inside the process
method of the GoldAlignDetector
class, there the following statements:
double alignX = (getAdjustedSize().width / 2) + alignPosOffset;
double alignXMin = alignX - (alignSize / 2);
double alignXMax = alignX +(alignSize / 2);
As we can see, variable alignX
is where the center of the aligning zone, while alignXMin
is the left-bound for the zone and alignXMax
is the right-bound one.
I'm working on a opmode with gold align detector, and i want to use the alignedX variable in my code to use. I've messed around with some values and things but can't figure it out. More spicificly, I'm looking for the center of what the detector considers aligned.