Beispiel #1
0
        private void controlOpen_Click(object sender, EventArgs e)
        {
            Class.TH_SendCommand.TH_data.PortName = this.controlPortName.Text;

            try { Class.TH_SendCommand.TH_data.BaudRate = int.Parse(this.controlBaudRate.Text); } catch { MessageBox.Show("BaudRate Error"); }

            if (!TH_command.Open(true))
            {
                MessageBox.Show("Open CON Error"); return;
            }

            ReceiveSonic = true;
            this.ReceiveSonicData.Text = "Stop Sonic Data";
            TH_command.StopSendCommand_Sonic_0x86();
        }
Beispiel #2
0
        ////////////////////////////////////////// private method ///////////////////////////////////////////////

        private void GetSonicData(TH_SendCommand TH_command)
        {
            while (!TH_command.MeasureUltraSonic_0x86())
            {
                ;
            }
            TH_command.StopSendCommand_Sonic_0x86();

            currPoint.UltraSonicL = TH_SendCommand.TH_data.Tail_L_Y;
            currPoint.UltraSonicR = TH_SendCommand.TH_data.Tail_R_Y;
        }