Exemplo n.º 1
0
        public async void CloseSerialPort()
        {
            await TelemetryLink.CloseAsync();

            ConnectMessage = "Connect";
            OpenSerialPortCommand.RaiseCanExecuteChanged();
            GetWaypointsCommand.RaiseCanExecuteChanged();
        }
Exemplo n.º 2
0
        public async void OpenSerialPort()
        {
            SelectedPort.BaudRate = 57600;
            await TelemetryLink.OpenAsync(SelectedPort);

            ConnectMessage = "Disconnect";
            OpenSerialPortCommand.RaiseCanExecuteChanged();
            GetWaypointsCommand.RaiseCanExecuteChanged();
        }
 public void RefreshUI()
 {
     OpenSerialPortCommand.RaiseCanExecuteChanged();
     ShowMissionPlannerCommand.RaiseCanExecuteChanged();
     StartDataStreamsCommand.RaiseCanExecuteChanged();
     StopDataStreamsCommand.RaiseCanExecuteChanged();
     BeginCalibrationCommand.RaiseCanExecuteChanged();
     FlyNowCommand.RaiseCanExecuteChanged();
     MotorTestCommand.RaiseCanExecuteChanged();
 }
Exemplo n.º 4
0
        public override void InitializePlugin(IPoderosaWorld poderosa) {
            base.InitializePlugin(poderosa);
            _instance = this;

            _stringResource = new StringResource("Poderosa.SerialPort.strings", typeof(SerialPortPlugin).Assembly);
            poderosa.Culture.AddChangeListener(_stringResource);
            IPluginManager pm = poderosa.PluginManager;
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            IExtensionPoint pt = _coreServices.SerializerExtensionPoint;
            pt.RegisterExtension(new SerialTerminalParamSerializer());
            pt.RegisterExtension(new SerialTerminalSettingsSerializer());

            _openSerialPortCommand = new OpenSerialPortCommand();
            _coreServices.CommandManager.Register(_openSerialPortCommand);

            pm.FindExtensionPoint("org.poderosa.menu.file").RegisterExtension(new SerialPortMenuGroup());
            pm.FindExtensionPoint("org.poderosa.core.window.toolbar").RegisterExtension(new SerialPortToolBarComponent());
            pm.FindExtensionPoint("org.poderosa.termianlsessions.terminalConnectionFactory").RegisterExtension(new SerialConnectionFactory());

        }
Exemplo n.º 5
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            _stringResource = new StringResource("Poderosa.SerialPort.strings", typeof(SerialPortPlugin).Assembly);
            poderosa.Culture.AddChangeListener(_stringResource);
            IPluginManager pm = poderosa.PluginManager;

            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            IExtensionPoint pt = _coreServices.SerializerExtensionPoint;

            pt.RegisterExtension(new SerialTerminalParamSerializer());
            pt.RegisterExtension(new SerialTerminalSettingsSerializer());

            _openSerialPortCommand = new OpenSerialPortCommand();
            _coreServices.CommandManager.Register(_openSerialPortCommand);

            pm.FindExtensionPoint("org.poderosa.menu.file").RegisterExtension(new SerialPortMenuGroup());
            pm.FindExtensionPoint("org.poderosa.core.window.toolbar").RegisterExtension(new SerialPortToolBarComponent());
            pm.FindExtensionPoint("org.poderosa.termianlsessions.terminalConnectionFactory").RegisterExtension(new SerialConnectionFactory());
        }