|
@@ -25,7 +25,7 @@ namespace UnNomalized_node
|
|
|
private FormArrow m_form_arrow = new FormArrow();
|
|
|
Thread m_freash_arrow_thread = null;
|
|
|
bool m_bexit = false;
|
|
|
- System.Windows.Forms.Timer m_timer = new System.Windows.Forms.Timer();
|
|
|
+ //System.Windows.Forms.Timer m_timer = new System.Windows.Forms.Timer();
|
|
|
|
|
|
public Form1()
|
|
|
{
|
|
@@ -77,12 +77,12 @@ namespace UnNomalized_node
|
|
|
m_freash_arrow_thread = new Thread(fresh_image);
|
|
|
m_freash_arrow_thread.Start();
|
|
|
|
|
|
- m_timer.Tick += new EventHandler(HandleTime);
|
|
|
+ /*m_timer.Tick += new EventHandler(HandleTime);
|
|
|
//使timer可用
|
|
|
m_timer.Enabled = true;
|
|
|
//设置时间间隔,以毫秒为单位
|
|
|
m_timer.Interval = 100;//1s
|
|
|
- m_timer.Start();
|
|
|
+ m_timer.Start();*/
|
|
|
|
|
|
|
|
|
//this.Size = new System.Drawing.Size(1920, 1080);
|
|
@@ -98,70 +98,59 @@ namespace UnNomalized_node
|
|
|
}
|
|
|
public void fresh_image()
|
|
|
{
|
|
|
- return;
|
|
|
- /*while (m_bexit == false)
|
|
|
+ while (m_bexit == false)
|
|
|
{
|
|
|
- Bitmap image= m_hk_camera.Camera.get_bitmap();
|
|
|
- if (image != null)
|
|
|
- {
|
|
|
- this.Invoke(new Action(() =>
|
|
|
- {
|
|
|
-
|
|
|
- if (pictureBox_camera.Image != null)
|
|
|
- pictureBox_camera.Image.Dispose();
|
|
|
- pictureBox_camera.Image = image;
|
|
|
+ //m_hk_camera.Camera.draw_image_to_wnd(pictureBox_camera.Handle);
|
|
|
+ //跟新led
|
|
|
+ update_led_screen();
|
|
|
|
|
|
- }));
|
|
|
- // image.Dispose();
|
|
|
+ //跟新投影仪界面车辆信息
|
|
|
+ string car_number_str = "";
|
|
|
+ if (communication_data.Instance.car_license.IsTimeout() == false)
|
|
|
+ {
|
|
|
+ car_number_str = communication_data.Instance.car_license.Value;
|
|
|
}
|
|
|
- Thread.Sleep(100);
|
|
|
- }*/
|
|
|
- }
|
|
|
- public void HandleTime(object sender, EventArgs e)
|
|
|
- {
|
|
|
-
|
|
|
- //m_hk_camera.Camera.draw_image_to_wnd(pictureBox_camera.Handle);
|
|
|
- //跟新led
|
|
|
- update_led_screen();
|
|
|
-
|
|
|
- //更新投影仪提示箭头
|
|
|
- TimedData<Message.Ground_status_msg> lidar_statu = communication_data.Instance.lidar_statu;
|
|
|
- m_form_arrow.Update_arrow();
|
|
|
-
|
|
|
- //跟新投影仪界面车辆信息
|
|
|
- string car_number_str = "";
|
|
|
- if (communication_data.Instance.car_license.IsTimeout() == false)
|
|
|
- {
|
|
|
- car_number_str = communication_data.Instance.car_license.Value;
|
|
|
- }
|
|
|
- car_number.Text = car_number_str+"\n"+"欢迎光临";
|
|
|
-
|
|
|
- //显示车辆信息
|
|
|
- string car_info_str = " ";
|
|
|
-
|
|
|
- Message.Locate_information locate_info = lidar_statu.Value.LocateInformationRealtime;
|
|
|
- //
|
|
|
- if (lidar_statu.IsTimeout() == false)
|
|
|
- {
|
|
|
-
|
|
|
- if (lidar_statu.Value.GroundStatus == Ground_statu.CarCorrect
|
|
|
- || lidar_statu.Value.GroundStatus == Ground_statu.CarBorderReached)
|
|
|
+
|
|
|
+
|
|
|
+ //显示车辆信息
|
|
|
+ string car_info_str = " ";
|
|
|
+ TimedData<Message.Ground_status_msg> lidar_statu = communication_data.Instance.lidar_statu;
|
|
|
+ Message.Locate_information locate_info = lidar_statu.Value.LocateInformationRealtime;
|
|
|
+ //
|
|
|
+ if (lidar_statu.IsTimeout() == false)
|
|
|
{
|
|
|
|
|
|
- if (locate_info != null)
|
|
|
+ if (lidar_statu.Value.GroundStatus == Ground_statu.CarCorrect
|
|
|
+ || lidar_statu.Value.GroundStatus == Ground_statu.CarBorderReached)
|
|
|
{
|
|
|
|
|
|
- car_info_str += string.Format("X:{0:.000}m Y:{1:.000}m 角度:{2:.00}°" +
|
|
|
- "轴距:{3:.000}m 车宽:{4:.000}m 前轮角:{5:.00}°", locate_info.LocateX,
|
|
|
- locate_info.LocateY,locate_info.LocateAngle,
|
|
|
- locate_info.LocateWheelBase,locate_info.LocateWheelWidth,
|
|
|
- locate_info.LocateFrontTheta);
|
|
|
-
|
|
|
+ if (locate_info != null)
|
|
|
+ {
|
|
|
+
|
|
|
+ car_info_str += string.Format("X:{0:0.000}m Y:{1:0.000}m 角度:{2:0.00}°" +
|
|
|
+ "轴距:{3:0.000}m 车宽:{4:0.000}m 前轮角:{5:0.00}°", locate_info.LocateX,
|
|
|
+ locate_info.LocateY, locate_info.LocateAngle,
|
|
|
+ locate_info.LocateWheelBase, locate_info.LocateWheelWidth,
|
|
|
+ locate_info.LocateFrontTheta);
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
+ //更新投影仪提示箭头
|
|
|
+ this.Invoke((Action)(() =>
|
|
|
+ {
|
|
|
+ label_car_info.Text = car_info_str;
|
|
|
+ car_number.Text = car_number_str + "\n" + "欢迎光临";
|
|
|
+ m_form_arrow.Update_arrow();
|
|
|
+ }));
|
|
|
+ Thread.Sleep(100);
|
|
|
}
|
|
|
- label_car_info.Text = car_info_str;
|
|
|
+
|
|
|
+ }
|
|
|
+ public void HandleTime(object sender, EventArgs e)
|
|
|
+ {
|
|
|
}
|
|
|
private void update_led_screen()
|
|
|
{
|
|
@@ -238,7 +227,7 @@ namespace UnNomalized_node
|
|
|
BroadcastBoardManager.Instance.squareBoardList[0].UpdateStatus(
|
|
|
BroadcastSquareBoard.Entrance_statu.ENTRANCE_NOSIGNAL, false);
|
|
|
m_bexit = true;
|
|
|
- m_timer.Stop();
|
|
|
+ //m_timer.Stop();
|
|
|
BroadcastBoardManager.Instance.Close();
|
|
|
if (m_freash_arrow_thread.IsAlive)
|
|
|
{
|