feat(camera): 启动自动初始化并在测量前重试失败的初始化
- 程序启动后自动连接左右相机、应用参数并完成一次白平衡 - 测量请求到达时若相机未初始化成功,再初始化一次 - 重试成功继续同一测量请求,失败返回 INITIALIZATION 和 robot_valid=false - 初始化期间允许一个待处理测量请求,并支持取消 - IPC 状态增加 initialization_in_progress - 手动白平衡先失效初始化缓存并同步更新就绪状态 - 将带宽设置收口到 CameraManager,更新接入文档 验证:MSVC x64编译通过;启动重试8、IPC9、白平衡6、抓取7项测试通过
This commit is contained in:
@@ -316,6 +316,20 @@ bool CameraManager::setGain(CamIndex idx, double dB)
|
||||
}
|
||||
}
|
||||
|
||||
bool CameraManager::setBandwidthLimit(CamIndex idx, bool enabled)
|
||||
{
|
||||
if (!m_connected[idx] || m_device[idx].IsNull()) return false;
|
||||
try {
|
||||
auto features = m_device[idx]->GetRemoteFeatureControl();
|
||||
features->GetIntFeature("DeviceLinkSelector")->SetValue(0);
|
||||
features->GetEnumFeature("DeviceLinkThroughputLimitMode")->SetValue(enabled ? "On" : "Off");
|
||||
return true;
|
||||
} catch (...) {
|
||||
emit errorOccurred(idx, QStringLiteral("Set bandwidth limit failed"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool CameraManager::applyWhiteBalanceOnce(CamIndex idx)
|
||||
{
|
||||
if (!m_connected[idx] || m_device[idx].IsNull()) return false;
|
||||
|
||||
Reference in New Issue
Block a user