Skip to content

Commit

Permalink
Revert "Merge pull request IntelRealSense#8018 from nohayassin/DSO_16…
Browse files Browse the repository at this point in the history
…069"

This reverts commit d7a1a78, reversing
changes made to 011d869.
  • Loading branch information
Nir-Az committed Apr 22, 2021
1 parent add79a2 commit 4279711
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 45 deletions.
4 changes: 0 additions & 4 deletions common/fw-update-helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,6 @@ namespace rs2
if (_is_signed)
{
log("Requesting to switch to recovery mode");

// in order to update device to DFU state, it will be disconnected then switches to DFU state
// if querying devices is called while device still switching to DFU state, an exception will be thrown
// to prevent that, a blocking is added to make sure device is updated before continue to next step of querying device
upd.enter_update_state();
// Allow time for the device to disconnect before calling "query_devices"
std::this_thread::sleep_for(std::chrono::seconds(2));
Expand Down
14 changes: 0 additions & 14 deletions src/ds5/ds5-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,26 +134,12 @@ namespace librealsense
{
// Stop all data streaming/exchange pipes with HW
stop_activity();
using namespace std;
using namespace std::chrono;

try {
LOG_INFO("entering to update state, device disconnect is expected");
command cmd(ds::DFU);
cmd.param1 = 1;
_hw_monitor->send(cmd);
std::vector<uint8_t> gvd_buff(HW_MONITOR_BUFFER_SIZE);
for (auto i = 0; i < 50; i++)
{
_hw_monitor->get_gvd(gvd_buff.size(), gvd_buff.data(), ds::GVD);
this_thread::sleep_for(milliseconds(50));
}
throw std::runtime_error("Device still connected!");

}
catch (std::exception& e)
{
LOG_WARNING(e.what());
}
catch (...) {
// The set command returns a failure because switching to DFU resets the device while the command is running.
Expand Down
13 changes: 0 additions & 13 deletions src/ivcam/sr300.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,24 +336,11 @@ namespace librealsense
{
// Stop all data streaming/exchange pipes with HW
stop_activity();
using namespace std;
using namespace std::chrono;

try {
command cmd(ivcam::GoToDFU);
cmd.param1 = 1;
_hw_monitor->send(cmd);
std::vector<uint8_t> gvd_buff(HW_MONITOR_BUFFER_SIZE);
for (auto i = 0; i < 50; i++)
{
_hw_monitor->get_gvd(gvd_buff.size(), gvd_buff.data(), ds::GVD);
this_thread::sleep_for(milliseconds(50));
}
throw std::runtime_error("Device still connected!");
}
catch (std::exception& e)
{
LOG_WARNING(e.what());
}
catch (...) {
// The set command returns a failure because switching to DFU resets the device while the command is running.
Expand Down
14 changes: 0 additions & 14 deletions src/l500/l500-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,26 +453,12 @@ namespace librealsense
{
// Stop all data streaming/exchange pipes with HW
stop_activity();
using namespace std;
using namespace std::chrono;

try {
LOG_INFO("entering to update state, device disconnect is expected");
command cmd(ivcam2::DFU);
cmd.param1 = 1;
_hw_monitor->send(cmd);
std::vector<uint8_t> gvd_buff(HW_MONITOR_BUFFER_SIZE);
for (auto i = 0; i < 50; i++)
{

_hw_monitor->get_gvd(gvd_buff.size(), gvd_buff.data(), GVD);
this_thread::sleep_for(milliseconds(50));
}
throw std::runtime_error("Device still connected!");

}
catch (std::exception& e) {
LOG_WARNING(e.what());
}
catch (...) {
// The set command returns a failure because switching to DFU resets the device while the command is running.
Expand Down

0 comments on commit 4279711

Please sign in to comment.