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

Does not register two consecutive clicks on the same point on the screen #12193

Open
nechtobolshee opened this issue Dec 11, 2024 · 6 comments
Open
Assignees

Comments

@nechtobolshee
Copy link

Expected Behavior

When streaming any video feed into QGC with the tracking feature activated (available in the Daily version), the system should register every click, even if repeated on the same spot after a short interval (e.g., 0.5–1 second). Each registered click should trigger a corresponding MAVLink message.

Current Behavior

Suppose we are streaming any video feed into QGC. In the Daily version, there is a tracking feature. When we activate it, the first click is registered, and an MAVLink message is sent. However, when clicking on the exact same spot again after 0.5–1 second, the click is not registered, and nothing happens.

Steps to Reproduce:

Please provide an unambiguous set of steps to reproduce the current behavior

  1. Pass video stream to QGC
  2. Enable tracking in Daily version
  3. Click on object
  4. Click on the same object again after 0.5-1+ sec.

System Information

  • Operating System: Ubuntu 22.04
  • QGC build: Daily

How can this QGC behavior be fixed to allow repeated clicks on the same spot? Could you please point out the code area responsible for this behavior or suggest a way to resolve it? Thanks.

@HTRamsey
Copy link
Collaborator

Looks like _trackingPoint, _trackingRadius, and _trackingMarquee need to be reset in stopTracking()

@nechtobolshee
Copy link
Author

Thanks for your response!
The main problem in the condition if (_trackingPoint != point || _trackingRadius != radius). On the first click, the point is saved to _trackingPoint, and on the second click, startTracking() is called with the same point. However, the stopTracking() method is not invoked.

@HTRamsey
Copy link
Collaborator

Ah gotcha, just took a brief look at the code. I think @DonLakeFlyer wrote it and should be an easy fix

@nechtobolshee
Copy link
Author

@HTRamsey This question might be slightly off-topic, but how is the incoming video stream processed? I noticed that it is stretched horizontally to fully fill the main screen. Is it possible to change this behavior? I have a square image, and the horizontal stretching causes me to lose a significant portion of the top and bottom areas.

@HTRamsey
Copy link
Collaborator

Huh I could have sworn there were options to set the video fit but I'm not seeing them, any case there will be soon

@DonLakeFlyer
Copy link
Contributor

@chris-hagen Can you take a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants