Add constants for control panel

Change-Id: I9684d65564005f2624caa8e76d6227b1084b847f
diff --git a/y2020/BUILD b/y2020/BUILD
index 215c760..f0f87d2 100644
--- a/y2020/BUILD
+++ b/y2020/BUILD
@@ -36,6 +36,7 @@
         "//y2020/control_loops/superstructure/hood:hood_plants",
         "//y2020/control_loops/superstructure/intake:intake_plants",
         "//y2020/control_loops/superstructure/turret:turret_plants",
+	"//y2020/control_loops/superstructure/control_panel:control_panel_plants",
         "@com_google_absl//absl/base",
     ],
 )
diff --git a/y2020/constants.cc b/y2020/constants.cc
index 6f79b6b..cc5c1fb 100644
--- a/y2020/constants.cc
+++ b/y2020/constants.cc
@@ -12,6 +12,7 @@
 #include "aos/logging/logging.h"
 #include "aos/mutex/mutex.h"
 #include "aos/network/team_number.h"
+#include "y2020/control_loops/superstructure/control_panel/integral_control_panel_plant.h"
 #include "y2020/control_loops/superstructure/hood/integral_hood_plant.h"
 #include "y2020/control_loops/superstructure/intake/integral_intake_plant.h"
 #include "y2020/control_loops/superstructure/turret/integral_turret_plant.h"
@@ -74,7 +75,7 @@
       ::frc971::zeroing::PotAndAbsoluteEncoderZeroingEstimator>
       *const turret_params = &turret->subsystem_params;
 
-  //Turret Constants
+  // Turret Constants
   turret_params->zeroing_voltage = 4.0;
   turret_params->operating_voltage = 12.0;
   // TODO(austin): Tune these.
@@ -149,8 +150,8 @@
   static ::aos::Mutex mutex;
   ::aos::MutexLocker locker(&mutex);
 
-  // IMPORTANT: This declaration has to stay after the mutex is locked to avoid
-  // race conditions.
+  // IMPORTANT: This declaration has to stay after the mutex is locked to
+  // avoid race conditions.
   static ::std::map<uint16_t, const Values *> values;
 
   if (values.count(team_number) == 0) {
diff --git a/y2020/constants.h b/y2020/constants.h
index d7b9b4b..07f75cf 100644
--- a/y2020/constants.h
+++ b/y2020/constants.h
@@ -10,6 +10,7 @@
 #include "frc971/control_loops/pose.h"
 #include "frc971/control_loops/static_zeroing_single_dof_profiled_subsystem.h"
 #include "y2020/control_loops/drivetrain/drivetrain_dog_motor_plant.h"
+#include "y2020/control_loops/superstructure/control_panel/control_panel_plant.h"
 #include "y2020/control_loops/superstructure/hood/hood_plant.h"
 #include "y2020/control_loops/superstructure/intake/intake_plant.h"
 #include "y2020/control_loops/superstructure/turret/turret_plant.h"
@@ -119,6 +120,23 @@
   };
 
   PotAndAbsEncoderConstants turret;
+
+  // Control Panel
+
+  // Mag encoder
+  static constexpr double kControlPanelEncoderCountsPerRevolution() {
+    return 4096.0;
+  }
+
+  // Ratio is encoder to output
+  static constexpr double kControlPanelEncoderRatio() { return (56.0 / 28.0); }
+
+  static constexpr double kMaxControlPanelEncoderPulsesPerSecond() {
+    return control_loops::superstructure::control_panel::kFreeSpeed *
+           control_loops::superstructure::control_panel::kOutputRatio /
+           kControlPanelEncoderRatio() / (2.0 * M_PI) *
+           kControlPanelEncoderCountsPerRevolution();
+  }
 };
 
 // Creates (once) a Values instance for ::aos::network::GetTeamNumber() and