Esempio n. 1
0
        /// <summary>
        /// 各モードに応じて、クローズ
        /// </summary>
        public void Close()
        {
            if (null != urgLog)
            {
                urgLog.CloseFile();
                urgLog = null;
            }

            if (null != stream)
            {
                try
                {
                    write(stream, SCIP_Writer.QT()); // stop measurement mode
                    read_line(stream);               // ignore echo back

                    stream.Close();
                    urg.Close();

                    stream = null;
                }
                catch
                {
                }
            }
        }
Esempio n. 2
0
 /// <summary>
 /// ログファイルモードで オープン
 /// </summary>
 /// <param name="fname"></param>
 /// <returns></returns>
 public bool LogFileOpen(string fname)
 {
     urgLog = new URGLogRead();
     return urgLog.OpenFile(fname);
 }
Esempio n. 3
0
        /// <summary>
        /// 各モードに応じて、クローズ
        /// </summary>
        public void Close()
        {
            if (null != urgLog)
            {
                urgLog.CloseFile();
                urgLog = null;
            }

            if (null != stream)
            {
                try
                {
                    write(stream, SCIP_Writer.QT());    // stop measurement mode
                    read_line(stream); // ignore echo back

                    stream.Close();
                    urg.Close();

                    stream = null;
                }
                catch
                {
                }
            }
        }
        /// <summary>
        /// LRF Logファイル読み込み
        /// </summary>
        /// <param name="fname"></param>
        private void LoadLRFLogFile(string fname)
        {
            if (null != UrgLogReader)
            {
                UrgLogReader.CloseFile();
                UrgLogReader = null;
            }

            try
            {
                UrgLogReader = new URGLogRead();
                UrgLogReader.OpenFile(fname);
                maxLRFIdx = UrgLogReader.getNumMD() - 1;
            }
            catch (Exception exp)
            {
                MessageBox.Show(exp.Message, "Load Fail " + fname);
            }

            Application.DoEvents();

            // ファイル名、データ量反映
            parentForm.LRF_LogFileName = fname;
            parentForm.tb_MapFileName.Text = fname;
            tb_LogFileName.Text = fname;
            lbl_NumFrame.Text = maxLRFIdx.ToString();

            sb_LRFTime.Minimum = 0;
            sb_LRFTime.Maximum = (int)maxLRFIdx;
            num_LRFTime.Maximum = maxLRFIdx;

            if (skipLrfIDX > 0)
            {
                Lbl_NumLayer.Text = "Layer数:" + (maxLRFIdx / skipLrfIDX).ToString();
            }

            UpdateLRFPicBox(0);
        }
Esempio n. 5
0
 /// <summary>
 /// ログファイルモードで オープン
 /// </summary>
 /// <param name="fname"></param>
 /// <returns></returns>
 public bool LogFileOpen(string fname,int skipNum=4)
 {
     urgLog = new URGLogRead();
     urgLog.SetSkipNum(skipNum);
     return urgLog.OpenFile(fname);
 }
Esempio n. 6
0
 /// <summary>
 /// ログファイルモードで オープン
 /// </summary>
 /// <param name="fname"></param>
 /// <returns></returns>
 public bool LogFileOpen(string fname)
 {
     urgLog = new URGLogRead();
     return(urgLog.OpenFile(fname));
 }
Esempio n. 7
0
 /// <summary>
 /// スケール値セット
 /// </summary>
 /// <param name="val"></param>
 public static void setScale(double val)
 {
     LRF_Scale = val;
     SCIP_Reader.SetScale(val);
     URGLogRead.SetScale(val);
 }