We are editing the current master branch as we go. Here we will document changes we make and big things we want to change. Line numbers relevant to branch ____ and are approximate.
General Changes
Changed: deleted unused imports
Changed: removed commented out code (or labeled "test")
DriveTrainCommand
Changed: remove operator suppliers and mentions from class (near line 39-40, and 49-50)(lines 84-90 AND lines 113-120 - commended out "maybe add this later code" needs to go
lines 76-82 (roughly) use atan(5) and then divide by 5. This is a magic number. (could use any number btw). Use a constant
rumble code (lines 91-105) has some duplication, quickTurn code needs to be changed, first lines especially (MASON)
Changed: commented (lines 122-126) out smartDashBoard speed, rotation, direction logs and labeled it test code (//test)
Changed: getDirection (line 130) got rid of print line
add a stop method in driveTrain (m_driveTrain.stop() ) in place of end method code (m_driveTrain.tankDrive(0, 0) - STOPS instead of setting power to 0
AutoBalance
when setting initial state for state machine, don't do in constructor, do in initialize! It is better
Changed: remove PID that wasn't being used in AutoBalance
Changed: deleted averageAngleList array list because it was a possible option, but wasn't being used
Changed: Printing "starting auto balance" deleted, as we already log when commands start and stop
if we ever wanted to turn while balancing, we need to reset gyro
Changed: deleted large amounts of commented code with pSpeed, not being used (constantSpeed method used instead)
Changed: currentAngle should replace state machine (line 58) Math.abs( m_gyroSubsystem.getYAngle );
Changed: moved constantSpeedDrive to start if approachingRamp case (line 58)
lines 60-67 are doing 2 different things. Order matters. State machine needs to be evaluated (ALEX)
Note: getting encoder distance only works for 1 command at a time. We are fine with this
line 92, if(Math.abs(currentAngle) <= 2.5), needs a constant! no magic numbers
consantSpeedBalance (line 103) called at the end of the state machine might be overriding everything (ALEX)
line 125 (curvaturedrive) could be m_driveTrainSubsystem.stop()
AutoMethod
line 205(new InstantCommand) might not be running, might just be creating new command. just use inside of it
use logging instead of System.out.println, and use .StringOf (or .getName?) to get actual name of objective
System.out.println() delete these;
in switch command, might get rid of AutoMethod() and just use Method
Leave community near and far are swiched
change else brackets to start on same else line to be consistent
We are editing the current master branch as we go. Here we will document changes we make and big things we want to change. Line numbers relevant to branch ____ and are approximate.
General Changes
DriveTrainCommand
AutoBalance
AutoMethod