 // at selector position j.  Only meaningful in state 1, and then only for
 // 0 <= j < the current selector gear position.  When we transition to state 2
 // we use this to populate gear_types and gear_orientations.
+// NOTE: we assume the photoresistor is positioned "up".
+// TODO(benkraft): Confirm this is correct.
 boolean photoresistor_history[3][7];
 
-// The state of the ith gear, if we know it.  Only meaningful in state 2; set
-// from photoresistor_history when we transition there.
+// The state of the ith gear, if we know it.  This is not its current position,
+// but rather the position corresponding to selector gear 0!  Only meaningful
+// in state 2; set from photoresistor_history when we transition there.
 // Type is 0, 1, 2, in order of the correct solution.
 // Orientation is 0 in the correct solution, 1 if we are one step clockwise
 // from it, and so on.

      {
        state = 2;
        // This fills in gear_types and gear_orientations.
        if (!computeGearPositions())
        {
          // Or should we say you failed calibration?
          sendCastleErrorMessage();
          state = 0;
          resetLights();
        }

        for (int i=0; i<7; i++)
        {
          correct_positions[i] = false;
        }
      }
    }

  // TODO(bhomberg): close all solenoids (??)
}

// Tell the user they have won!
void sendCastleSuccessMessage() 
{
  // 20's -- 2nd puzzle message
