/** occasionally builds a line and prints to output window */ void Instrument() { if (--_timeToPrint <= 0) { _timeToPrint = 20; _sb.Clear(); _sb.Append("pos="); _sb.Append(_talon.GetPosition()); _sb.Append(" vel="); _sb.Append(_talon.GetSpeed()); _sb.Append(" err="); _sb.Append(_talon.GetClosedLoopError()); _sb.Append(" out%="); _sb.Append(_talon.GetOutputVoltage() * 100.0f / 12.0f); Debug.Print(_sb.ToString()); } }