Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for Fora TN'G Voice meter (UPLOAD-1447) #1678

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lib/drivers/bluetoothLE/bluetoothLEDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ module.exports = (config) => {
return cb (new Error('We don\'t currently support this meter.'));
}

if (cfg.deviceInfo.manufacturers == null && cfg.deviceInfo.name.startsWith('TNG')) {
if (cfg.deviceInfo.name.startsWith('TNG')) {
// Fora meters don't set the BLE manufacturer string
cfg.deviceInfo.manufacturers = ['ForaCare'];
}
Expand Down Expand Up @@ -249,9 +249,14 @@ module.exports = (config) => {
cfg.deviceComms.ble.addEventListener('numberOfRecords', handleNumberOfRecords, { once: true });

setTimeout(async () => {

retryTimer = setTimeout(async () => {
debug('Retrying..');
await cfg.deviceComms.ble.getNumberOfRecords();
try{
await cfg.deviceComms.ble.getNumberOfRecords();
} catch(err) {
console.log('Retry failed:', err);
}
}, 1000);

try {
Expand Down
3 changes: 2 additions & 1 deletion locales/en/translation.missing.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,6 @@
"login to your account in Tidepool Web": "login to your account in Tidepool Web",
"Go to Workspace": "Go to Workspace",
"Want to use Tidepool for your private data?": "Want to use Tidepool for your private data?",
"Go to Private Workspace": "Go to Private Workspace"
"Go to Private Workspace": "Go to Private Workspace",
"Couldn't connect to device.": "Couldn't connect to device."
}