FromLength() public static method

Creates a value calculated from length and optional delay.
Automatically converts zero length to "always off" and maximum length to "always on".
public static FromLength ( int length, int delay ) : NxpPca9685ChannelValue
length int Pulse length in clock ticks, between 0 and .
delay int Optional delay in clock ticks, beteween 0 and .
return NxpPca9685ChannelValue
 /// <summary>
 /// Calculates the "on" and "off" values of a channel from length (and optional delay),
 /// then writes them together, and updates it in <see cref="Channels"/>.
 /// </summary>
 /// <param name="index">Zero based channel number (0-15) or 16 for the "all call" channel.</param>
 /// <param name="length">Pulse length in clock ticks.</param>
 /// <param name="delay">Optional delay in clock ticks.</param>
 /// <returns>
 /// Updated channel value or null when all channels were updated.
 /// </returns>
 public NxpPca9685Channel WriteChannelLength(int index, int length, int delay = 0)
 {
     // Call overloaded method
     return(WriteChannel(index, NxpPca9685ChannelValue.FromLength(length, delay)));
 }