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

Error logged when circular buffer is empty #328

Closed
rixius opened this issue Mar 14, 2024 · 6 comments
Closed

Error logged when circular buffer is empty #328

rixius opened this issue Mar 14, 2024 · 6 comments

Comments

@rixius
Copy link
Contributor

rixius commented Mar 14, 2024

CoreViewerLink._update_viewer() causes MM to log lots of errors when the circular buffer is empty:

2024-03-14T11:12:27.488274 tid17768 [ERR,Core] Error occurred in device CMMCore::getLastImage: Circular buffer is empty.

Solution: I added

        if self._mmc.getRemainingImageCount() == 0:
            return

before the try-statement to suppress this.

(Note that the error is visible only when logging is enabled which I often do.)

@tlambert03
Copy link
Member

hey @rixius, I'm happy to add this. And would be even happier if I could entice you to open a PR :) it's nice to have others looking at the codebase. Let me know if you don't have time and I can add it myself

@rixius
Copy link
Contributor Author

rixius commented Mar 14, 2024

Sure, I will. I assumed that I require permissions first to push code to the repository and create a PR.

@tlambert03
Copy link
Member

I assumed that I require permissions first to push code to the repository and create a PR.

You would make the changes to a personal fork, and then create a PR. Happy to help get you started! Here are the steps you would need to follow:

  1. Fork this repo. On the main page of this repo click "fork"
    Screenshot 2024-03-14 at 10 16 58 AM
  2. In your fork, create a new branch
  3. In that new branch, make desired changes (you can either clone your fork to your local computer and then push them back to github, or you can directly edit the file in github
  4. Once you've made the changes create a pull request

If any of that is confusing, or if you just want me to do it :) let me know!

@rixius
Copy link
Contributor Author

rixius commented Mar 14, 2024

I think I'm getting there, need another try...

@tlambert03
Copy link
Member

no, no you did great! you can open it again. if you're worried about the tests failing, don't worry, i think those were not your issue

@tlambert03
Copy link
Member

Thanks for the fix!

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

2 participants