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

Add option to prevent halt when NFC tag not found on begin() #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smartin015
Copy link

I'm working on a project where an NFC reader may not always be attached. The current implementation of begin() halts if the device isn't found on init - this is kind of a dealbreaker for my use case.

So, my change adds an optional flag to NfcAdapter::begin() that allows the user to bypass the halt behavior. The behavior without specifying this flag is unchanged, so there should be no worry about backwards compatibility.

I've also made begin() return true if the NFC board was initialized, and false otherwise to aid in potential sensing / retry logic on the user side.

Thanks for maintaining this great repo :)

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.

1 participant