cleaned up the formatting
diff --git a/frc971/constants.cc b/frc971/constants.cc
index f7363c6..5f86233 100755
--- a/frc971/constants.cc
+++ b/frc971/constants.cc
@@ -52,62 +52,62 @@
switch (team) {
case kCompTeamNumber:
return new Values{
- kCompDrivetrainEncoderRatio,
- kCompLowGearRatio,
- kCompHighGearRatio,
- // ShooterLimits
- // TODO_ben: make these real numbers
- {0.0, 100.0, {-3.0, 2.0}, {-1, 4.0}, {2.0, 7.0}},
- shooter_voltage,
- // shooter_total_length
- 100.0,
- shooter_hall_effect_start_position,
- shooter_zeroing_off_speed,
- shooter_zeroing_speed,
- position,
- kCompLeftDriveShifter,
- kCompRightDriveShifter,
- true,
- control_loops::MakeVClutchDrivetrainLoop,
- control_loops::MakeClutchDrivetrainLoop,
- 0.5,
- 0.1,
- 0.0,
- 1.57,
- {0.0, 2.05, {-0.1, 0.05}, {1.0, 1.1}, {2.0, 2.1}},
- {0.0, 2.05, {-0.1, 0.05}, {1.0, 1.1}, {2.0, 2.1}},
- 0.02, // claw_unimportant_epsilon
- 50505.05, // start_fine_tune_pos
+ kCompDrivetrainEncoderRatio,
+ kCompLowGearRatio,
+ kCompHighGearRatio,
+ kCompLeftDriveShifter,
+ kCompRightDriveShifter,
+ true,
+ control_loops::MakeVClutchDrivetrainLoop,
+ control_loops::MakeClutchDrivetrainLoop,
+ // ShooterLimits
+ // TODO(ben): make these real numbers
+ {0.0, 100.0, {-3.0, 2.0}, {-1, 4.0}, {2.0, 7.0}},
+ shooter_voltage,
+ // shooter_total_length
+ 100.0,
+ shooter_hall_effect_start_position,
+ shooter_zeroing_off_speed,
+ shooter_zeroing_speed,
+ position,
+ 0.5,
+ 0.1,
+ 0.0,
+ 1.57,
+ {0.0, 2.05, {-0.1, 0.05}, {1.0, 1.1}, {2.0, 2.1}},
+ {0.0, 2.05, {-0.1, 0.05}, {1.0, 1.1}, {2.0, 2.1}},
+ 0.02, // claw_unimportant_epsilon
+ 50505.05, // start_fine_tune_pos
};
break;
case kPracticeTeamNumber:
return new Values{
- kPracticeDrivetrainEncoderRatio,
- kPracticeLowGearRatio,
- kPracticeHighGearRatio,
- // ShooterLimits
- // TODO_ben: make these real numbers
- {0.0, 100.0, {-3.0, 2.0}, {-1, 4.0}, {2.0, 7.0}},
- shooter_voltage,
- // shooter_total_length
- 100.0,
- shooter_hall_effect_start_position,
- shooter_zeroing_off_speed,
- shooter_zeroing_speed,
- position,
- kPracticeLeftDriveShifter,
- kPracticeRightDriveShifter,
- false,
- control_loops::MakeVDogDrivetrainLoop,
- control_loops::MakeDogDrivetrainLoop,
- 0.5,
- 0.1,
- 0.0,
- 1.57,
- {0.0, 2.05, {-0.1, 0.05}, {1.0, 1.1}, {2.0, 2.1}},
- {0.0, 2.05, {-0.1, 0.05}, {1.0, 1.1}, {2.0, 2.1}},
- 0.02, // claw_unimportant_epsilon
- 50505.05, //start_fine_tune_pos
+ kPracticeDrivetrainEncoderRatio,
+ kPracticeLowGearRatio,
+ kPracticeHighGearRatio,
+ kPracticeLeftDriveShifter,
+ kPracticeRightDriveShifter,
+ false,
+ control_loops::MakeVDogDrivetrainLoop,
+ control_loops::MakeDogDrivetrainLoop,
+ // ShooterLimits
+ // TODO(ben): make these real numbers
+ {0.0, 100.0, {-3.0, 2.0}, {-1, 4.0}, {2.0, 7.0}},
+ shooter_voltage,
+ // shooter_total_length
+ 100.0,
+ shooter_hall_effect_start_position,
+ shooter_zeroing_off_speed,
+ shooter_zeroing_speed,
+ position,
+ 0.5,
+ 0.1,
+ 0.0,
+ 1.57,
+ {0.0, 2.05, {-0.1, 0.05}, {1.0, 1.1}, {2.0, 2.1}},
+ {0.0, 2.05, {-0.1, 0.05}, {1.0, 1.1}, {2.0, 2.1}},
+ 0.02, // claw_unimportant_epsilon
+ 50505.05, //start_fine_tune_pos
};
break;
default:
diff --git a/frc971/constants.h b/frc971/constants.h
index 0b85d8a..01648f5 100755
--- a/frc971/constants.h
+++ b/frc971/constants.h
@@ -25,6 +25,12 @@
// This structure contains current values for all of the things that change.
struct Values {
+ // This is useful for representing the 2 sides of a hall effect sensor etc.
+ struct Pair {
+ double lower_limit;
+ double upper_limit;
+ };
+
// The ratio from the encoder shaft to the drivetrain wheels.
double drivetrain_encoder_ratio;
@@ -33,11 +39,12 @@
double low_gear_ratio;
double high_gear_ratio;
- // Three hall effects are known as front, calib and back
- struct Pair {
- double lower_limit;
- double upper_limit;
- };
+ ShifterHallEffect left_drive, right_drive;
+
+ bool clutch_transmission;
+
+ ::std::function<StateFeedbackLoop<2, 2, 2>()> make_v_drivetrain_loop;
+ ::std::function<StateFeedbackLoop<4, 2, 2>()> make_drivetrain_loop;
struct ShooterLimits {
double lower_limit;
@@ -56,13 +63,6 @@
double shooter_zeroing_speed;
double position;
- ShifterHallEffect left_drive, right_drive;
-
- bool clutch_transmission;
-
- ::std::function<StateFeedbackLoop<2, 2, 2>()> make_v_drivetrain_loop;
- ::std::function<StateFeedbackLoop<4, 2, 2>()> make_drivetrain_loop;
-
double claw_zeroing_off_speed;
double claw_zeroing_speed;