/// <summary> /// Constructor /// </summary> /// <param name="type">type of victor</param> /// <param name="channel">pwm channel the victor is plugged into</param> /// <param name="commonName">CommonName the component will have</param> /// <param name="isReversed">if the controller output should be reversed</param> public VictorItem(VictorType type, int channel, string commonName, bool isReversed = false) { VictorType = type; if (type == VictorType.Sp) { victor = new VictorSP(channel); } else { victor = new Victor(channel); } Name = commonName; IsReversed = isReversed; }
/// <summary> /// Constructor /// </summary> /// <param name="type">type of victor</param> /// <param name="channel">pwm channel the victor is plugged into</param> /// <param name="commonName">CommonName the component will have</param> /// <param name="side">side of the drive train the cotnroller is on</param> /// <param name="isReversed">if the controller output should be reversed</param> public VictorItem(VictorType type, int channel, string commonName, Side side, bool isReversed = false) { VictorType = type; if (type == VictorType.Sp) { victor = new VictorSP(channel); } else { victor = new Victor(channel); } Name = commonName; IsReversed = isReversed; IsDrivetrainMotor = true; DriveSide = side; }