예제 #1
0
        void Print_All()
        {
            StringBuilder _ms = new StringBuilder();

            _ms.Clear();
            _ms.Append(" Target Angle=");
            _ms.Append(angleSetpoint);
            _ms.Append("  Current Angle=");
            _ms.Append(scaledUnitsToDegrees(_turret.GetEncPosition()));
            _ms.Append(" Target RPM=");
            _ms.Append(rpmSetpoint);
            _ms.Append(" Current RPM=");
            _ms.Append(_shooter.GetSpeed());
            Debug.Print(_ms.ToString());
        }
예제 #2
0
        void Instrument()
        {
            if (--_timeToColumns <= 0)
            {
                _timeToColumns = 400;
                _sb.Clear();
                _sb.Append("topCnt \t");
                _sb.Append("btmCnt \t");
                _sb.Append("setval \t");
                _sb.Append("HasUndr\t");
                _sb.Append("IsUnder\t");
                _sb.Append(" IsVal \t");
                _sb.Append(" IsLast\t");
                _sb.Append("VelOnly\t");
                _sb.Append(" TargetPos[AndVelocity] \t");
                _sb.Append("Pos[AndVelocity]");
                Debug.Print(_sb.ToString());
            }

            if (--_timeToPrint <= 0)
            {
                _timeToPrint = 40;

                _sb.Clear();
                _sb.Append(_motionProfileStatus.topBufferCnt);
                _sb.Append("\t\t");
                _sb.Append(_motionProfileStatus.btmBufferCnt);
                _sb.Append("\t\t");
                _sb.Append(_motionProfileStatus.outputEnable);
                _sb.Append("\t\t");
                _sb.Append(_motionProfileStatus.hasUnderrun ? "   1   \t" : "       \t");
                _sb.Append(_motionProfileStatus.isUnderrun ? "   1   \t" : "       \t");
                _sb.Append(_motionProfileStatus.activePointValid ? "   1   \t" : "       \t");

                _sb.Append(_motionProfileStatus.activePoint.isLastPoint  ? "   1   \t" : "       \t");
                _sb.Append(_motionProfileStatus.activePoint.velocityOnly ? "   1   \t" : "       \t");

                _sb.Append(_motionProfileStatus.activePoint.position);
                _sb.Append("[");
                _sb.Append(_motionProfileStatus.activePoint.velocity);
                _sb.Append("]\t");


                _sb.Append("\t\t\t");
                _sb.Append(_talon.GetPosition());
                _sb.Append("[");
                _sb.Append(_talon.GetSpeed());
                _sb.Append("]");

                Debug.Print(_sb.ToString());
            }
        }
예제 #3
0
 /** 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());
     }
 }