Settings template for an RC PWM Channel
Example #1
0
        private RcSettingsTemplate createSettingsObject()
        {
            RcSettingsTemplate        sets = new RcSettingsTemplate();
            RcChannelSettingsTemplate chan;

            for (int i = 0; i < 8; i++)
            {
                chan                = new RcChannelSettingsTemplate();
                chan.Value          = channelControls[i].Value;
                chan.ChannelEnabled = channelControls[i].ChannelEnabled;
                chan.CalibrationSettings.CenterValue  = channelControls[i].Calibration_center;
                chan.CalibrationSettings.MaxDeviation = channelControls[i].Calibration_maxDeviation;

                sets.ChannelSettings.Add(chan);
            }
            sets.PwmFrequency = pwmFrequency;

            return(sets);
        }
Example #2
0
        private RcSettingsTemplate createSettingsObject()
        {
            RcSettingsTemplate sets = new RcSettingsTemplate();
            RcChannelSettingsTemplate chan;
            for (int i = 0; i < 8; i++)
            {
                chan = new RcChannelSettingsTemplate();
                chan.Value = channelControls[i].Value;
                chan.ChannelEnabled = channelControls[i].ChannelEnabled;
                chan.CalibrationSettings.CenterValue = channelControls[i].Calibration_center;
                chan.CalibrationSettings.MaxDeviation = channelControls[i].Calibration_maxDeviation;

                sets.ChannelSettings.Add(chan);
            }
            sets.PwmFrequency = pwmFrequency;

            return sets;
        }