Beispiel #1
0
 public wizerd(MainPanel sender)
 {
     InitializeComponent();
     mother = sender;
     set_wizerd(mother.Calibration_Status_Main, mother.Fusion_Values_Main, mother.MRFT_Values_Main, mother.PID_Values_Main);
     initialize_labels_TextBoxes();
 }
Beispiel #2
0
 public Settings(MainPanel sender)
 {
     InitializeComponent();
     initialize_arrays();
     mother = sender;
     set_Settings(mother.Calibration_Status_Main, mother.Fusion_Values_Main, mother.MRFT_Values_Main, mother.PID_Values_Main);
 }
Beispiel #3
0
 private void cmd_open_Click(object sender, EventArgs e)
 {
     if (combo_ports.Items.Count > 0)
     {
         //TODO: This leads to incomplete termination of the program
         MainPanel chasecar_panel;
         chasecar_panel = new MainPanel(this.combo_ports.Text, this.combo_ports2.Text);
         this.Hide();
         chasecar_panel.Show();
     }
 }
 public serial_driver(String port_name, MainPanel panel_form, Profiler probe_profiler_para, stream_source stream_source_para)
 {
     main_form = panel_form;
     data_stream = new SerialPort(port_name, 115200, Parity.None, 8, StopBits.One);
     data_stream.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler);
     data_stream.ReceivedBytesThreshold = 1;
     data_stream.Open();
     data_stream.DtrEnable = true;
     data_stream.DtrEnable = false;
     data_stream.DiscardInBuffer();
     data_stream.DiscardOutBuffer();
     frame_prop packet_config;
     packet_config.padding_len = 3;
     packet_config.padding_byte = new byte[3] { 0xFF, 0x00, 0xAA };
     packet_config.pad_EOH = 0xFF;
     packet_config.pad_EOP = 0xFF;
     packet_config.header_len = 2;
     packet_config.crc_len = 2;
     parser = new Serial_parser(packet_config, main_form, probe_profiler_para, stream_source_para);
 }
 public Serial_parser(frame_prop frame_prop_para,MainPanel main_panel_instance_para,
     Profiler probe_profiler_para,stream_source stream_source_para)
 {
     packet_config = frame_prop_para;
     main_panel_instance = main_panel_instance_para;
     probe_profiler = probe_profiler_para;
 }