adafruit / Bluefruit_LE_Connect_Android_V2

Bluefruit LE Connect Android source code (V2)
MIT License
92 stars 76 forks source link

Change controller sensor data interval to match documentation #27

Open RealAbsurdity opened 1 year ago

RealAbsurdity commented 1 year ago

The Bluefruit LE Connect guide section on Sensors indicates that phone sensor data, except GPS, is transmitted 10 times per second. In the current version of the app it is sent two times per second.

https://github.com/adafruit/Bluefruit_LE_Connect_Android_V2/blob/00b7545d4d69672c5e9b78e58ba3770a94d3a088/app/src/main/java/com/adafruit/bluefruit/le/connect/app/ControllerFragment.java#L71

A simple change of the kSendDataInterval value from 500 to 100 corrects this behavior for all sensors except GPS.

It seems as though the data rate is not dependent on which sensor's data is enabled in the android version.

Tested in android studio with wireless debug on a pixel 5.