mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-03 17:02:13 +01:00
Bangle.js: Increase default realtime HRM/step interval to 10 seconds
Disable manual heart rate measurement - the current implementation in Gadgetbridge seems not really compatible with Bangle.js. There's no way to turn the HRM off when the window is closed, and HRM samples from *any* device would appear to be shown - not just the one that HRM info was requested on
This commit is contained in:
parent
028f9fe225
commit
521edc4332
@ -139,6 +139,17 @@ public class BangleJSCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsManualHeartRateMeasurement(GBDevice device) {
|
||||
/* we could do this, but the current code for onHeartRateTest
|
||||
looks completely broken. There's no way to stop heart rate measurements
|
||||
and it doesn't even appear to care what device it's getting the current
|
||||
heart rate measurements from. Fixing it is too much work so disabling
|
||||
for now.
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAlarmSlotCount() {
|
||||
return 10;
|
||||
|
@ -146,7 +146,8 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
||||
private String receiveHistory = "";
|
||||
private boolean realtimeHRM = false;
|
||||
private boolean realtimeStep = false;
|
||||
private int realtimeHRMInterval = 30*60;
|
||||
/// How often should activity data be sent - in seconds
|
||||
private int realtimeHRMInterval = 10;
|
||||
/// Last battery percentage reported (or -1) to help with smoothing reported battery levels
|
||||
private int lastBatteryPercent = -1;
|
||||
|
||||
@ -450,6 +451,7 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
||||
LOG.info("UART RX JSON parse failure: "+ e.getLocalizedMessage());
|
||||
GB.toast(getContext(), "Malformed JSON from Bangle.js: " + e.getLocalizedMessage(), Toast.LENGTH_LONG, GB.ERROR);
|
||||
}
|
||||
|
||||
} else {
|
||||
LOG.info("UART RX line started with "+(int)line.charAt(0)+" - ignoring");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user