FromMilliseconds() public static method

Creates a value calculated from length (given a frequency) and optional delay.
public static FromMilliseconds ( float length, float frequency, float delay ) : NxpPca9685ChannelValue
length float /// Pulse length in milliseconds. Cannot be greater than one clock interval (1000 / frequency). ///
frequency float Clock frequency of the .
delay float Optional delay in milliseconds. Cannot be greater than one clock interval (1000 / frequency).
return NxpPca9685ChannelValue
        /// <summary>
        /// Calculates the "on" and "off" values of a channel from milliseconds (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 milliseconds. Cannot be greater than one clock interval (1000 / frequency).
        /// </param>
        /// <param name="delay">Optional delay in milliseconds. Cannot be greater than one clock interval (1000 / frequency).</param>
        /// <returns>
        /// Updated channel value or null when all channels were updated.
        /// </returns>
        public NxpPca9685Channel WriteChannelMilliseconds(int index, float length, float delay = 0)
        {
            // Read current frequency
            var frequency = ReadFrequency();

            // Call overloaded method
            return(WriteChannel(index, NxpPca9685ChannelValue.FromMilliseconds(length, frequency, delay)));
        }