allow log messages

pull/2707/head
Gordon Williams 2023-04-24 10:56:01 +01:00
parent c9cce8ca9c
commit b7d49cbbf8
3 changed files with 8 additions and 2 deletions

View File

@ -1,6 +1,6 @@
# Bluetooth Heart Rate Monitor
When this app is installed it overrides Bangle.js's build in heart rate monitor with an external Bluetooth one.
When this app is installed it overrides Bangle.js's built in heart rate monitor with an external Bluetooth one.
HRM is requested it searches on Bluetooth for a heart rate monitor, connects, and sends data back using the `Bangle.on('HRM')` event as if it came from the on board monitor.
@ -44,7 +44,7 @@ So far it has been tested on:
## Recorder plugin
The recorder plugin can record the BT HRM event (blue) and the original unchanged HRM event (green). This is mainly useful for debugging purposes or comparing the BT with the internal HRM, as the resulting "merged" HRM can be recordet using the default HRM recorder.
The recorder plugin can record the BT HRM event (blue) and the original unchanged HRM event (green). This is mainly useful for debugging purposes or comparing the BT with the internal HRM, as the resulting "merged" HRM can be recorded using the default HRM recorder.
## Internals

View File

@ -37,6 +37,8 @@ So far it has been tested on:
This replaces `Bangle.setHRMPower` with its own implementation.
To get debug info, you can call `Bangle.enableBTHRMLog()` in the IDE to enable log messages.
## Creator
Gordon Williams

View File

@ -2,6 +2,10 @@
var log = function() {};//print
var gatt;
Bangle.enableBTHRMLog = function() {
log = print;
};
Bangle.setHRMPower = function(isOn, app) {
// Do app power handling
if (!app) app="?";