예제 #1
0
 /// <summary> Send one buzzmotor command to specific fingers, as indicated by the fingers array. </summary>
 /// <param name="fingers">The fingers (from thumb to pinky) to which to actually apply the buzzMotor command.</param>
 /// <param name="magn"></param>
 /// <param name="dur"></param>
 /// <returns></returns>
 public bool SendBuzzCmd(bool[] fingers, int magnitude = 100, int duration = 400, BuzzMotorPattern pattern = BuzzMotorPattern.Constant)
 {
     return(this.SendBuzzCmd(
                fingers,
                new int[] { duration, duration, duration, duration, duration },
                new int[] { magnitude, magnitude, magnitude, magnitude, magnitude },
                new BuzzMotorPattern[] { pattern, pattern, pattern, pattern, pattern }
                ));
 }
예제 #2
0
 /// <summary> Send a buzzmotor command to a specific finger. </summary>
 /// <param name="finger"></param>
 /// <param name="magnitude"></param>
 /// <param name="duration"></param>
 /// <param name="pattern"></param>
 /// <returns></returns>
 public bool SendBuzzCmd(Finger finger, int magnitude, int duration, BuzzMotorPattern pattern = BuzzMotorPattern.Constant)
 {
     bool[] fingers = new bool[5];
     if (finger == Finger.All)
     {
         fingers = new bool[5] {
             true, true, true, true, true
         }
     }
     ;
     else
     {
         fingers[(int)finger] = true;
     }
     return(this.SendBuzzCmd(fingers, magnitude, duration, pattern));
 }