K4aRecorder: Removed auto gain & added debug messages (#1179)
This commit is contained in:
Родитель
07ca9080b3
Коммит
45208d65fa
|
@ -484,6 +484,10 @@ k4a_result_t CMFCameraReader::Start(const UINT32 width,
|
|||
LOG_WARNING("Start request in started state", 0);
|
||||
}
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
LOG_ERROR("Failing with HRESULT:%08X", hr);
|
||||
}
|
||||
return k4aResultFromHRESULT(hr);
|
||||
}
|
||||
|
||||
|
@ -691,6 +695,10 @@ k4a_result_t CMFCameraReader::GetCameraControlCapabilities(const k4a_color_contr
|
|||
capabilities->valid = true;
|
||||
}
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
LOG_ERROR("Failing command %u with HRESULT:%08X", command, hr);
|
||||
}
|
||||
return k4aResultFromHRESULT(hr);
|
||||
}
|
||||
|
||||
|
@ -819,6 +827,10 @@ k4a_result_t CMFCameraReader::GetCameraControl(const k4a_color_control_command_t
|
|||
*pValue = (int32_t)propertyValue;
|
||||
}
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
LOG_ERROR("Failing command %u with HRESULT:%08X", command, hr);
|
||||
}
|
||||
return k4aResultFromHRESULT(hr);
|
||||
}
|
||||
|
||||
|
@ -925,9 +937,14 @@ k4a_result_t CMFCameraReader::SetCameraControl(const k4a_color_control_command_t
|
|||
}
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("Failing, unknown command %u", command);
|
||||
return K4A_RESULT_FAILED;
|
||||
}
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
LOG_ERROR("Failing command %u with HRESULT:%08X", command, hr);
|
||||
}
|
||||
return k4aResultFromHRESULT(hr);
|
||||
}
|
||||
|
||||
|
|
|
@ -121,13 +121,6 @@ int do_recording(uint8_t device_index,
|
|||
std::cerr << "Runtime error: k4a_device_set_color_control() for manual gain failed " << std::endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (K4A_FAILED(k4a_device_set_color_control(device, K4A_COLOR_CONTROL_GAIN, K4A_COLOR_CONTROL_MODE_AUTO, 0)))
|
||||
{
|
||||
std::cerr << "Runtime error: k4a_device_set_color_control() for auto gain failed " << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
CHECK(k4a_device_start_cameras(device, device_config), device);
|
||||
if (record_imu)
|
||||
|
|
Загрузка…
Ссылка в новой задаче