Skip to content

Commit

Permalink
Support Dexcom HIGH/LOW when device is share2
Browse files Browse the repository at this point in the history
Using share2nightscout-bridge, the device property is defined as 'share2'

displayBg should honour the Dexcom HIGH and LOW values when the device is share2

This ensures that NightScout returns "LOW" for 39mg/dl and "HIGH" for 401mg/dl as is reported in the Dexcom app/receiver.
  • Loading branch information
cpitchford authored Dec 2, 2021
1 parent d8d2c2e commit b9c8950
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sandbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function init () {
};

sbx.displayBg = function displayBg (entry) {
var isDex = entry && (!entry.device || entry.device === 'dexcom');
var isDex = entry && (!entry.device || entry.device === 'dexcom' || entry.device === 'share2');
if (isDex && Number(entry.mgdl) === 39) {
return 'LOW';
} else if (isDex && Number(entry.mgdl) === 401) {
Expand Down

0 comments on commit b9c8950

Please sign in to comment.