Hi - the barometer is 'polled' by the same code that handles the accelerometer as you noted. I think the issue you're hitting is the accelerometer power saving code (which detects when the Bangle isn't moves, and goes to a lower poll rate to save power).
Or the reason it's resetting after you call setPollInterval(80) is that 80ms is the default poll interval, so it's seeing that and is then thinking it's the default so it's ok to change to the low power mode. If you did setPollInterval(75) you'd probably find it stayed at 75ms just fine.
Does anyone know how to control the barometer sampling rate? And how reliable this sampling rate is?
I don't know for sure, but I wouldn't think the same rate is super reliable either way. Depending on whether you have a KickStarter Bangle.js 2 or have bought one later there's a different barometer, so that'll change the behaviour too.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi - the barometer is 'polled' by the same code that handles the accelerometer as you noted. I think the issue you're hitting is the accelerometer power saving code (which detects when the Bangle isn't moves, and goes to a lower poll rate to save power).
You could use
Bangle.setOptions({powerSave:false})
to stop it happening: http://www.espruino.com/Reference#l_Bangle_setOptionsOr the reason it's resetting after you call
setPollInterval(80)
is that 80ms is the default poll interval, so it's seeing that and is then thinking it's the default so it's ok to change to the low power mode. If you didsetPollInterval(75)
you'd probably find it stayed at 75ms just fine.I don't know for sure, but I wouldn't think the same rate is super reliable either way. Depending on whether you have a KickStarter Bangle.js 2 or have bought one later there's a different barometer, so that'll change the behaviour too.