Example #1
0
        /// <summary>
        /// 自律走行モード
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cb_Autonomous_CheckedChanged(object sender, EventArgs e)
        {
            if (cb_StartAutonomous.Checked)
            {
                LocPreSumpSystem LocSys = BrainCtrl.LocSys;

                // 現在座標から開始

                // 開始時のリセット
                LocSys.SetStartPostion((int)(LocSys.R1.X + 0.5),
                                       (int)(LocSys.R1.Y + 0.5),
                                       LocSys.R1.Theta);

                // GPS情報があれば GPSの初期値をセット
                if (CersioCt.bhwGPS)
                {
                    // 起点情報をセット
                    LocPreSumpSystem.Set_GPSStart(CersioCt.hwGPS_LandX,
                                                  CersioCt.hwGPS_LandY,
                                                  (int)(LocSys.R1.X + 0.5),
                                                  (int)(LocSys.R1.Y + 0.5));
                }

                bRunAutonomous = true;
                cb_StartAutonomous.BackColor = Color.LimeGreen;
            }
            else
            {
                // 停止
                bRunAutonomous = false;

                CersioCt.SendCommand_Stop();
                cb_StartAutonomous.BackColor = SystemColors.Window;
            }
        }
        /// <summary>
        /// 自律走行モード
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cb_Autonomous_CheckedChanged(object sender, EventArgs e)
        {
            if (cb_StartAutonomous.Checked)
            {
                LocationSystem LocSys = BrainCtrl.LocSys;

                bRunAutonomous = true;
                cb_StartAutonomous.BackColor = Color.LimeGreen;
            }
            else
            {
                // 停止
                bRunAutonomous = false;

                CersioCt.SendCommand_Stop();
                cb_StartAutonomous.BackColor = SystemColors.Window;
            }
        }