From 4fc0363a62ea85b77ccdf21d222519c6dfc2e13a Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sat, 11 Apr 2020 01:41:37 -0400 Subject: [PATCH] small refactor, comment --- src/k4a_sys_wrapper.rs | 3 ++- src/main.rs | 4 ++-- src/{sensors.rs => sensor_control.rs} | 0 3 files changed, 4 insertions(+), 3 deletions(-) rename src/{sensors.rs => sensor_control.rs} (100%) diff --git a/src/k4a_sys_wrapper.rs b/src/k4a_sys_wrapper.rs index 8cec62bfe8..5b0f36503e 100644 --- a/src/k4a_sys_wrapper.rs +++ b/src/k4a_sys_wrapper.rs @@ -92,7 +92,8 @@ impl Device { /// Start the cameras. pub fn start_cameras(&self) -> Result<(), KinectError> { let mut device_config = DeviceConfiguration::new(); - // device_config.0.color_format = k4a_sys::k4a_image_format_t_K4A_IMAGE_FORMAT_COLOR_MJPG; // TODO: Broken? + // NB: Although the Kinect docs say this format isn't natively supported by the color camera + // and that extra CPU is required, this is the only color mode supported by 'k4aviewer' 3D view. device_config.0.color_format = k4a_sys::k4a_image_format_t_K4A_IMAGE_FORMAT_COLOR_BGRA32; device_config.0.color_resolution = k4a_sys::k4a_color_resolution_t_K4A_COLOR_RESOLUTION_2160P; device_config.0.depth_mode = k4a_sys::k4a_depth_mode_t_K4A_DEPTH_MODE_NFOV_UNBINNED; diff --git a/src/main.rs b/src/main.rs index 406ec31786..e413706676 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,7 +45,7 @@ use handwritten_wrapper::*; use k4a_sys_wrapper::Device; use k4a_sys_wrapper::device_get_installed_count; use k4a_sys_wrapper::Image; -use sensors::{capture_thread, grab_single_frame}; +use sensor_control::{capture_thread, grab_single_frame}; use glium::texture::RawImage2d; use conversion::TextureData2d; @@ -53,7 +53,7 @@ pub mod conversion; pub mod handwritten_wrapper; pub mod handwritten_wrapper_test; pub mod k4a_sys_wrapper; -pub mod sensors; +pub mod sensor_control; pub struct TextureContainer { pub texture: Texture2d diff --git a/src/sensors.rs b/src/sensor_control.rs similarity index 100% rename from src/sensors.rs rename to src/sensor_control.rs