K4AViewer: drop 'auto exposure priority' color control (#273)
The device firmware doesn't support modifying the auto exposure priority, so remove the UI control from the viewer.
This commit is contained in:
Родитель
11085c3f4f
Коммит
1e02477c5d
|
@ -204,9 +204,6 @@ void K4ADeviceDockControl::ApplyDefaultColorSettings()
|
|||
m_colorSettingsCache.WhiteBalance = { K4A_COLOR_CONTROL_MODE_AUTO, 4500 };
|
||||
ApplyColorSetting(K4A_COLOR_CONTROL_WHITEBALANCE, &m_colorSettingsCache.WhiteBalance);
|
||||
|
||||
m_colorSettingsCache.AutoExposurePriority = { K4A_COLOR_CONTROL_MODE_MANUAL, 1 };
|
||||
ApplyColorSetting(K4A_COLOR_CONTROL_AUTO_EXPOSURE_PRIORITY, &m_colorSettingsCache.AutoExposurePriority);
|
||||
|
||||
m_colorSettingsCache.Brightness = { K4A_COLOR_CONTROL_MODE_MANUAL, 128 };
|
||||
ApplyColorSetting(K4A_COLOR_CONTROL_BRIGHTNESS, &m_colorSettingsCache.Brightness);
|
||||
|
||||
|
@ -245,12 +242,11 @@ void K4ADeviceDockControl::LoadColorSettingsCache()
|
|||
{
|
||||
// If more color controls are added, they need to be initialized here
|
||||
//
|
||||
static_assert(sizeof(m_colorSettingsCache) == sizeof(ColorSetting) * 10,
|
||||
static_assert(sizeof(m_colorSettingsCache) == sizeof(ColorSetting) * 9,
|
||||
"Missing color setting in LoadColorSettingsCache()");
|
||||
|
||||
ReadColorSetting(K4A_COLOR_CONTROL_EXPOSURE_TIME_ABSOLUTE, &m_colorSettingsCache.ExposureTimeUs);
|
||||
ReadColorSetting(K4A_COLOR_CONTROL_WHITEBALANCE, &m_colorSettingsCache.WhiteBalance);
|
||||
ReadColorSetting(K4A_COLOR_CONTROL_AUTO_EXPOSURE_PRIORITY, &m_colorSettingsCache.AutoExposurePriority);
|
||||
ReadColorSetting(K4A_COLOR_CONTROL_BRIGHTNESS, &m_colorSettingsCache.Brightness);
|
||||
ReadColorSetting(K4A_COLOR_CONTROL_CONTRAST, &m_colorSettingsCache.Contrast);
|
||||
ReadColorSetting(K4A_COLOR_CONTROL_SATURATION, &m_colorSettingsCache.Saturation);
|
||||
|
@ -572,13 +568,6 @@ K4ADockControlStatus K4ADeviceDockControl::Show()
|
|||
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
ShowColorControl(K4A_COLOR_CONTROL_AUTO_EXPOSURE_PRIORITY, &m_colorSettingsCache.AutoExposurePriority,
|
||||
[](ColorSetting *cacheEntry) {
|
||||
return ImGui::Checkbox("Auto Exposure Priority", reinterpret_cast<bool *>(&cacheEntry->Value)) ?
|
||||
ColorControlAction::SetManual :
|
||||
ColorControlAction::None;
|
||||
});
|
||||
|
||||
ShowColorControl(K4A_COLOR_CONTROL_BACKLIGHT_COMPENSATION, &m_colorSettingsCache.BacklightCompensation,
|
||||
[](ColorSetting *cacheEntry) {
|
||||
return ImGui::Checkbox("Backlight Compensation", reinterpret_cast<bool *>(&cacheEntry->Value)) ?
|
||||
|
|
|
@ -47,7 +47,6 @@ private:
|
|||
{
|
||||
ColorSetting ExposureTimeUs;
|
||||
ColorSetting WhiteBalance;
|
||||
ColorSetting AutoExposurePriority;
|
||||
ColorSetting Brightness;
|
||||
ColorSetting Contrast;
|
||||
ColorSetting Saturation;
|
||||
|
|
|
@ -72,8 +72,6 @@ std::ostream &operator<<(std::ostream &s, const k4a_color_control_command_t &val
|
|||
{
|
||||
case K4A_COLOR_CONTROL_EXPOSURE_TIME_ABSOLUTE:
|
||||
return s << "EXPOSURE_TIME_ABSOLUTE";
|
||||
case K4A_COLOR_CONTROL_AUTO_EXPOSURE_PRIORITY:
|
||||
return s << "AUTO_EXPOSURE_PRIORITY";
|
||||
case K4A_COLOR_CONTROL_BRIGHTNESS:
|
||||
return s << "BRIGHTNESS";
|
||||
case K4A_COLOR_CONTROL_CONTRAST:
|
||||
|
|
Загрузка…
Ссылка в новой задаче