update 适配param.json

main
liusiyang 3 weeks ago
parent 7cc8f0db2e
commit 03be3a993e

@ -11,6 +11,7 @@
#include <regex> #include <regex>
#include "ConfigBase.h" #include "ConfigBase.h"
#include "../../AlgorithmModule/include/ImgCheckConfig.h" #include "../../AlgorithmModule/include/ImgCheckConfig.h"
#include <filesystem>
ConfigManager::ConfigManager() ConfigManager::ConfigManager()
{ {
@ -199,6 +200,9 @@ int ConfigManager::UpdateConfig()
for (auto &camera : camera_list) for (auto &camera : camera_list)
{ {
std::string strConfigPath = m_strConfigRootPath + "/param_" + camera.code + ".json"; std::string strConfigPath = m_strConfigRootPath + "/param_" + camera.code + ".json";
if (!std::filesystem::exists(strConfigPath)) {
strConfigPath = m_strConfigRootPath + "/param.json";
}
std::shared_ptr<ConfigBase> temConfig = ConfigBase::GetInstance(); std::shared_ptr<ConfigBase> temConfig = ConfigBase::GetInstance();
re = LoadParamConfig(temConfig, strConfigPath); re = LoadParamConfig(temConfig, strConfigPath);
if (re != 0) if (re != 0)

@ -688,7 +688,7 @@ int deal::saveImg(std::string strpath, std::shared_ptr<CheckResult> result)
std::string str = strroot + "_RE_" + std::to_string(i) + "_YS_Src.png"; std::string str = strroot + "_RE_" + std::to_string(i) + "_YS_Src.png";
if (result->YS_ImageResult.at(i).srcImg.empty()) if (result->YS_ImageResult.at(i).srcImg.empty())
{ {
printf("resqwwwwwwwwwwwwwwwult->YS_ImageResult.size() %ld \n", result->YS_ImageResult.size()); // printf("resqwwwwwwwwwwwwwwwult->YS_ImageResult.size() %ld \n", result->YS_ImageResult.size());
} }
if (!result->YS_ImageResult.at(i).srcImg.empty()) if (!result->YS_ImageResult.at(i).srcImg.empty())

Loading…
Cancel
Save