add 添加参数版本号

main
liusiyang 3 weeks ago
parent 83c78f3791
commit c61729e2e0

@ -427,6 +427,7 @@ int ImgCheckAnalysisy::CheckRun()
m_pdetlog->AddCheckstr(PrintLevel_0, "1、basic Info", "---------------------------1、basic Info---------------------------------");
m_pdetlog->AddCheckstr(PrintLevel_0, "Version", "%s", GetVersion().c_str());
m_pdetlog->AddCheckstr(PrintLevel_0, "ConfigVersion", "%s", m_pBasicConfig->strConfigVersion.c_str());
m_pdetlog->AddCheckstr(PrintLevel_0, "Start", "%s", m_pImageAllResult->strBaseInfo.c_str());
m_pdetlog->AddCheckstr(PrintLevel_0, "ImgageScale", "Scale_X = %f Scale_Y = %f", m_fImgage_Scale_X, m_fImgage_Scale_Y);

@ -453,6 +453,7 @@ struct BasicConfig
float fImage_Scale_y; // 成像精度
float fProduct_Off_X_mm; // 产品偏移量
std::string strCamName; //
std::string strConfigVersion; // 配置版本
float density_R_mm; // 密度计算半径 像素
BasicConfig()
@ -475,6 +476,7 @@ struct BasicConfig
density_R_mm = 5;
strCamName = "";
fProduct_Off_X_mm = 0;
strConfigVersion = "1.0";
strCamearName = EMPTY_CONFIG_NAME;
}
void copy(BasicConfig tem)
@ -499,6 +501,7 @@ struct BasicConfig
this->fImage_Scale_y = tem.fImage_Scale_y;
this->density_R_mm = tem.density_R_mm;
this->strCamearName = tem.strCamearName;
this->strConfigVersion = tem.strConfigVersion;
}
void print(std::string str = "")
{

@ -44,6 +44,11 @@ void CommonParamToCheckConfigJson::toObjectFromValue(Json::Value root)
// getchar();
if (value.isObject())
{
_config.baseConfig.strConfigVersion = value["version"].asString();
if ( _config.baseConfig.strConfigVersion == "")
{
_config.baseConfig.strConfigVersion = "NULL";
}
_config.baseConfig.image_widht = value["image_widht"].asInt();
_config.baseConfig.Image_height = value["Image_height"].asInt();
_config.baseConfig.bDrawShieldRoi = value["bDrawShieldRoi"].asBool();

Loading…
Cancel
Save