private async void btnInitialize_Click(object sender, RoutedEventArgs e) { if (LightningProvider.IsLightningEnabled) { LowLevelDevicesController.DefaultProvider = LightningProvider.GetAggregateProvider(); } gpioController = await GpioController.GetDefaultAsync(); if (gpioController == null) { return; } pwmControllers = await PwmController.GetControllersAsync(LightningPwmProvider.GetPwmProvider()); if (pwmControllers == null) { return; } LeftMotor = new MotorControl(gpioController, pwmControllers[1]); LeftMotor.Initialize(LEFTINA, LEFTINB, LEFTPWM); RightMotor = new MotorControl(gpioController, pwmControllers[1]); RightMotor.Initialize(RIGHTINA, RIGHTINB, RIGHTPWM); }
public CameraViewModel(IMotorControl motorControl,IHornControl hornControl,IBrakeControl brakeControl) { _hornControl = hornControl; _motorControl = motorControl; _brakeControl = brakeControl; SpeedFeedback.PropertyChanged += (s,e) => { RaisePropertyChanged("speed");}; DirectionFeedback.PropertyChanged += (s, e) => { RaisePropertyChanged("direction_angle"); }; motorKeys = new List<Key>() {Key.W,Key.A,Key.S,Key.D}; }
public CameraViewModel(IMotorControl motorControl, IHornControl hornControl, IBrakeControl brakeControl) { _hornControl = hornControl; _motorControl = motorControl; _brakeControl = brakeControl; SpeedFeedback.PropertyChanged += (s, e) => { RaisePropertyChanged("speed"); }; DirectionFeedback.PropertyChanged += (s, e) => { RaisePropertyChanged("direction_angle"); }; motorKeys = new List <Key>() { Key.W, Key.A, Key.S, Key.D }; }
public MotorDriveCommand(IMotorControl drivable) { _drivable = drivable; }
public SpeechInterpretation(IMotorControl motorControl,IHeadlightControl headlightControl,IHornControl hornControl) { _motorControl = motorControl; _headlightControl = headlightControl; _hornControl = hornControl; }
public SpeechInterpretation(IMotorControl motorControl, IHeadlightControl headlightControl, IHornControl hornControl) { _motorControl = motorControl; _headlightControl = headlightControl; _hornControl = hornControl; }
void Start() { controller = MotorController.GetInstance(); }