-
-
Notifications
You must be signed in to change notification settings - Fork 473
Enable to reset image display when new image has not been received for a while #1852
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
Conversation
rhaschke
left a comment
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.
Interesting feature, but the implementation seems to be overly complicated.
You are running a periodic QTimer and update the timeout_time_ in its associated slot. Instead, you could simply update a last_received_ timestamp within incomingMessage() and directly call reset() in the slot function.
Are you fearing data races?
| { | ||
| if (reset_to_property_->getBool()) | ||
| { | ||
| reset_to_timer_->start(33); |
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.
Why this fixed timeout value? How is it motivated?
rhaschke
left a comment
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.
Some more comments.
|
@rhaschke Thank you very much for your support, and I am deeply sorry for my super late response. |
|
I changed the default behavior deliberatively to report issues after 1s. |
|
I see. Thank you very much! |
With this PR, you can switch on
Reset When Timed Outfunction, which makes image display show "No Image" again when new image has not been received forTimeoutseconds.This PR makes it easier to notice that the image publisher is in trouble.
Before this PR
Screencast.2025-07-11.19.46.35.compressed.mp4
After this PR
Screencast.2025-07-11.19.51.45.compressed.mp4
Note that the default state of
Reset When Timed Outis OFF, which leads to the same behavior before this PR.