public MainWindow() { InitializeComponent(); CFSPortSelector.Init(); DrawSerialGraph.Init(); this.Closing += new CancelEventHandler(CloseEvent); }
private void CFSConnectButton_Click(object sender, RoutedEventArgs e) { if (!CFSPortSelector.IsComboBoxItemConnected()) { DrawSerialGraph.LinkingRegister2Graph(0x00, 0, "Fx", "red"); DrawSerialGraph.LinkingRegister2Graph(0x01, 0, "Fy", "blue"); DrawSerialGraph.LinkingRegister2Graph(0x02, 0, "Fz", "green"); DrawSerialGraph.LinkingRegister2Graph(0x03, 1, "Mx", "red"); DrawSerialGraph.LinkingRegister2Graph(0x04, 1, "My", "blue"); DrawSerialGraph.LinkingRegister2Graph(0x05, 1, "Mz", "green"); DrawSerialGraph.AddSerialDevice(CFSPortComboBox.Text); } else { DrawSerialGraph.RemoveSerialDevice(CFSPortComboBox.Text); } }
private void OffseetButton_Click(object sender, RoutedEventArgs e) { DrawSerialGraph.CFSOffset(); }
private void LogStartButton_Click(object sender, RoutedEventArgs e) { DrawSerialGraph.ResetFrameCounter(); DumpDataToExcel.StartLog(); }