public async void CloseSerialPort() { await TelemetryLink.CloseAsync(); ConnectMessage = "Connect"; OpenSerialPortCommand.RaiseCanExecuteChanged(); GetWaypointsCommand.RaiseCanExecuteChanged(); }
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(); }
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()); }