@Override public TalonSRX setStatusFrameRate(StatusFrameRate frameRate, int periodMillis) { talon.setStatusFrameRateMs( edu.wpi.first.wpilibj.CANTalon.StatusFrameRate.valueOf(frameRate.value()), periodMillis); double periodInSeconds = periodMillis / 1000.0; switch (frameRate) { case FEEDBACK: feedbackRateInSeconds = periodInSeconds; break; case QUADRATURE_ENCODER: quadratureRateInSeconds = periodInSeconds; break; case ANALOG_TEMPERATURE_BATTERY_VOLTAGE: analogRateInSeconds = periodInSeconds; break; case GENERAL: // nothing to set, since our code doesn't use the "general" frames break; } return this; }