fix: roller3.cpp 中 DetectMode enum class 的 LOG 输出和 stoi 赋值 cast 修复
This commit is contained in:
parent
ba0bf8ce21
commit
367802fc71
@ -217,7 +217,7 @@ void Roller3::print_load_content() {
|
|||||||
<< std::endl;
|
<< std::endl;
|
||||||
logger_->Debug() << "limit_error_:" << limit_error_
|
logger_->Debug() << "limit_error_:" << limit_error_
|
||||||
<< ",limit_warn_:" << limit_warn_ << ",单位unit_:" << unit_
|
<< ",limit_warn_:" << limit_warn_ << ",单位unit_:" << unit_
|
||||||
<< ",detect_mode_:" << detect_mode_
|
<< ",detect_mode_:" << static_cast<int>(detect_mode_)
|
||||||
<< ",hold_time:" << hold_time_.count() << "ms" << std::endl;
|
<< ",hold_time:" << hold_time_.count() << "ms" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -286,12 +286,12 @@ int Roller3::init_X_exp() {
|
|||||||
.at("input")
|
.at("input")
|
||||||
.at("param")
|
.at("param")
|
||||||
.contains("detect_mode")) {
|
.contains("detect_mode")) {
|
||||||
detect_mode_ = std::stoi(rule_json_.at("function")
|
detect_mode_ = static_cast<DetectMode>(std::stoi(rule_json_.at("function")
|
||||||
.at("input")
|
.at("input")
|
||||||
.at("param")
|
.at("param")
|
||||||
.at("detect_mode")
|
.at("detect_mode")
|
||||||
.at("value")
|
.at("value")
|
||||||
.get<std::string>());
|
.get<std::string>()));
|
||||||
}
|
}
|
||||||
if (rule_json_.at("function")
|
if (rule_json_.at("function")
|
||||||
.at("input")
|
.at("input")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user