Skip to content

Conversation

@AviaAv
Copy link
Contributor

@AviaAv AviaAv commented Jul 22, 2024

Tracked on: [LRS-1170]

@AviaAv AviaAv requested a review from Nir-Az July 22, 2024 06:58

ctx = rs.context()
device = test.find_first_device_or_exit();
device, ctx = test.find_first_device_or_exit();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please try using this when not using both params.
image

dev, ctx = test.find_first_device_or_exit()
ctx.set_devices_changed_callback( device_changed )
log.out( "Sending HW-reset command" )
time.sleep(1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please shift this line about the comment
Something like:

# allowing some time for the system to stabilize
time.sleep(1)

log.out( "Sending HW-reset command" )
dev.hardware_reset()


max_dev_enum_time = get_max_enum_rime_by_device( dev )
log.out( "Sending HW-reset command" )
time.sleep(1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as before

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@Nir-Az Nir-Az merged commit fc68a9d into realsenseai:development Jul 23, 2024
@maloel
Copy link
Contributor

maloel commented Jul 23, 2024

We really need to work on our descriptions...

@maloel
Copy link
Contributor

maloel commented Jul 23, 2024

What's the sleep for?

@AviaAv AviaAv changed the title Update find_first_device_or_exit - hw reset test improve Reuse context from 'find_first_device_or_exit()' & hw reset test stability improvment Jul 23, 2024
@Nir-Az
Copy link
Collaborator

Nir-Az commented Jul 23, 2024

What's the sleep for?

Trying to make the LibCI tests more robust.
Doing HW reset that fast after enumeration can sometimes fail, we see it more on SC and investigate it with them.
But that's not a common use case that after enumeration the user will command a HW-reset, so we ease it on the unit tests.

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.

3 participants