Beispiel #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="Driving">The driving command</param>
 /// <param name="Steering">The steering command</param>
 /// <param name="Multiplier">Multiplier on GetCurrentDriving and GetCurrentSteering values</param>
 public InputSequence(Sequence Driving, Sequence Steering, double Multiplier=1)
 {
     if (Driving.Length != Steering.Length)
         throw new ArgumentException("The length of the two sequences must be the same.");
     driving = Driving;
     steering = Steering;
     //sync Sequences
     driving.Rewind();
     steering.Rewind();
     multiplier = Multiplier;
 }
Beispiel #2
0
 private void sendWaveButton_Click(object sender, RoutedEventArgs e)
 {
     if (Data.ctr == null)
         return;
     Sequence s1 = Sequence.Pulse(40, 0, 15, 5, 0);
     Sequence s2 = Sequence.Pulse(40, 0, 15, -9, 0);
     Sequence s = new Sequence();
     s.Append(s1);
     s.Append(s2);
     s.Append(s1);
     s.Append(s2);
     s.Append(s1);
     s.Append(s2);
     InputSequence fis = new InputSequence(s, new Sequence(s.Length));
     Data.ctr.StartFixedInputSequence(ref fis);
 }
Beispiel #3
0
 public OutputSequence(long Size)
 {
     left = new Sequence(Size);
     right = new Sequence(Size);
 }
Beispiel #4
0
 public void Append(Sequence a)
 {
     double[] c = new double[data.Length+a.data.Length];
     Array.Copy(data, c, data.Length);
     Array.Copy(a.Data, 0, c, data.Length, a.Length);
     data = c;
     length = data.Length;
 }