Пример #1
0
 /// <summary>
 ///     Slave Constructor
 /// </summary>
 /// <param name="channel">channel/address of the talon</param>
 /// <param name="commonName">CommonName the component will have</param>
 /// <param name="master">master talon (this is the slave)</param>
 /// <param name="isReversed">if the controller output should be reversed</param>
 public CanTalonItem(int channel, string commonName, CanTalonItem master, bool isReversed = false)
 {
     talon      = new CANTalon(channel);
     Name       = commonName;
     IsReversed = isReversed;
     talon.ReverseOutput(isReversed);
     Slave = true;
     talon.MotorControlMode = ControlMode.Follower;
     master.AddSlave(this);
     this.master = master.Name;
 }
Пример #2
0
 /// <summary>
 ///     Adds a slave to this controller
 /// </summary>
 /// <param name="slave"></param>
 public void AddSlave(CanTalonItem slave) => slaves.Add(slave);