private void LoadGNSSData(UDP Ethernet) { Ethernet.GNSSActions.Add((GNSS) => { this.GNSSData = GNSS; this.NewGNSSData = true; }); }
public UDP() { this.Client = new UdpClient(PORT); this.RemoteEndPoint = new IPEndPoint(IPAddress.Any, PORT); this.ImuActions = new List <Action <InertialMeasurementUnit> >(); this.CustomerActions = new List <Action <IMUCustomer> >(); this.ProximityActions = new List <Action <ProximitySensor> >(); this.AltimeterActions = new List <Action <Altimeter> >(); this.FFTActions = new List <Action <FFT> >(); this.GNSSActions = new List <Action <GNSS> >(); this.t = 0; this.messageReceived = false; this.DebugImu = new InertialMeasurementUnit(); this.Customer = new IMUCustomer(); this.ProximitySensor = new ProximitySensor(); this.AltimeterSensor = new Altimeter(); this.fft = new FFT(); this.Gnss = new GNSS(); }
public MainView() { InitializeComponent(); this.ImuDebugData = new InertialMeasurementUnit(); this.CustomerIMU = new IMUCustomer(); this.Altimeter = new Altimeter(); this.Ethernet = new UDP(); this.FFTData = new FFT(); this.GNSSData = new GNSS(); this.NewDebugImuData = false; this.NewCustomerData = false; this.NewProximitySensorData = false; this.NewAltimeterData = false; this.NewFFTData = false; counter = 0; loadDebugIMU(this.Ethernet); loadCustomerData(this.Ethernet); LoadProximitySensor(this.Ethernet); LoadAltimeterData(this.Ethernet); LoadFFTData(this.Ethernet); LoadGNSSData(this.Ethernet); this.EthernetRecvThread = new Thread(this.Ethernet.Start); this.EthernetRecvThread.IsBackground = true; this.EthernetRecvThread.Start(); DataFpsTimer.Interval = 500; DataFpsTimer.Tick += new EventHandler(dataFpsTick); GraphsFpsTimer.Interval = 1; GraphsFpsTimer.Tick += new EventHandler(graphFpsTick); GraphsFpsTimer.Start(); DataFpsTimer.Start(); this.fftChart.ChartAreas["ChartArea1"].AxisX.Maximum = this.FFTData.N; CreateMap(); }