Skip to content

Commit e18af41

Browse files
authored
PR #13619 from OhadMeir: Set/get preset as bulk operation
2 parents 7c2d0cb + ce1857e commit e18af41

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/ds/advanced_mode/advanced_mode.cpp

+13
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,8 @@ namespace librealsense
734734
preset ds_advanced_mode_base::get_all() const
735735
{
736736
preset p;
737+
738+
rsutils::deferred depth_bulk = _depth_sensor.bulk_operation();
737739
get_depth_control_group(&p.depth_controls);
738740
get_rsm(&p.rsm);
739741
get_rau_support_vector_control(&p.rsvc);
@@ -753,6 +755,10 @@ namespace librealsense
753755
get_depth_auto_exposure(&p.depth_auto_exposure);
754756
get_depth_gain(&p.depth_gain);
755757
get_depth_auto_white_balance(&p.depth_auto_white_balance);
758+
759+
rsutils::deferred color_bulk;
760+
if( *_color_sensor )
761+
color_bulk = ( *_color_sensor )->bulk_operation();
756762
get_color_exposure(&p.color_exposure);
757763
get_color_auto_exposure(&p.color_auto_exposure);
758764
get_color_backlight_compensation(&p.color_backlight_compensation);
@@ -766,6 +772,7 @@ namespace librealsense
766772
get_color_white_balance(&p.color_white_balance);
767773
get_color_auto_white_balance(&p.color_auto_white_balance);
768774
get_color_power_line_frequency(&p.color_power_line_frequency);
775+
769776
return p;
770777
}
771778

@@ -778,6 +785,8 @@ namespace librealsense
778785

779786
void ds_advanced_mode_base::set_all_depth(const preset& p)
780787
{
788+
rsutils::deferred depth_bulk = _depth_sensor.bulk_operation();
789+
781790
set(p.depth_controls, advanced_mode_traits<STDepthControlGroup>::group);
782791
set(p.rsm , advanced_mode_traits<STRsm>::group);
783792
set(p.rsvc , advanced_mode_traits<STRauSupportVectorControl>::group);
@@ -813,6 +822,10 @@ namespace librealsense
813822

814823
void ds_advanced_mode_base::set_all_rgb( const preset & p )
815824
{
825+
rsutils::deferred color_bulk;
826+
if( *_color_sensor )
827+
color_bulk = ( *_color_sensor )->bulk_operation();
828+
816829
set_color_auto_exposure(p.color_auto_exposure);
817830
if (p.color_auto_exposure.was_set && p.color_auto_exposure.auto_exposure == 0)
818831
{

0 commit comments

Comments
 (0)