got stuff actually working

changed port numbers etc for the new robot

git-svn-id: https://robotics.mvla.net/svn/frc971/2013/trunk/src@4100 f308d9b7-e957-4cde-b6ac-9a88185e7312
diff --git a/aos/common/die.cc b/aos/common/die.cc
index 195df45..00a86bb 100644
--- a/aos/common/die.cc
+++ b/aos/common/die.cc
@@ -48,6 +48,7 @@
 #endif
 }
 }  // namespace
+
 void VDie(const char *format, va_list args_in) {
   va_list args;
 
diff --git a/aos/crio/bin/netconsole.sh b/aos/crio/bin/netconsole.sh
index 8976400..0578162 100755
--- a/aos/crio/bin/netconsole.sh
+++ b/aos/crio/bin/netconsole.sh
@@ -1,3 +1,4 @@
 #!/bin/bash
 
-socat UDP4-RECV:6666,reuseaddr!!UDP4-SENDTO:robot:6668 READLINE
+# READLINE is nicer, but it dies when given lots of output
+socat UDP4-RECV:6666,reuseaddr!!UDP4-SENDTO:robot:6668 STDIO
diff --git a/frc971/atom_code/scripts/start_list.txt b/frc971/atom_code/scripts/start_list.txt
index 6bbcd70..0edca32 100644
--- a/frc971/atom_code/scripts/start_list.txt
+++ b/frc971/atom_code/scripts/start_list.txt
@@ -3,10 +3,6 @@
 SensorReader
 GyroReader
 DriveTrain
-WristMotor
-IntakeRollers
-HorizontalRoller
-VerticalRoller
 AutoMode
 BinaryLogReader
 CRIOLogReader
diff --git a/frc971/output/AtomMotorWriter.cc b/frc971/output/AtomMotorWriter.cc
index d0bf6f7..5d07953 100644
--- a/frc971/output/AtomMotorWriter.cc
+++ b/frc971/output/AtomMotorWriter.cc
@@ -19,17 +19,27 @@
 namespace output {
 
 class MotorWriter : public aos::MotorOutput {
+  // Maximum age of an output packet before the motors get zeroed instead.
+  static const int kOutputMaxAgeMS = 20;
+
   void RunIteration() {
-    if (drivetrain.output.FetchLatest()) {
-      AddMotor(TALON, 7, -drivetrain.output->left_voltage / 12.0);
-      AddMotor(TALON, 4, drivetrain.output->right_voltage / 12.0);
+    drivetrain.output.FetchLatest();
+    if (drivetrain.output.IsNewerThanMS(kOutputMaxAgeMS)) {
+      AddMotor(TALON, 2, drivetrain.output->right_voltage / 12.0);
+      AddMotor(TALON, 3, drivetrain.output->right_voltage / 12.0);
+      AddMotor(TALON, 5, -drivetrain.output->left_voltage / 12.0);
+      AddMotor(TALON, 6, -drivetrain.output->left_voltage / 12.0);
     } else {
-      AddMotor(TALON, 7, 0.0f);
-      AddMotor(TALON, 4, 0.0f);
+      AddMotor(TALON, 2, 0.0f);
+      AddMotor(TALON, 3, 0.0f);
+      AddMotor(TALON, 5, 0.0f);
+      AddMotor(TALON, 6, 0.0f);
+      LOG(WARNING, "zeroing drivetrain\n");
     }
 
     if (shifters.FetchLatest()) {
       AddSolenoid(1, shifters->set);
+      AddSolenoid(2, !shifters->set);
     }
   }
 };