correctly set the team number for tests
Without this, it's going to pick some random team number on some
computers and fail on others (depending on the network configuration).
Change-Id: I182ed50299170de737812eadee68ff418e6518e6
diff --git a/frc971/control_loops/fridge/fridge.gyp b/frc971/control_loops/fridge/fridge.gyp
index ade2d0a..1f3eebb 100644
--- a/frc971/control_loops/fridge/fridge.gyp
+++ b/frc971/control_loops/fridge/fridge.gyp
@@ -50,6 +50,7 @@
'<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
'<(AOS)/common/controls/controls.gyp:control_loop_test',
'<(DEPTH)/frc971/control_loops/control_loops.gyp:position_sensor_sim',
+ '<(DEPTH)/frc971/control_loops/control_loops.gyp:team_number_test_environment',
],
},
{
diff --git a/frc971/control_loops/fridge/fridge_lib_test.cc b/frc971/control_loops/fridge/fridge_lib_test.cc
index 98deb8e..120bd2c 100644
--- a/frc971/control_loops/fridge/fridge_lib_test.cc
+++ b/frc971/control_loops/fridge/fridge_lib_test.cc
@@ -9,13 +9,13 @@
#include "frc971/control_loops/fridge/fridge.q.h"
#include "frc971/control_loops/fridge/fridge.h"
#include "frc971/constants.h"
+#include "frc971/control_loops/team_number_test_environment.h"
using ::aos::time::Time;
namespace frc971 {
namespace control_loops {
namespace testing {
-
// Class which simulates the fridge and sends out queue messages with the
// position.
class FridgeSimulation {
@@ -131,7 +131,9 @@
".frc971.control_loops.fridge_queue.output",
".frc971.control_loops.fridge_queue.status"),
fridge_(&fridge_queue_),
- fridge_plant_() {}
+ fridge_plant_() {
+ set_team_id(kTeamNumber);
+ }
void VerifyNearGoal() {
fridge_queue_.goal.FetchLatest();