Skip to content

Commit

Permalink
PR #12255 from OhadMeir: Add support to update multiple MIPI devices …
Browse files Browse the repository at this point in the history
…in rs-fw-update tool
  • Loading branch information
Nir-Az authored Oct 4, 2023
2 parents 99c9420 + b4d7195 commit 9b66e93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/fw-update/rs-fw-update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ void list_devices(rs2::context ctx)
}
}

int write_fw_to_mipi_device( const std::vector< uint8_t > & fw_image)
int write_fw_to_mipi_device( const rs2::device & dev, const std::vector< uint8_t > & fw_image )
{
// Write firmware to appropriate file descritptor
std::cout << std::endl << "Update can take up to 2 minutes" << std::endl;
std::ofstream fw_path_in_device( "/dev/d4xx-dfu504", std::ios::binary );
std::ofstream fw_path_in_device( dev.get_info( RS2_CAMERA_INFO_DFU_DEVICE_PATH ), std::ios::binary );
auto file_deleter = std::unique_ptr< std::ofstream, void ( * )( std::ofstream * ) >( &fw_path_in_device,
[]( std::ofstream * file )
{
Expand Down Expand Up @@ -452,7 +452,7 @@ try
return EXIT_FAILURE;
}

return write_fw_to_mipi_device( fw_image );
return write_fw_to_mipi_device( d, fw_image );
}

if (unsigned_arg.isSet())
Expand Down

0 comments on commit 9b66e93

Please sign in to comment.