/// <summary> /// Default constructor /// </summary> /// <param name="machineID">The unique id for this machine</param> /// <param name="clawServo">The servo connected to the claw</param> /// <param name="motorX">TicMotor for handling the x axis of the claw</param> /// <param name="motorY">TicMotor for handling the y axis of the claw</param> /// <param name="winchMotor">TicMotor for handling the winch</param> /// <param name="webcamName">The unique ID that points to the webcam</param> /// <remarks>x and y axis are from the top down view</remarks> public ClawMachine(string machineID, Servo clawServo, TicMotor motorX, TicMotor motorY, TicMotor winchMotor, string webcamName) : base(machineID) { this.clawServo = clawServo; this.xMotor = motorX; this.yMotor = motorY; this.winchMotor = winchMotor; this.webcamName = webcamName; }
/// <summary> /// Default constructor /// </summary> /// <param name="machineID">The unique ID assigned to this machine</param> /// <param name="cannonMotor">The motor that controls the power of the cannon</param> /// <param name="xMotor">The motor that controlls the xy axis of the cannon</param> /// <param name="aimingServo">The servo used for aiming the cannon</param> /// <param name="firingServo">The servo used for pushing the ammo into the motor to be fired</param> public MilkBottle(string machineID, BrushedDCMotor cannonMotor, TicMotor xMotor, Servo aimingServo, Servo firingServo) : base(machineID) { this.fireMotor = cannonMotor; this.xMotor = xMotor; this.aimServo = aimingServo; this.fireServo = firingServo; this.fireMotor.SetSpeed((int)BrushedDCMotor.CONSTANTS.MAX_SPEED); }
private string webcamName; // might need to be an int or called webcamID #region TestCode #if DEBUG /// <summary> /// Test code, used for testing the gRPC connection, allows the claw machine to be created without any parameters /// </summary> /// <param name="machineID">Unique machine id</param> public ClawMachine(string machineID) : base(machineID) { this.clawServo = new Servo(new Maestro(""), 0); this.xMotor = new TicMotor(); this.yMotor = new TicMotor(); this.winchMotor = new TicMotor(); this.webcamName = ""; }
/// <summary> /// /// </summary> /// <param name="machineID"></param> /// <param name="cannonMotor"></param> /// <param name="aimServo"></param> /// <param name="fireServo"></param> /// <param name="xMotor"></param> public SkeeBall(string machineID, BrushedDCMotor cannonMotor, Servo aimServo, Servo fireServo, TicMotor xMotor) : base(machineID) { this.cannonMotor = cannonMotor; this.aimServo = aimServo; this.xMotor = xMotor; this.fireServo = fireServo; this.cannonMotor.SetSpeed((int)BrushedDCMotor.CONSTANTS.MAX_SPEED); }