Make initialization of 2020 constants explicit

By doing this, we will remember to initialize the constants
before RT so we don't malloc in RT.
Later we will replace this with the constants in a json file.

Signed-off-by: milind-u <milind.upadhyay@gmail.com>
Change-Id: I283f4accc3c180815abbc424d39c84fdd4c47d92
diff --git a/y2020/control_loops/superstructure/superstructure_lib_test.cc b/y2020/control_loops/superstructure/superstructure_lib_test.cc
index 029475a..26402f4 100644
--- a/y2020/control_loops/superstructure/superstructure_lib_test.cc
+++ b/y2020/control_loops/superstructure/superstructure_lib_test.cc
@@ -421,6 +421,16 @@
   float climber_voltage_ = 0.0f;
 };
 
+class SuperstructureTestEnvironment : public ::testing::Environment {
+ public:
+  void SetUp() override { constants::InitValues(); }
+};
+
+namespace {
+const auto kTestEnv =
+    ::testing::AddGlobalTestEnvironment(new SuperstructureTestEnvironment());
+}
+
 class SuperstructureTest : public ::frc971::testing::ControlLoopTest {
  protected:
   SuperstructureTest()
diff --git a/y2020/control_loops/superstructure/superstructure_main.cc b/y2020/control_loops/superstructure/superstructure_main.cc
index a9f071d..a10237d 100644
--- a/y2020/control_loops/superstructure/superstructure_main.cc
+++ b/y2020/control_loops/superstructure/superstructure_main.cc
@@ -1,3 +1,4 @@
+#include "y2020/constants.h"
 #include "y2020/control_loops/superstructure/superstructure.h"
 
 #include "aos/events/shm_event_loop.h"
@@ -10,6 +11,7 @@
       aos::configuration::ReadConfig("config.json");
 
   ::aos::ShmEventLoop event_loop(&config.message());
+  ::y2020::constants::InitValues();
   ::y2020::control_loops::superstructure::Superstructure superstructure(
       &event_loop);