@@ -1041,6 +1041,7 @@ namespace rs2
10411041 error_message = e.what ();
10421042 }
10431043 }
1044+
10441045 void device_model::check_for_device_updates (viewer_model& viewer, bool activated_by_user )
10451046 {
10461047 std::weak_ptr< updates_model > updates_model_protected ( viewer.updates );
@@ -1385,7 +1386,6 @@ namespace rs2
13851386 RsImGui::CustomTooltip (" %s" , tooltip.c_str ());
13861387 }
13871388
1388-
13891389 if ( dev.supports ( RS2_CAMERA_INFO_PRODUCT_LINE )
13901390 && ( dev.get_info ( RS2_CAMERA_INFO_PRODUCT_LINE ) ) )
13911391 {
@@ -1839,33 +1839,24 @@ namespace rs2
18391839
18401840 // Find Resolution
18411841 std::pair<int , int > requested_res{ kvp.second .width ,kvp.second .height };
1842- size_t res_id = 0 ;
1843- for (; res_id < sub->res_values .size (); res_id++)
1844- {
1845- if (sub->res_values [res_id] == requested_res)
1846- break ;
1847- }
1848- if (res_id == sub->res_values .size ())
1849- {
1850- throw std::runtime_error ( rsutils::string::from ()
1851- << " No match found for requested resolution: " << requested_res.first
1852- << " x" << requested_res.second );
1853- }
18541842 if (!sub->ui .is_multiple_resolutions )
1855- sub->ui .selected_res_id = static_cast <int >(res_id);
1856- else
18571843 {
1858- int depth_res_id, ir1_res_id, ir2_res_id;
1859- sub->get_depth_ir_mismatch_resolutions_ids (depth_res_id, ir1_res_id, ir2_res_id);
1860-
1861- if (kvp.first .first == RS2_STREAM_DEPTH )
1862- sub->ui .selected_res_id_map [depth_res_id] = static_cast <int >(res_id);
1863- else
1844+ size_t res_id = 0 ;
1845+ for (; res_id < sub->res_values .size (); res_id++)
1846+ {
1847+ if (sub->res_values [res_id] == requested_res)
1848+ break ;
1849+ }
1850+ if (res_id == sub->res_values .size ())
18641851 {
1865- sub->ui .selected_res_id_map [ir1_res_id] = static_cast <int >(res_id);
1866- sub->ui .selected_res_id_map [ir2_res_id] = static_cast <int >(res_id);
1852+ throw std::runtime_error (rsutils::string::from ()
1853+ << " No match found for requested resolution: " << requested_res.first
1854+ << " x" << requested_res.second );
18671855 }
1856+ sub->ui .selected_res_id = static_cast <int >(res_id);
18681857 }
1858+ else
1859+ sub->ui .selected_stream_to_res [kvp.first .first ] = requested_res;
18691860 }
18701861 }
18711862 }
@@ -2129,7 +2120,7 @@ namespace rs2
21292120 sub->_options_invalidated = true ;
21302121 }
21312122 }
2132- auto ret = file_dialog_open (open_file, " JavaScript Object Notation (JSON | PRESET)\0 *.json; *.preset\0 " , NULL , NULL );
2123+ auto ret = file_dialog_open (open_file, " JavaScript Object Notation (JSON | PRESET)\0 *.json\0 *.preset\0 " , NULL , NULL );
21332124 if (ret)
21342125 {
21352126 error_message = safe_call ([&]() { load_json (ret); });
@@ -2985,23 +2976,60 @@ namespace rs2
29852976
29862977 bool device_model::disable_record_button_logic (bool is_streaming, bool is_playback_device)
29872978 {
2988- return (!is_streaming || is_playback_device);
2979+ bool depth_mapping_camera_streaming_alone = is_depth_mapping_camera_streaming_alone ();
2980+ return (!is_streaming || is_playback_device || depth_mapping_camera_streaming_alone);
29892981 }
29902982
29912983 std::string device_model::get_record_button_hover_text (bool is_streaming)
29922984 {
2985+ bool depth_mapping_camera_streaming_alone = is_depth_mapping_camera_streaming_alone ();
29932986 std::string record_button_hover_text;
29942987 if (!is_streaming)
29952988 {
29962989 record_button_hover_text = " Start streaming to enable recording" ;
29972990 }
29982991 else
29992992 {
3000- record_button_hover_text = is_recording ? " Stop Recording" : " Start Recording" ;
2993+ if (depth_mapping_camera_streaming_alone)
2994+ {
2995+ record_button_hover_text = " To record Depth Mapping Camera also stream Stereo Module" ;
2996+ }
2997+ else
2998+ {
2999+ record_button_hover_text = is_recording ? " Stop Recording" : " Start Recording" ;
3000+ }
30013001 }
30023002 return record_button_hover_text;
30033003 }
30043004
3005+ // In order to record LPC and enable 3D we need to also record depth stereo sensor
3006+ bool device_model::is_depth_mapping_camera_streaming_alone ()
3007+ {
3008+ std::string pid = dev.get_info (RS2_CAMERA_INFO_PRODUCT_ID );
3009+ if (pid == " 0B6B" )
3010+ {
3011+ bool depth_mapping_sensor_streaming = false ;
3012+ bool depth_stereo_sensor_streaming = false ;
3013+ for (auto && sub : subdevices)
3014+ {
3015+ if (sub->s ->is <rs2::depth_mapping_sensor>() && sub->streaming )
3016+ {
3017+ depth_mapping_sensor_streaming = true ;
3018+ }
3019+ if (sub->s ->is <rs2::depth_stereo_sensor>() && sub->streaming )
3020+ {
3021+ depth_stereo_sensor_streaming = true ;
3022+ }
3023+ }
3024+ if (depth_mapping_sensor_streaming && !depth_stereo_sensor_streaming)
3025+ {
3026+ return true ;
3027+ }
3028+ }
3029+ return false ;
3030+ }
3031+
3032+
30053033 std::vector<std::pair<std::string, std::string>> get_devices_names (const device_list& list)
30063034 {
30073035 std::vector<std::pair<std::string, std::string>> device_names;
@@ -3434,7 +3462,7 @@ namespace rs2
34343462 }
34353463 else
34363464 {
3437- manager = std::make_shared< d500_on_chip_calib_manager >( viewer, sub, *this , dev );
3465+ manager = std::make_shared<d500_on_chip_calib_manager>( viewer, sub, *this , dev );
34383466 n = std::make_shared< d500_autocalib_notification_model >( " " , manager, false );
34393467 }
34403468 viewer.not_model ->add_notification ( n );
0 commit comments