private void Button_Click(object sender, RoutedEventArgs e) { if (ConnectorOne.imuConnectionEnabler()) { this.imuEnabler(); } }
private void roverVisualizationSyncronizerThreadFunction() { string datas; while (true) { datas = ConnectorOne.getImuData(); try { string[] words = datas.Split(','); this.rvr_mdl_ht.Dispatcher.Invoke((Action)(() => { this.rtn_x.Angle = Convert.ToDouble(words[0]); this.rtn_y.Angle = Convert.ToDouble(words[1]); this.rtn_z.Angle = Convert.ToDouble(words[2]); })); } catch (Exception ex) { } } }