Skip to content

Commit

Permalink
Merge pull request #1612 from tidepool-org/ultra-plus-flex
Browse files Browse the repository at this point in the history
Add support for OneTouch Ultra Plus Flex meter (UPLOAD-1175)
  • Loading branch information
gniezen authored Oct 31, 2024
2 parents 6b7d359 + 5c24172 commit 5e64192
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tidepool-uploader",
"productName": "tidepool-uploader",
"version": "2.59.1-false-av.1",
"version": "2.59.1-ultra-plus-flex.3",
"description": "Tidepool Project Universal Uploader",
"main": "./main.prod.js",
"author": {
Expand Down
10 changes: 9 additions & 1 deletion app/reducers/devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,17 @@ const devices = {
enabled: {linux: false, mac: false, win: true},
powerOnlyWarning: true,
},
onetouchultraplus: {
instructions: i18n.t('Plug in meter with micro-USB'),
name: 'OneTouch Ultra Plus Flex',
key: 'onetouchultraplus',
source: {type: 'device', driverId: 'OneTouchUltraPlus'},
enabled: {linux: true, mac: true, win: true},
powerOnlyWarning: true,
},
onetouchverioble: {
instructions: i18n.t('Turn meter on and make sure Bluetooth is switched on'),
name: 'OneTouch Verio Flex, Verio Reflect & Select Plus Flex (with Bluetooth)',
name: 'OneTouch Verio Flex, Verio Reflect, Select Plus Flex and Ultra Plus Flex (with Bluetooth)',
key: 'onetouchverioble',
source: {type: 'device', driverId: 'OneTouchVerioBLE'},
enabled: {mac: true, win: true, linux: true}
Expand Down
5 changes: 4 additions & 1 deletion lib/core/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ device.deviceDrivers = {
OneTouchVerioIQ: oneTouchVerioIQ,
OneTouchVerioBLE: oneTouchVerioBLE,
OneTouchSelect: oneTouchVerio,
OneTouchUltraPlus: oneTouchVerio,
AbbottFreeStyleLite: abbottFreeStyleLite,
AbbottFreeStyleLibre: abbottFreeStyleLibre,
AbbottFreeStyleNeo: abbottFreeStyleNeo,
Expand Down Expand Up @@ -120,6 +121,7 @@ device.deviceComms = {
OneTouchVerioIQ: serialDevice,
OneTouchVerioBLE: bleDevice,
OneTouchSelect: usbDevice,
OneTouchUltraPlus: usbDevice,
AbbottFreeStyleLite: serialDevice,
AbbottFreeStyleLibre: hidDevice,
AbbottFreeStyleNeo: hidDevice,
Expand Down Expand Up @@ -338,7 +340,8 @@ device.detect = (driverId, options, cb) => {
if (webUSBDevice == null && (
driverId === 'InsuletOmniPod' ||
driverId === 'OneTouchVerio' ||
driverId === 'OneTouchSelect'
driverId === 'OneTouchSelect' ||
driverId === 'OneTouchUltraPlus'
)) {
// could also be block mode device
device.deviceInfoCache[driverId] = _.cloneDeep(devdata);
Expand Down
6 changes: 6 additions & 0 deletions lib/core/driverManifests.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ const driverManifests = {
{ vendorId: 10086, productId: 4100 }, // Select Plus Flex
],
},
OneTouchUltraPlus: {
mode: 'usb',
usb: [
{ vendorId: 10086, productId: 14 }, // Ultra Plus Flex
],
},
OneTouchUltraMini: {
mode: 'serial',
usb: [
Expand Down
2 changes: 1 addition & 1 deletion lib/drivers/onetouch/oneTouchVerio.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class USBScsiDevice {
return callback(new Error(`Could not find device "${deviceInfo.driverId}".`));
}

this.device = findByIds(deviceInfo.usbDevice.vendorId, deviceInfo.usbDevice.productId);
this.device = findByIds(deviceInfo?.usbDevice?.vendorId, deviceInfo?.usbDevice?.productId);
if (!this.device) {
return callback(new Error(`Failed to open connection to ${deviceInfo.driverId}`));
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tidepool-uploader",
"version": "2.59.1-false-av.1",
"version": "2.59.1-ultra-plus-flex.3",
"description": "Tidepool Project Universal Uploader",
"private": true,
"main": "main.prod.js",
Expand Down

0 comments on commit 5e64192

Please sign in to comment.