File tree 3 files changed +9
-6
lines changed
3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -514,6 +514,7 @@ namespace librealsense
514
514
515
515
auto fw_version = _hw_monitor->get_firmware_version_string (gvd_buff, fw_version_offset);
516
516
auto serial = _hw_monitor->get_module_serial_string (gvd_buff, module_serial_offset);
517
+ auto pid_hex_str = hexify (depth.pid );
517
518
518
519
_camer_calib_params = [this ]() { return get_calibration (); };
519
520
enable_timestamp (true , true );
@@ -525,6 +526,7 @@ namespace librealsense
525
526
register_info (RS2_CAMERA_INFO_FIRMWARE_VERSION, fw_version);
526
527
register_info (RS2_CAMERA_INFO_PHYSICAL_PORT, depth.device_path );
527
528
register_info (RS2_CAMERA_INFO_DEBUG_OP_CODE, std::to_string (static_cast <int >(fw_cmd::GLD)));
529
+ register_info (RS2_CAMERA_INFO_PRODUCT_ID, pid_hex_str);
528
530
register_info (RS2_CAMERA_INFO_PRODUCT_LINE, " SR300" );
529
531
register_info (RS2_CAMERA_INFO_CAMERA_LOCKED, _is_locked ? " YES" : " NO" );
530
532
Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ namespace librealsense
27
27
{
28
28
const uint16_t SR300_PID = 0x0aa5 ;
29
29
const uint16_t SR300v2_PID = 0x0B48 ;
30
- const uint16_t SR306_PID = 0x0B48 ;
31
- // const uint16_t SR306_PID = 0x0aa3;
30
+ // const uint16_t SR306_PID = 0x0B48;
31
+ const uint16_t SR306_PID = 0x0aa3 ;
32
32
const uint16_t SR300_RECOVERY = 0x0ab3 ;
33
33
34
34
const double TIMESTAMP_10NSEC_TO_MSEC = 0.00001 ;
Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ using namespace std;
22
22
using namespace chrono ;
23
23
using namespace TCLAP ;
24
24
using namespace rs2 ;
25
- // using namespace librealsense;
26
25
27
26
#if (defined(_WIN32) || defined(_WIN64))
28
27
#include < intrin.h>
@@ -235,13 +234,15 @@ int main(int argc, char** argv) try
235
234
suites.push_back (make_shared<gl_blocks>());
236
235
#endif
237
236
237
+ rs2::context ctx;
238
+ auto list = ctx.query_devices ();
239
+ auto dev = list.front ();
238
240
pipeline p;
239
241
config cfg;
240
242
cfg.enable_stream (RS2_STREAM_DEPTH);
241
-
242
- // cfg.enable_stream(RS2_STREAM_COLOR, RS2_FORMAT_YUYV, 30); // TODO :: remove it when running sr306
243
+ if ( std::string (dev. get_info (RS2_CAMERA_INFO_PRODUCT_ID)) != " 0AA3 " ) // pid of sr306
244
+ cfg.enable_stream (RS2_STREAM_COLOR, RS2_FORMAT_YUYV, 30 );
243
245
auto prof = p.start (cfg);
244
- auto dev = prof.get_device ();
245
246
auto name = dev.get_info (RS2_CAMERA_INFO_NAME);
246
247
cout << " |**Device Name** |" << name << " |" << endl << endl;
247
248
cout.precision (3 );
You can’t perform that action at this time.
0 commit comments