private async void Page_Loaded(object sender, RoutedEventArgs e) { Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); ParametresPortSerie parametresGps = new ParametresPortSerie("", @"\\?\ACPI#BCM2837#4#", 9600, SerialParity.None, SerialStopBitCount.One, 8, SerialHandshake.None, 100, 0); _gps = new GpsNMEA(parametresGps, true, 1024); InfosGpsCTRL.DataContext = new GpsNMEAVM(_gps); GpioController gpc = GpioController.GetDefault(); GpioPin ledOccupe = gpc?.OpenPin(24); try { _appareilPhoto = new AppareilPhotoGps(ledOccupe, _gps); if (await _appareilPhoto.Initialiser(1280, 960, "MJPG")) { PrendrePhotoBTN.Visibility = Visibility.Visible; if (gpc != null) { _poussoirDecl = gpc.OpenPin(18); _poussoirDecl.SetDriveMode(GpioPinDriveMode.InputPullUp); _poussoirDecl.DebounceTimeout = new TimeSpan(0, 0, 0, 0, 5); _poussoirDecl.ValueChanged += _poussoirDecl_ValueChanged; _ledEnMarche = gpc.OpenPin(23); _ledEnMarche.SetDriveMode(GpioPinDriveMode.Output); _ledEnMarche.Write(GpioPinValue.High); } } } finally { PeripheriqueSerie.PeripheriquesSerie.DemarrerSurveillance(); } }
private void Page_Loaded(object sender, RoutedEventArgs e) { ParametresPortSerie parametresLecteur = new ParametresPortSerie("SCAN_ROUGE", @"\\?\FTDIBUS#VID_0403+PID_6001+COM5A#", 9600, SerialParity.None, SerialStopBitCount.One, 8, SerialHandshake.None, 100, 0); LecteurCodeBarres lecteur = new LecteurCodeBarres(parametresLecteur, true, 32); LecteurCodeBarresAPB.DataContext = new PeripheriqueSerieVM(lecteur); lecteur.SurCodeBarresRecu += Lecteur_SurCodeBarresRecu;; PeripheriqueSerie.PeripheriquesSerie.DemarrerSurveillance(); }
private void InitTeleInformation() { //ParametresPortSerie parametres = new ParametresPortSerie("FT230X Basic UART", @"\\?\FTDIBUS#VID_0403+PID_6015+DA00OGRPA#", 1200, SerialParity.Even, SerialStopBitCount.One, 7, SerialHandshake.None, 800, 0); ParametresPortSerie parametres = new ParametresPortSerie("", @"\\?\ACPI#BCM2837#4#", 1200, SerialParity.Even, SerialStopBitCount.One, 7, SerialHandshake.None, 800, 0); // Pi2 //ParametresPortSerie parametres = new ParametresPortSerie("", @"\\?\ACPI#BCM2836#0#", 1200, SerialParity.Even, SerialStopBitCount.One, 7, SerialHandshake.None, 800, 0); // Pi3 _teleInfo = new TeleInformation(parametres, true, 160); TeleInfoSPL.DataContext = new TeleInformationVM(_teleInfo); PeripheriqueSerie.PeripheriquesSerie.DemarrerSurveillance(); }
private void Page_Loaded(object sender, RoutedEventArgs e) { Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); _mainPageInstance = this; ParametresPortSerie parametres = ParametresPortSerie.CreerPourUARTGpioPi(NADHAT_BAUD_RATE, SerialParity.None, SerialStopBitCount.One, 8, SerialHandshake.None, 100, 0); _nadHat = new NADHat(parametres, true, 1024); _nadHatViewModel = new NADHatVM(_nadHat); MainFRM.Navigate(typeof(HistoriqueSmsPAGE), _nadHatViewModel); MainPageGRD.DataContext = _nadHatViewModel; _nadHatViewModel.SurRepondreSms += _nadHatViewModel_SurRepondreSms; _nadHat.SurReceptionNotificationSynchroNtp += _nadHat_SurSynchronisationNtp; PeripheriqueSerie.PeripheriquesSerie.SurEnumerationTerminee += PeripheriquesSerie_SurEnumerationTerminee; PeripheriqueSerie.PeripheriquesSerie.DemarrerSurveillance(); }
private async void Page_Loaded(object sender, RoutedEventArgs e) { Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); ParametresPortSerie parametresLecteur = new ParametresPortSerie("SCAN_ROUGE", @"\\?\FTDIBUS#VID_0403+PID_6001+COM5A#", 9600, SerialParity.None, SerialStopBitCount.One, 8, SerialHandshake.None, 100, 0); LecteurCodeBarres lecteur = new LecteurCodeBarres(parametresLecteur, true, 32); LecteurCodeBarresAPB.DataContext = new PeripheriqueSerieVM(lecteur); lecteur.SurCodeBarresRecu += Lecteur_SurCodeBarresRecu; ListeProduitsLVW.DataContext = new ListeProduitsVM(ListeProduits.instance); FiltreeAPB.DataContext = ListeProduitsLVW.DataContext; ParametresPortSerie parametresImprimante = new ParametresPortSerie("", @"\\?\ACPI#BCM2837#4#", 19200, SerialParity.None, SerialStopBitCount.One, 8, SerialHandshake.None, 0, 0); _imprimante = new ImprimanteSerie(parametresImprimante, true, 0); ImprimanteAPB.DataContext = new PeripheriqueSerieVM(_imprimante); await ListeProduits.instance.Charger(); PeripheriqueSerie.PeripheriquesSerie.DemarrerSurveillance(); }
public TeleInformation(ParametresPortSerie parametres, bool autoOuvrir, uint nbMaxOctetsALire) : base(parametres, autoOuvrir, nbMaxOctetsALire) { }
public NADHat(ParametresPortSerie parametres, bool autoOuvrir, uint nbMaxOctetsALire) : base(parametres, autoOuvrir, nbMaxOctetsALire) { }