Merge branch 'develop' of http://gitlab.mynt.com/mynteye/mynt-eye-s-sdk into develop
This commit is contained in:
		
						commit
						af2327cd92
					
				@ -1,6 +1,6 @@
 | 
			
		||||
# MYNT® EYE S SDK
 | 
			
		||||
 | 
			
		||||
[](https://github.com/slightech/MYNT-EYE-S-SDK)
 | 
			
		||||
[](https://github.com/slightech/MYNT-EYE-S-SDK)
 | 
			
		||||
 | 
			
		||||
## Overview
 | 
			
		||||
 | 
			
		||||
@ -17,8 +17,8 @@ Please follow the guide doc to install the SDK on different platforms.
 | 
			
		||||
## Documentations
 | 
			
		||||
 | 
			
		||||
* [API Doc](https://github.com/slightech/MYNT-EYE-S-SDK/releases): API reference, some guides and data spec.
 | 
			
		||||
  * en: [](https://github.com/slightech/MYNT-EYE-S-SDK/files/2981536/mynteye-s-sdk-docs-en-2.3.4.pdf) [](https://github.com/slightech/MYNT-EYE-S-SDK/files/2981540/mynt-eye-s-sdk-docs-2.3.4-en.zip) [](https://slightech.github.io/MYNT-EYE-S-SDK/)
 | 
			
		||||
  * zh-Hans: []() [](https://github.com/slightech/MYNT-EYE-S-SDK/files/2981541/mynt-eye-s-sdk-docs-2.3.4-zh-Hans.zip) [](http://doc.myntai.com/resource/api/mynt-eye-s-sdk-docs-2.3.4-zh-Hans/mynt-eye-s-sdk-docs-2.3.4-zh-Hans/index.html)
 | 
			
		||||
  * en: [](https://readthedocs.org/projects/mynt-eye-s-sdk/downloads/pdf/latest/) [](https://readthedocs.org/projects/mynt-eye-s-sdk/downloads/htmlzip/latest/) [](https://mynt-eye-s-sdk.readthedocs.io/en/latest/)
 | 
			
		||||
  * zh-Hans: []() [](https://readthedocs.org/projects/mynt-eye-s-sdk-docs-zh-cn/downloads/htmlzip/latest/) [](https://mynt-eye-s-sdk-docs-zh-cn.readthedocs.io/zh_CN/latest/)
 | 
			
		||||
 | 
			
		||||
> Supported languages: `en`, `zh-Hans`.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -10,4 +10,5 @@ MYNT® EYE Control
 | 
			
		||||
   auto_exposure
 | 
			
		||||
   manual_exposure
 | 
			
		||||
   infrared
 | 
			
		||||
   imu_low_pass_filter
 | 
			
		||||
   imu_low_pass_filter
 | 
			
		||||
   iic_address
 | 
			
		||||
							
								
								
									
										58
									
								
								docs/src/control/iic_address.rst
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								docs/src/control/iic_address.rst
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,58 @@
 | 
			
		||||
.. _iic_address:
 | 
			
		||||
 | 
			
		||||
Set IIC Address
 | 
			
		||||
================
 | 
			
		||||
 | 
			
		||||
Using the ``SetOptionValue()`` function in the API, you can set various control values for the current device.
 | 
			
		||||
 | 
			
		||||
To set the IIC address, set ``Option::IIC_ADDRESS_SETTING``.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
.. Attention::
 | 
			
		||||
  Only support S210A
 | 
			
		||||
 | 
			
		||||
Reference Code:
 | 
			
		||||
 | 
			
		||||
s210a:
 | 
			
		||||
 | 
			
		||||
.. code-block:: c++
 | 
			
		||||
 | 
			
		||||
  auto &&api = API::Create(argc, argv);
 | 
			
		||||
  if (!api) return 1;
 | 
			
		||||
  bool ok;
 | 
			
		||||
  auto &&request = api->SelectStreamRequest(&ok);
 | 
			
		||||
  if (!ok) return 1;
 | 
			
		||||
  api->ConfigStreamRequest(request);
 | 
			
		||||
  Model model = api->GetModel();
 | 
			
		||||
  if (model == Model::STANDARD210A) {
 | 
			
		||||
    api->SetOptionValue(Option::IIC_ADDRESS_SETTING, 0x31);
 | 
			
		||||
    LOG(INFO) << "Set iic address to " << std::hex << "0x"
 | 
			
		||||
              << api->GetOptionValue(Option::IIC_ADDRESS_SETTING);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Reference running results on Linux:
 | 
			
		||||
 | 
			
		||||
s210a:
 | 
			
		||||
 | 
			
		||||
.. code-block:: bash
 | 
			
		||||
 | 
			
		||||
  $ ./samples/_output/bin/tutorials/ctrl_iic_adress
 | 
			
		||||
  I/utils.cc:30 Detecting MYNT EYE devices
 | 
			
		||||
  I/utils.cc:40 MYNT EYE devices:
 | 
			
		||||
  I/utils.cc:43   index: 0, name: MYNT-EYE-S210A, sn: 07C41A190009071F
 | 
			
		||||
  I/utils.cc:51 Only one MYNT EYE device, select index: 0
 | 
			
		||||
  I/utils.cc:79 MYNT EYE devices:
 | 
			
		||||
  I/utils.cc:82   index: 0, request: width: 1280, height: 400, format: Format::BGR888, fps: 10
 | 
			
		||||
  I/utils.cc:82   index: 1, request: width: 1280, height: 400, format: Format::BGR888, fps: 20
 | 
			
		||||
  I/utils.cc:82   index: 2, request: width: 1280, height: 400, format: Format::BGR888, fps: 30
 | 
			
		||||
  I/utils.cc:82   index: 3, request: width: 1280, height: 400, format: Format::BGR888, fps: 60
 | 
			
		||||
  I/utils.cc:82   index: 4, request: width: 2560, height: 800, format: Format::BGR888, fps: 10
 | 
			
		||||
  I/utils.cc:82   index: 5, request: width: 2560, height: 800, format: Format::BGR888, fps: 20
 | 
			
		||||
  I/utils.cc:82   index: 6, request: width: 2560, height: 800, format: Format::BGR888, fps: 30
 | 
			
		||||
  I/utils.cc:93 There are 7 stream requests, select index:
 | 
			
		||||
  3
 | 
			
		||||
  I/imu_range.cc:51 Set iic address to 0x31
 | 
			
		||||
 | 
			
		||||
After the sample program finishes running with ``ESC/Q``.
 | 
			
		||||
Complete code samples,please see `iic_address.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/tutorials/control/iic_address.cc>`_.
 | 
			
		||||
@ -712,10 +712,10 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
 | 
			
		||||
          if (data.imu) {
 | 
			
		||||
            if (data.imu->flag == 1) {  // accelerometer
 | 
			
		||||
              imu_accel_ = data.imu;
 | 
			
		||||
              publishImuBySync(stamp);
 | 
			
		||||
              publishImuBySync();
 | 
			
		||||
            } else if (data.imu->flag == 2) {  // gyroscope
 | 
			
		||||
              imu_gyro_ = data.imu;
 | 
			
		||||
              publishImuBySync(stamp);
 | 
			
		||||
              publishImuBySync();
 | 
			
		||||
            } else {
 | 
			
		||||
              publishImu(data, imu_count_, stamp);
 | 
			
		||||
              publishTemperature(data.imu->temperature, imu_count_, stamp);
 | 
			
		||||
@ -980,14 +980,14 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void publishImuBySync(ros::Time stamp) {
 | 
			
		||||
  void publishImuBySync() {
 | 
			
		||||
    timestampAlign();
 | 
			
		||||
 | 
			
		||||
    if (imu_accel_ == nullptr || imu_gyro_ == nullptr) {
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
    sensor_msgs::Imu msg;
 | 
			
		||||
 | 
			
		||||
    ros::Time stamp = checkUpImuTimeStamp(imu_accel_->timestamp);
 | 
			
		||||
    msg.header.seq = imu_sync_count_;
 | 
			
		||||
    msg.header.stamp = stamp;
 | 
			
		||||
    msg.header.frame_id = imu_frame_id_;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user