@ -46,6 +46,9 @@ const uint8_t OB_EXT_CMD7[16] = { 0x47, 0x4d, 0x04, 0x00, 0x02, 0x00, 0xfe, 0x12
const uint8_t OB_EXT_CMD8 [ 16 ] = { 0x47 , 0x4d , 0x04 , 0x00 , 0x02 , 0x00 , 0xfe , 0x13 , 0x3f , 0x00 , 0x00 , 0x00 , 0x01 , 0x00 , 0x00 , 0x00 } ;
const uint8_t OB_EXT_CMD9 [ 16 ] = { 0x47 , 0x4d , 0x04 , 0x00 , 0x02 , 0x00 , 0xfa , 0x13 , 0x4b , 0x00 , 0x00 , 0x00 , 0x01 , 0x00 , 0x00 , 0x00 } ;
const uint8_t OB_EXT_CMD10 [ 16 ] = { 0x47 , 0x4d , 0x04 , 0x00 , 0x02 , 0x00 , 0xfa , 0x13 , 0x3f , 0x00 , 0x00 , 0x00 , 0x04 , 0x00 , 0x00 , 0x00 } ;
const uint8_t OB_EXT_CMD11 [ 16 ] = { 0x47 , 0x4d , 0x04 , 0x00 , 0x02 , 0x00 , 0xfe , 0x13 , 0x3f , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 } ;
const uint8_t OB_EXT_CMD12 [ 16 ] = { 0x47 , 0x4d , 0x04 , 0x00 , 0x02 , 0x00 , 0xfe , 0x13 , 0x3f , 0x00 , 0x00 , 0x00 , 0x02 , 0x00 , 0x00 , 0x00 } ;
const uint8_t OB_EXT_CMD13 [ 16 ] = { 0x47 , 0x4d , 0x04 , 0x00 , 0x02 , 0x00 , 0xfa , 0x13 , 0x4b , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 } ;
# if defined(HAVE_OBSENSOR_V4L2)
# define fourCc2Int(a, b, c, d) \
@ -269,14 +272,22 @@ bool IUvcStreamChannel::setProperty(int propId, const uint8_t* /*data*/, uint32_
rst & = getXu ( 2 , & rcvData , & rcvLen ) ;
rst & = setXu ( 2 , OB_EXT_CMD6 , sizeof ( OB_EXT_CMD6 ) ) ;
rst & = getXu ( 2 , & rcvData , & rcvLen ) ;
}
else if ( OBSENSOR_ASTRA2_PID = = devInfo_ . pid ) {
rst & = setXu ( 2 , OB_EXT_CMD10 , sizeof ( OB_EXT_CMD8 ) ) ;
} else if ( OBSENSOR_ASTRA2_PID = = devInfo_ . pid ) {
rst & = setXu ( 2 , OB_EXT_CMD12 , sizeof ( OB_EXT_CMD12 ) ) ;
rst & = getXu ( 2 , & rcvData , & rcvLen ) ;
rst & = setXu ( 2 , OB_EXT_CMD6 , sizeof ( OB_EXT_CMD6 ) ) ;
rst & = getXu ( 2 , & rcvData , & rcvLen ) ;
}
else {
} else if ( OBSENSOR_GEMINI2L_PID = = devInfo_ . pid ) {
rst & = setXu ( 2 , OB_EXT_CMD11 , sizeof ( OB_EXT_CMD11 ) ) ;
rst & = getXu ( 2 , & rcvData , & rcvLen ) ;
rst & = setXu ( 2 , OB_EXT_CMD6 , sizeof ( OB_EXT_CMD6 ) ) ;
rst & = getXu ( 2 , & rcvData , & rcvLen ) ;
} else if ( OBSENSOR_GEMINI2XL_PID = = devInfo_ . pid ) {
rst & = setXu ( 2 , OB_EXT_CMD11 , sizeof ( OB_EXT_CMD11 ) ) ;
rst & = getXu ( 2 , & rcvData , & rcvLen ) ;
rst & = setXu ( 2 , OB_EXT_CMD6 , sizeof ( OB_EXT_CMD6 ) ) ;
rst & = getXu ( 2 , & rcvData , & rcvLen ) ;
} else {
rst & = setXu ( 2 , OB_EXT_CMD0 , sizeof ( OB_EXT_CMD0 ) ) ;
rst & = getXu ( 2 , & rcvData , & rcvLen ) ;
rst & = setXu ( 2 , OB_EXT_CMD1 , sizeof ( OB_EXT_CMD1 ) ) ;
@ -319,6 +330,40 @@ bool IUvcStreamChannel::getProperty(int propId, uint8_t* recvData, uint32_t* rec
param . p7 [ 1 ] = 480 ;
* recvDataSize = sizeof ( CameraParam ) ;
memcpy ( recvData , & param , * recvDataSize ) ;
} else if ( OBSENSOR_GEMINI2L_PID = = devInfo_ . pid ) {
// return default param
CameraParam param ;
param . p0 [ 0 ] = 688.87f ;
param . p0 [ 1 ] = 688.922f ;
param . p0 [ 2 ] = 644.317f ;
param . p0 [ 3 ] = 354.382f ;
param . p1 [ 0 ] = 688.87f ;
param . p1 [ 1 ] = 688.922f ;
param . p1 [ 2 ] = 644.317f ;
param . p1 [ 3 ] = 354.382f ;
param . p6 [ 0 ] = 1280 ;
param . p6 [ 1 ] = 720 ;
param . p7 [ 0 ] = 1280 ;
param . p7 [ 1 ] = 720 ;
* recvDataSize = sizeof ( CameraParam ) ;
memcpy ( recvData , & param , * recvDataSize ) ;
} else if ( OBSENSOR_GEMINI2XL_PID = = devInfo_ . pid ) {
// return default param
CameraParam param ;
param . p0 [ 0 ] = 610.847f ;
param . p0 [ 1 ] = 610.829f ;
param . p0 [ 2 ] = 640.647f ;
param . p0 [ 3 ] = 401.817f ;
param . p1 [ 0 ] = 610.847f ;
param . p1 [ 1 ] = 610.829f ;
param . p1 [ 2 ] = 640.647f ;
param . p1 [ 3 ] = 401.817f ;
param . p6 [ 0 ] = 640 ;
param . p6 [ 1 ] = 480 ;
param . p7 [ 0 ] = 640 ;
param . p7 [ 1 ] = 480 ;
* recvDataSize = sizeof ( CameraParam ) ;
memcpy ( recvData , & param , * recvDataSize ) ;
}
else if ( OBSENSOR_ASTRA2_PID = = devInfo_ . pid ) {
// return default param
@ -376,7 +421,7 @@ bool IUvcStreamChannel::getProperty(int propId, uint8_t* recvData, uint32_t* rec
bool IUvcStreamChannel : : initDepthFrameProcessor ( )
{
if ( OBSENSOR_GEMINI2_PID = = devInfo_ . pid | | OBSENSOR_ASTRA2_PID = = devInfo_ . pid ) {
if ( OBSENSOR_GEMINI2_PID = = devInfo_ . pid | | OBSENSOR_ASTRA2_PID = = devInfo_ . pid | | OBSENSOR_GEMINI2L_PID = = devInfo_ . pid ) {
uint8_t * rcvData ;
uint32_t rcvLen ;
@ -387,6 +432,17 @@ bool IUvcStreamChannel::initDepthFrameProcessor()
getXu ( 2 , & rcvData , & rcvLen ) ;
depthFrameProcessor_ = makePtr < DepthFrameUnpacker > ( ) ;
return true ;
} else if ( OBSENSOR_GEMINI2XL_PID = = devInfo_ . pid ) {
uint8_t * rcvData ;
uint32_t rcvLen ;
setXu ( 2 , OB_EXT_CMD7 , sizeof ( OB_EXT_CMD7 ) ) ;
getXu ( 2 , & rcvData , & rcvLen ) ;
setXu ( 2 , OB_EXT_CMD13 , sizeof ( OB_EXT_CMD13 ) ) ;
getXu ( 2 , & rcvData , & rcvLen ) ;
return true ;
}
else if ( streamType_ = = OBSENSOR_STREAM_DEPTH & & setXu ( 2 , OB_EXT_CMD4 , sizeof ( OB_EXT_CMD4 ) ) )