hemanthrajv / flutter_compass

MIT License
101 stars 170 forks source link

FR: Update API to allow setting refresh rate #96

Open bramp opened 1 year ago

bramp commented 1 year ago

The refresh rate is every ~32ms (Android, and iOS). I noticed my app spends more time than it should dealing with compass updates, and I'd happily receive them at a slower rate.

Would it be possible to change the API to make that configurable? Perhaps as arguments to the FlutterCompass constructor?

For now I rate limit myself, but it would be good if this rate limit goes all the way up to the OS.