Is this a sensible way to do it?
Fragment of a discussion from User talk:Cbrowne
Jump to navigation
Jump to search
Well the reason I was using oldHeading was because it was originally passed into turnGunTo, but since it's called turnGunTo, and therefore only ever applies to the Gun, I realised I could [read: should] get the value inside the function itself.
Shouldn't it be setTurnGunLeftRadians() (or setTurnGunRightRadians())?
I'm still working on checking which one I want, and what value I want to pass into it (currently calling it with:
turnGunTo(Utils.normalRelativeAngle(getGunHeadingRadians() - e.getBearingRadians()));
inside my onScannedRobot() function)
You're being uncharacteristically helpful for a random stranger on the internet. Am I supposed to give you cookies or something? :)