Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
gwen2018 committed Feb 4, 2025
1 parent c3d27e8 commit f650ba7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 52 deletions.
2 changes: 1 addition & 1 deletion common/fw-update-helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ namespace rs2
std::function<void()> cleanup,
invoker invoke)
{
// if device is D457, and fw is signed - using mipi specific procedure
// if device is MIPI device, and fw is signed - using mipi specific procedure
if (_is_signed
&& (!strcmp(_dev.get_info(RS2_CAMERA_INFO_PRODUCT_ID), "ABCD")
|| !strcmp(_dev.get_info(RS2_CAMERA_INFO_PRODUCT_ID), "BBCD")
Expand Down
4 changes: 2 additions & 2 deletions include/librealsense2/rs.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ extern "C" {
#include "h/rs_sensor.h"

#define RS2_API_MAJOR_VERSION 2
#define RS2_API_MINOR_VERSION 57
#define RS2_API_PATCH_VERSION 54
#define RS2_API_MINOR_VERSION 56
#define RS2_API_PATCH_VERSION 0
#define RS2_API_BUILD_VERSION 0

#ifndef STRINGIFY
Expand Down
16 changes: 0 additions & 16 deletions src/ds/d400/d400-factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,6 @@ namespace librealsense
, firmware_logger_device(
dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
{
std::cout << "rs430i_device ..." << std::endl;
}

std::vector<tagged_profile> get_profiles_tags() const override
Expand Down Expand Up @@ -1201,17 +1200,6 @@ namespace librealsense
bool has_metadata_node = _group.uvc_devices.front().has_metadata_node;
std::string metadata_node_id = _group.uvc_devices.front().metadata_node_id;;

/*
std::cout << "d400_info::create_device: " << std::endl;
std::cout << std::hex << pid << std::endl;
std::cout << std::dec << mi << std::endl;
std::cout << unique_id << std::endl;
std::cout << device_path << std::endl;
std::cout << serial << std::endl;
std::cout << std::hex << uvc_capabilities << std::endl;
std::cout << metadata_node_id << std::endl;
*/

switch(pid)
{
case RS400_PID:
Expand Down Expand Up @@ -1461,10 +1449,6 @@ namespace librealsense
std::vector<stream_interface*> streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get() };
std::vector<stream_interface*> mm_streams = { _accel_stream.get(), _gyro_stream.get()};
streams.insert(streams.end(), mm_streams.begin(), mm_streams.end());
// if( frame.frame->find_metadata( RS2_FRAME_METADATA_FRAME_COUNTER, nullptr ) )
// {
// return matcher_factory::create(RS2_MATCHER_DLR_C, streams);
// }
return matcher_factory::create(RS2_MATCHER_DEFAULT, streams);
}

Expand Down
4 changes: 2 additions & 2 deletions src/ds/d400/d400-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace librealsense
const uint16_t RS455_PID = 0x0B5C; // D455
const uint16_t RS457_PID = 0xabcd; // D457
const uint16_t RS457_RECOVERY_PID = 0xbbcd; // D457 DFU Recovery
const uint16_t RS430_GMSL_PID = 0xabce; // D450 GMSL
const uint16_t RS430_GMSL_PID = 0xabce; // D430 GMSL

// d400 Devices supported by the current version
static const std::set<std::uint16_t> rs400_sku_pid = {
Expand Down Expand Up @@ -167,7 +167,7 @@ namespace librealsense
{RS455_PID, "5.13.0.50" },
{RS457_PID, "5.13.1.1" },
{RS457_RECOVERY_PID, "5.13.1.1" },
{RS430_GMSL_PID, "5.16.1.111" },
{RS430_GMSL_PID, "5.16.1.111" }, // TBD - update once formal firmware is available
};

std::vector<platform::uvc_device_info> filter_d400_device_by_capability(
Expand Down
32 changes: 1 addition & 31 deletions src/linux/backend-v4l2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,34 +549,6 @@ namespace librealsense
throw linux_backend_exception(rsutils::string::from() <<__FUNCTION__ << " xioctl(VIDIOC_QUERYCAP) failed");
}


/*
uint8_t gvd[276];
struct v4l2_ext_control ctrl;
memset(gvd,0,276);
ctrl.id = RS_CAMERA_CID_GVD;
ctrl.size = sizeof(gvd);
ctrl.p_u8 = gvd;
struct v4l2_ext_controls ext;
ext.ctrl_class = V4L2_CTRL_CLASS_CAMERA;
ext.controls = &ctrl;
ext.count = 1;
if (ioctl(*fd, VIDIOC_G_EXT_CTRLS, &ext) == 0)
{
// memcpy(buffer, gvd + DS5_CMD_OPCODE_SIZE, 0x110);
for (int i = 0; i < 16; i++)
{
std::cout << std::hex << (int) gvd[i] << std::endl;
}
}
*/

return cap;
}

Expand Down Expand Up @@ -870,7 +842,6 @@ namespace librealsense
// device PID
uint16_t device_pid = 0;

struct v4l2_capability vcap;
int fd = open(dev_name.c_str(), O_RDWR);
if (fd < 0)
throw linux_backend_exception("Mipi device PID could not be found");
Expand Down Expand Up @@ -907,6 +878,7 @@ namespace librealsense
break;

default:
LOG_WARNING("Unidentified MIPI device product id: 0x" << std::hex << (int) product_pid);
device_pid = 0x0000;
break;
}
Expand Down Expand Up @@ -977,8 +949,6 @@ namespace librealsense
device_pid = 0;
}

// the following 2 lines need to be changed in order to enable multiple mipi devices support
// or maybe another field in the info structure - TBD
vid = 0x8086;
pid = device_pid;

Expand Down

0 comments on commit f650ba7

Please sign in to comment.