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

clear frame buffer #7

Open
ghost opened this issue Apr 10, 2024 · 1 comment
Open

clear frame buffer #7

ghost opened this issue Apr 10, 2024 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 10, 2024

@beniroquai
clear frame buffer, so that Python selects the correct image

@beniroquai
Copy link
Collaborator

I think I found the error in @ranranking's setup (too). So the issue may be that multiple instances are trying to access the getLatestFrame function and then weird things happen to the frameID.

To get rid of it, we should check the frameid externally like this:

                            mFrame = None
                            lastFrameNumber = -1
                            for iFrame in range(self.nsimFrameSyncVal):
                                mFrame, frameNumber = self.detector.getLatestFrame(returnFrameNumber=True)
                                if frameNumber == lastFrameNumber:
                                    time.sleep(0.05)
                                    continue  
                                lastFrameNumber = frameNumber
                                print(f"Frame number: {frameNumber}") 

I'm still testing, but I guess this is it.

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

No branches or pull requests

1 participant