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

[Discussion] Wake doesn't wake instantly? #22

Open
lucasmontec-fortis opened this issue May 4, 2024 · 0 comments
Open

[Discussion] Wake doesn't wake instantly? #22

lucasmontec-fortis opened this issue May 4, 2024 · 0 comments
Labels
question Further information is requested

Comments

@lucasmontec-fortis
Copy link

Hey, I recently tried keeping the reader sleeping and waking only for reading the current battery... still, it was returning only 0. Does the MAX require a delay before reading info when I call wake?

 int getPercent()
    {
        if(init_fault)
        {
            return -1;
        }

        maxDevice.wake(); //<--- WAKE
        float percent = maxDevice.percent(true); //<--- READ
    	maxDevice.sleep(); //<--- SLEEP

        lastPercent = (int)percent;
        return (int)percent;
    }
@lucasmontec-fortis lucasmontec-fortis added the question Further information is requested label May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant