Browse Source

Merge remote-tracking branch 'origin/master'

yct 2 years ago
parent
commit
f32462c7fc

+ 10 - 0
plc调度节点/dispatch/dispatch_command.cpp

@@ -2,6 +2,7 @@
 #include "dispatch_command.h"
 #include <google/protobuf/text_format.h>
 #include "../tool/time_tool.h"
+#include "dispatch_manager.h"
 
 Dispatch_command::Dispatch_command()
 {
@@ -147,6 +148,15 @@ Error_manager Dispatch_command::dispatch_response_to_sql(Error_manager dispatch_
 		if ( m_dispatch_process_type == Common_data::DISPATCH_PROCESS_STORE )
 		{
 			LOG(INFO) << " dispatch_response_to_sql DISPATCH_PROCESS_STORE 存车答复成功 =  "<< t_error << " --- " << this;
+
+			//20230213 huli  add plc car_wheel_base
+			float t_wheelbase = Dispatch_manager::get_instance_references().m_dispatch_plc.m_plc_car_wheel_base;
+			if ( t_wheelbase > 0.1 )
+			{
+				m_dispatch_command_map[m_car_number_optimal].m_measure_info_msg.set_wheelbase(t_wheelbase);
+				m_dispatch_command_map[m_car_number_optimal].m_measure_info = m_dispatch_command_map[m_car_number_optimal].m_measure_info_msg.DebugString();
+			}
+
 			//增加 车辆表, 存车指令 完成后添加车辆信息
 			t_error = insert_vehicle_for_car_number();
 			//更新 指令队列, 根据车牌号 删除指令

+ 5 - 0
plc调度节点/dispatch/dispatch_plc.cpp

@@ -1025,6 +1025,9 @@ Error_manager Dispatch_plc::check_response_from_plc_new()
 	//检查唯一码
 	if ( m_response_key == m_request_key  )
 	{
+		//20230213 huli  add plc car_wheel_base
+		m_plc_car_wheel_base = m_response_car_wheel_base_exact_value;
+
 		//第一次同步时,刷新时间
 		if ( s_update_flag == false )
 		{
@@ -1096,6 +1099,8 @@ Error_manager Dispatch_plc::check_response_from_plc_new()
 		return Error_code::NODATA;//返回没有收到数据
 	}
 #endif
+
+
 	return Error_code::SUCCESS;
 }
 

+ 3 - 0
plc调度节点/dispatch/dispatch_plc.h

@@ -252,6 +252,9 @@ public:
 	std::chrono::system_clock::time_point           test_start_time;
 	std::chrono::system_clock::time_point           test_end_time;
 
+	//20230213 huli  add plc car_wheel_base
+	float 		m_plc_car_wheel_base;
+
 
 private: