removed test mode support

It turns out that FMS does weird stuff with test mode, so we'd never use it, and
it turns it on and off (or something...) constantly, so it's not worth
supporting (and it creates irritating logs).

git-svn-id: https://robotics.mvla.net/svn/frc971/2013/trunk/src@4272 f308d9b7-e957-4cde-b6ac-9a88185e7312
diff --git a/aos/atom_code/input/JoystickInput.cpp b/aos/atom_code/input/JoystickInput.cpp
index 8b3bc44..8f8c4fa 100644
--- a/aos/atom_code/input/JoystickInput.cpp
+++ b/aos/atom_code/input/JoystickInput.cpp
@@ -16,10 +16,14 @@
   buttons[2] = control_data_.stick2Buttons;
   buttons[3] = control_data_.stick3Buttons;
 
+  // Put the ENABLED, AUTONOMOUS, and FMS_ATTACHED values into unused bits in
+  // the values for joystick 0 so that PosEdge and NegEdge can be used with
+  // them.
+  // Windows only supports 12 buttons, so we know there will never be any more.
+  // Not using MASK because it doesn't make it any cleaner.
   buttons[0] |= (control_data_.enabled << (ENABLED - 9)) |
       (control_data_.autonomous << (AUTONOMOUS - 9)) |
-      (control_data_.fmsAttached << (FMS_ATTACHED - 9)) |
-      (control_data_.test << (TEST_MODE - 9));
+      (control_data_.fmsAttached << (FMS_ATTACHED - 9));
 
   for (int j = 0; j < 4; ++j) {
     for (int k = 1; k <= 12; ++k) {
@@ -37,8 +41,6 @@
   if (NegEdge(0, AUTONOMOUS)) LOG(INFO, "NegEdge(AUTONOMOUS)\n");
   if (PosEdge(0, FMS_ATTACHED)) LOG(INFO, "PosEdge(FMS_ATTACHED)\n");
   if (NegEdge(0, FMS_ATTACHED)) LOG(INFO, "NegEdge(FMS_ATTACHED)\n");
-  if (PosEdge(0, TEST_MODE)) LOG(INFO, "PosEdge(TEST_MODE)\n");
-  if (NegEdge(0, TEST_MODE)) LOG(INFO, "NegEdge(TEST_MODE)\n");
 }
 
 void JoystickInput::Run() {
@@ -52,7 +54,6 @@
     if (!robot_state.MakeWithBuilder()
         .enabled(Pressed(0, ENABLED))
         .autonomous(Pressed(0, AUTONOMOUS))
-        .test_mode(Pressed(0, TEST_MODE))
         .team_id(ntohs(control_data_.teamID))
         .Send()) {
 			LOG(WARNING, "sending robot_state failed\n");
diff --git a/aos/atom_code/input/JoystickInput.h b/aos/atom_code/input/JoystickInput.h
index ddb0388..313ad0a 100644
--- a/aos/atom_code/input/JoystickInput.h
+++ b/aos/atom_code/input/JoystickInput.h
@@ -9,6 +9,7 @@
 // cRIO.
 // Designed for a subclass that implements RunIteration to be instantiated and
 // Runed.
+// TODO(brians): rewrite this with OO buttons/fms state etc
 class JoystickInput {
  private:
   uint16_t buttons[4], old_buttons[4];
@@ -23,7 +24,6 @@
   static const int ENABLED = 13;
   static const int AUTONOMOUS = 14;
   static const int FMS_ATTACHED = 15;
-  static const int TEST_MODE = 16;
   bool Pressed(int stick, int button) {
 	  return buttons[stick] & MASK(button);
   }
diff --git a/aos/common/messages/RobotState.q b/aos/common/messages/RobotState.q
index 28ab287..32baa05 100644
--- a/aos/common/messages/RobotState.q
+++ b/aos/common/messages/RobotState.q
@@ -3,7 +3,6 @@
 message RobotState {
 	bool enabled;
 	bool autonomous;
-	bool test_mode;
 	uint16_t team_id;
 };