Пример #1
0
 public override void Set(uint period, uint highTime, PwmScaleFactor factor)
 {
     if (this._port == null)
     {
         this._port = new PWM(this._channel, period, highTime, (PWM.ScaleFactor)factor, this._invert);
         this._port.Start();
         this._started = true;
     }
     else
     {
         if (this._started)
         {
             this._port.Stop();
         }
         this._port.Scale    = (PWM.ScaleFactor)factor;
         this._port.Period   = period;
         this._port.Duration = highTime;
         this._port.Start();
         this._started = true;
     }
 }
Пример #2
0
 /// <summary>
 /// Sets the period and high time of the <see cref="PwmOutput" /> interface and starts the PWM signal.
 /// </summary>
 /// <param name="period">Period of the signal in units specified <paramref name="factor" />.</param>
 /// <param name="highTime">High time of the signal in units specified by <paramref name="factor" />.</param>
 /// <param name="factor">The units of <paramref name="period" /> and <paramref name="highTime" />.</param>
 public abstract void Set(uint period, uint highTime, PwmScaleFactor factor);
Пример #3
0
 /// <summary>
 /// Sets the period and high time of the <see cref="PwmOutput" /> interface and starts the PWM signal.
 /// </summary>
 /// <param name="period">Period of the signal in units specified <paramref name="factor" />.</param>
 /// <param name="highTime">High time of the signal in units specified by <paramref name="factor" />.</param>
 /// <param name="factor">The units of <paramref name="period" /> and <paramref name="highTime" />.</param>
 public abstract void Set(uint period, uint highTime, PwmScaleFactor factor);