issues
search
AGHSEagleRobotics
/
frc1388-2023
0
stars
0
forks
source link
AutoBalance Issue
#48
Open
isabellebowdey
opened
1 year ago
isabellebowdey
commented
1 year ago
[x] 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
[n/a] 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)
[x] 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
[x] line 92, if(Math.abs(currentAngle) <= 2.5), needs a constant! no magic numbers
[x] consantSpeedBalance (line 103) called at the end of the state machine might be overriding everything (ALEX)
[x] line 125 (curvaturedrive) could be m_driveTrainSubsystem.stop()