示例#1
0
    public IEncoders viewIEncoders()
    {
        global::System.IntPtr cPtr = yarpPINVOKE.PolyDriver_viewIEncoders(swigCPtr);
        IEncoders             ret  = (cPtr == global::System.IntPtr.Zero) ? null : new IEncoders(cPtr, false);

        return(ret);
    }
 public PowerViewModel(ILidarDistance lidar, IWheel wheel, IEncoders encoders, IUltrasonic ultrasonic)
 {
     Lidar      = lidar;
     Wheel      = wheel;
     Encoders   = encoders;
     Ultrasonic = ultrasonic;
 }
示例#3
0
 public EquipmentOverviewViewModel(IUltrasonic ultrasonic, ILidarDistance lidar, IWheel wheel, IEncoders encoders, ExampleLogicService exampleLogic, StudentLogicService studentLogic)
 {
     Ultrasonic   = ultrasonic;
     Lidar        = lidar;
     Wheel        = wheel;
     Encoders     = encoders;
     ExampleLogic = exampleLogic;
     StudentLogic = studentLogic;
 }
示例#4
0
 public ShellViewModel(INavigationService navigationServiceInstance, ILidarDistance lidar, IUltrasonic ultrasonic, IWheel wheel, IEncoders encoders, ExampleLogicService exampleLogic, StudentLogicService studentLogic)
 {
     _navigationService = navigationServiceInstance;
     Lidar              = lidar;
     Ultrasonic         = ultrasonic;
     Wheel              = wheel;
     Encoders           = encoders;
     ExampleLogic       = exampleLogic;
     StudentLogic       = studentLogic;
     ItemInvokedCommand = new DelegateCommand <WinUI.NavigationViewItemInvokedEventArgs>(OnItemInvoked);
 }
示例#5
0
        public RequestHandler(IWheel wheel, IUltrasonic ultrasonic, ILidarDistance lidar, IEncoders encoders, ExampleLogicService exampleLogicService, StudentLogicService studentLogicService)
        {
            _wheel               = wheel;
            _ultrasonic          = ultrasonic;
            _lidar               = lidar;
            _encoders            = encoders;
            _exampleLogic        = exampleLogicService;
            _studentLogicService = studentLogicService;

            _lastActiveLogic = LastActiveLogicType.None;
        }
示例#6
0
        public Distance(IWheel wheels, IEncoders encoders) : base(wheels)
        {
            Details = new StudentLogicDescription
            {
                Title  = "Encoder  ",
                Author = "BO19E-15",

                Description = "Simple encoder control using if-statement"
            };
            this._wheels   = wheels;
            this._encoders = encoders;
        }
        // Any inteface/class registered as a container may be added to the constructor without any further actions
        public ExampleLogicService(IWheel wheels, IEncoders encoders, ILidarDistance lidar, IUltrasonic ultrasonic)
        {
            ExampleLogics = new ObservableCollection <ExampleLogicBase>
            {
                // Child classes instatiated in the ExampleLogics collection will automatically appear in the GUI
                // Pass the sensors to be used as arguments (the ones specified in the constructor of the child class).
                new DriveToLargestDistance(wheels, lidar, ultrasonic),
                new TurnToLargestDistance(wheels, lidar),
                new CrossConnectedProportionalFeedback(wheels, ultrasonic)
            };

            ActiveExampleLogic = ExampleLogics.FirstOrDefault();
        }
        public WallAndBack(IWheel wheel, IEncoders encoders, IUltrasonic ultrasonic) : base(wheel)
        {
            Details = new StudentLogicDescription
            {
                Title  = "Ultrasonic and Encoder  ",
                Author = "BO19E-15",

                Description = "Simple control logic using encoder and ultrasonic" +
                              "\n Drive to a wall, turn around and drive back"
            };
            this._wheel      = wheel;
            this._encoders   = encoders;
            this._ultrasonic = ultrasonic;
        }
        public Student2B(IWheel wheel, IEncoders encoders, ILidarDistance lidar, IUltrasonic ultrasonic) : base(wheel)
        {
            Details = new StudentLogicDescription
            {
                Title       = "Empty logic for Student 2 (B)",
                Author      = "Student 2",
                Description = "This program is empty.\n" +
                              "Write your control logic in the looping Run() method.\n" +
                              "(And change Title, Author and Description).\n" +
                              $"All this is done in the {nameof(Student2B)}.cs file."
            };

            _wheels     = wheel;
            _lidar      = lidar;
            _ultrasonic = ultrasonic;
            _encoders   = encoders;
        }
示例#10
0
        // Any inteface/class registered as a container may be added to the constructor without any further actions
        public StudentLogicService(IWheel wheels, IEncoders encoders, ILidarDistance lidar, IUltrasonic ultrasonic)
        {
            StudentLogics = new ObservableCollection <StudentLogicBase>
            {
                // Child classes instatiated in the StudentLogics collection will automatically appear in the GUI
                // Pass the sensors to be used as arguments (the ones specified in the constructor of the child class).

                new Student1A(wheels, encoders, lidar, ultrasonic),
                new Student1B(wheels, encoders, lidar, ultrasonic),
                new Student2A(wheels, encoders, lidar, ultrasonic),
                new Student2B(wheels, encoders, lidar, ultrasonic),
                new Student3A(wheels, encoders, lidar, ultrasonic),
                new Student3B(wheels, encoders, lidar, ultrasonic),
                new SteerBlindlyToLargestDistance(wheels, lidar),
                new ForeverLoop(wheels),
                new Distance(wheels, encoders),
                new WallAndBack(wheels, encoders, ultrasonic)
            };

            ActiveStudentLogic = StudentLogics.FirstOrDefault();
        }
示例#11
0
 public SocketServer(IWheel wheel, IUltrasonic ultrasonic, ILidarDistance lidar, IEncoders encoders, ExampleLogicService exampleLogicService, StudentLogicService studentLogicService)
 {
     _requestHandler = new RequestHandler(wheel, ultrasonic, lidar, encoders, exampleLogicService, studentLogicService);
     _wheel          = wheel;
     Error           = new Error();
     PortNumber      = "51915";
 }
示例#12
0
 internal static HandleRef getCPtr(IEncoders obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
 public WheelsViewModel(IWheel wheel, IEncoders encoders)
 {
     Wheel          = wheel;
     Encoders       = encoders;
     UpdateInterval = 300;
 }
示例#14
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(IEncoders obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }