-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FW update exception fix #8018
FW update exception fix #8018
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SR300 DFU handling should be adjusted as wel, similar to D400 and L515
_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!"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reword with "Device failed to switch to DFU within the predefined time"
src/ds5/ds5-device.cpp
Outdated
|
||
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 < 10; i++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Increase iterations count to cover 1000msec
Comment in code as to how the mechanism is expected to work
@@ -435,12 +435,26 @@ namespace librealsense | |||
{ | |||
// Stop all data streaming/exchange pipes with HW | |||
stop_activity(); | |||
using namespace std; | |||
using namespace std::chrono; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case use of explicit std::this_thread... std::chrono:millisec(..)
is preferred
src/l500/l500-device.cpp
Outdated
|
||
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 < 25; i++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The counter here and for DS5.cpp should probably be synchronized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be merged
When FW update runs, the device disconnects when it switches to DFU.
Exception is thrown when FW update calls query devices while device still connected (not switch to DFU already).
In this fix, after sending the command of switching device to DFU, I checked when device is disconnected then continue to next step of querying devices.
Tracked on DSO-16069