Skip to content

Commit 099e775

Browse files
authored
PR #13385 from Eran: fix rs-fw-update wait for device to reconnect
2 parents 52c8db2 + 2759a60 commit 099e775

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tools/fw-update/rs-fw-update.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ std::vector<uint8_t> read_firmware_data(bool is_set, const std::string& file_pat
100100
}
101101

102102

103-
void update(rs2::update_device fwu_dev, std::vector<uint8_t> fw_image)
104-
{
103+
void update( rs2::update_device fwu_dev, std::vector< uint8_t > const & fw_image )
104+
{
105105
std::cout << std::endl << "Firmware update started. Please don't disconnect device!"<< std::endl << std::endl;
106-
106+
107107
if (ISATTY(FILENO(stdout)))
108108
{
109109
fwu_dev.update(fw_image, [&](const float progress)
@@ -528,7 +528,8 @@ try
528528
}
529529
}
530530

531-
update( new_fw_update_device, fw_image );
531+
new_device = rs2::device(); // otherwise the wait will exit right away
532+
update( new_fw_update_device, fw_image );
532533

533534
done = true;
534535
break;

0 commit comments

Comments
 (0)