Skip to content
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

Replace GVD queries with device update notification to verify device removal during DFU #8913

Merged
merged 4 commits into from May 4, 2021

Conversation

Nir-Az
Copy link
Collaborator

@Nir-Az Nir-Az commented Apr 27, 2021

We add a ~6 seconds maximum loop to verify the device is disconnected after the DFU command (replacing HWM calls)

This partly reverts PR #8018 which caused freezes after DFUs.

Tracked on [RS5-11058]

@maloel
Copy link
Collaborator

maloel commented Apr 27, 2021

How come it's only one commit? Why don't I see a revert followed by your changes?

src/context.h Outdated
@@ -43,7 +43,7 @@ namespace librealsense
class device_info
{
public:
virtual std::shared_ptr<device_interface> create_device(bool register_device_notifications = false) const
virtual std::shared_ptr<device_interface> create_device(bool register_device_notifications = true) const
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we checked that we always use the default arg?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parameter was removed, create device will always create it with a callback.
Verified playback work as expected.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

network device does not inherent device so it's good too.

src/ds5/ds5-device.cpp Outdated Show resolved Hide resolved
src/ds5/ds5-device.cpp Outdated Show resolved Hide resolved
src/ivcam/sr300.cpp Outdated Show resolved Hide resolved
src/ivcam/sr300.cpp Outdated Show resolved Hide resolved
src/ds5/ds5-device.cpp Outdated Show resolved Hide resolved
src/l500/l500-device.cpp Outdated Show resolved Hide resolved
src/ivcam/sr300.cpp Outdated Show resolved Hide resolved
src/backend.h Outdated Show resolved Hide resolved
src/ivcam/sr300.cpp Outdated Show resolved Hide resolved
@@ -256,7 +256,7 @@ namespace librealsense
}
}

return ctx->add_device(file)->create_device(false);
return ctx->add_device(file)->create_device();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So playback device will get notifications now? Can it even be "removed"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, playback device override the create_device() function and is not calling the function we change it's defaults.
So it's OK, nothing changed there.

@maloel maloel changed the title Use device connection status to verify enter_update_state call enter DFU Replace GVD queries with device update notification to verify device removal during DFU May 4, 2021
@maloel maloel merged commit 2ba3ca5 into IntelRealSense:development May 4, 2021
@Nir-Az Nir-Az deleted the fix_dfu_is_stuck branch July 27, 2021 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants