添加异常判断处理。
This commit is contained in:
parent
d3ccaba32f
commit
d86a45680b
@ -761,9 +761,15 @@ QString DeviceConnection::handleCommand(const std::string_view &replyText, const
|
||||
LOG(info) << "device factory reset";
|
||||
} else if (function == "headdetectparam_getdata") {
|
||||
auto &data = reply.at("data").as_object();
|
||||
if (data.contains("hatthreshold")) {
|
||||
m_infomation.helmetThreshold = data.at("hatthreshold").as_int64();
|
||||
}
|
||||
if (data.contains("headthreshold")) {
|
||||
m_infomation.headThreshold = data.at("headthreshold").as_int64();
|
||||
}
|
||||
if (data.contains("detectframenum")) {
|
||||
m_infomation.detectFrameSize = data.at("detectframenum").as_int64();
|
||||
}
|
||||
emit detectThresholdChanged(m_infomation.helmetThreshold, m_infomation.headThreshold,
|
||||
m_infomation.detectFrameSize);
|
||||
} else if (function == "thresholdwithhat_setdata") {
|
||||
|
Loading…
Reference in New Issue
Block a user