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

Bangle.js: Crashes occasionally when getting battery level and using HRM #1861

Closed
gfwilliams opened this issue Jun 13, 2020 · 1 comment
Closed

Comments

@gfwilliams
Copy link
Member

http://forum.espruino.com/conversations/349185/#comment15344704

It's a conflict between using the ADC in an IRQ and in the main event loop.

I guess the simple solution is just to read the battery level in the accelerometer data handler so we're not doing it outside the IRQ, but maybe some kind of locking in jshAnalogRead would be better

@gfwilliams
Copy link
Member Author

Depending where the crash is, jshAnalogRead could just detect if another read has happened while it was trying, and then could try again

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

1 participant