I just skimmed through it, and, if I may be blunt, it would definitely not survive a code review by my team’s mentors. One thing that I noticed is that many of the variable names don’t really describe what they ARE. For example, in ArcadeDriveCalculation.java:42, the line
mY = cube(Y) / 8 * 2;
tells me absolutely nothing. Modified Y? And what are m1 and m2? Are they the values to be sent to the motors, or the motors themselves, etc. Because we do something similar in our own code, except squaring and not cubing, I am familiar with the cube() part. However, the numbers 8 and 2 mean nothing to me. Are they for tuning the joystick values? And why are they two constants, if they can be simplified? Why not just say /4? (Which still means nothing to me.) Also, just a warning, the logic on line 45 seems strange, and m1 and m2 are identical, so you can use only one variable for that part.
Suggestion: Simplify your while loop on CVEncoder.java:29. You can do it with a simple
for(int i=1;i<numOfEncoders;i+=2) {
spin* = new Encoder(i,i+1);
}
and save yourself both some unnecessarily obfuscated code, and some space.
There are tons of magic numbers in your code, which refers back to my first paragraph. If you DO use a magic number, you might want to either make it a named constant for legibility and ease of changing, or at least leave comments saying what they are and what they are for, so it makes it easier to “preserve the programming team” when students next year look at it and wonder why a certain number is so crucial. (My team had to look up pi/128 today, and made sure to comment exactly why and how they got that value.)
The naming, “Actuate Calculate Perceive” DOES say what those groups do, and it may just be my unfamiliarity with Java talking, but it seems kind of unneeded. Why not just say “Outputs Logic Inputs”? Or even (pardon my Java inexperience here), why do you need to have them all separated like that? Since you most likely won’t have two classes with the same name, why not just put them all in the same folder?
Also, side question, DataStructure only has support for one joystick. Is your team planning to add a second joystick? If not, what are your plans for the second driver?*