public MoCoBusProtocolService(IMoCoBusCommService commService, byte address)
 {
     Main = new MoCoBusProtocolMainService(commService, address);
     Camera = new MoCoBusProtocolCameraService(commService, address);
     MotorSlider = new MoCoBusProtocolMotorService(commService, address, 1);
     MotorPan = new MoCoBusProtocolMotorService(commService, address, 2);
     MotorTilt = new MoCoBusProtocolMotorService(commService, address, 3);
 }
Пример #2
0
        public DeviceViewModel(IDispatcherHelper dispatcherHelper, 
                               INavigationService navigationService, 
                               IDevice device, 
                               Func<IDevice, IMoCoBusCommService> moCoBusCommServiceFactory, 
                               Func<IMoCoBusCommService, byte, IMoCoBusProtocolService> moCoBusProtocolServiceFactory)
        {
            _dispatcherHelper = dispatcherHelper;
            _navigationService = navigationService;

            _commService = moCoBusCommServiceFactory(device);
            _commService.ConnectionChanged += CommServiceOnConnectionChanged;

            _protocolService = moCoBusProtocolServiceFactory(_commService, 3);

            ModeAstroViewModel = new ModeAstroViewModel(_dispatcherHelper, this, _protocolService);
            ModePanoViewModel = new ModePanoViewModel(_dispatcherHelper, this, _protocolService);
            ModeSmsViewModel = new ModeSmsViewModel(_dispatcherHelper, this, _protocolService);

            JoystickViewModel = new JoystickViewModel(this, _protocolService);
        }
 public MoCoBusProtocolCameraService(IMoCoBusCommService commService, byte address)
 {
     _commService = commService;
     _address = address;
 }
 public MoCoBusProtocolMotorService(IMoCoBusCommService commService, byte address, byte motor)
 {
     _commService = commService;
     _address = address;
     _motor = motor;
 }