Skip to content

Commit bda257d

Browse files
authored
Merge pull request #8321 from nightscout/wip/bewest/collaborations
Wip/bewest/collaborations
2 parents 46069a9 + 9195c3c commit bda257d

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
node-version: [14.x, 16.x]
19+
node-version: [14.x, 16.x, 20, lts/*]
2020
mongodb-version: [4.4, 5.0, 6.0]
2121

2222
steps:
@@ -87,4 +87,4 @@ jobs:
8787
platforms: ${{ env.PLATFORMS }}
8888
tags: |
8989
${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }}
90-
${{ env.DOCKER_IMAGE }}:latest
90+
${{ env.DOCKER_IMAGE }}:latest

lib/plugins/openaps.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ function init (ctx) {
392392
function addSuggestion () {
393393
if (prop.lastSuggested) {
394394
var bg = prop.lastSuggested.bg;
395-
var units = sbx.data.profile.getUnits();
395+
var units = sbx.settings.units;
396396

397397
if (units === 'mmol') {
398398
bg = Math.round(bg / consts.MMOL_TO_MGDL * 10) / 10;
@@ -478,9 +478,15 @@ function init (ctx) {
478478

479479
if ('enacted' === prop.status.code) {
480480
var canceled = prop.lastEnacted.rate === 0 && prop.lastEnacted.duration === 0;
481+
var bg = prop.lastEnacted.bg;
482+
var units = sbx.settings.units;
483+
484+
if (units === 'mmol') {
485+
bg = Math.round(bg / consts.MMOL_TO_MGDL * 10) / 10;
486+
}
481487

482488
var valueParts = [
483-
valueString('BG: ', prop.lastEnacted.bg)
489+
valueString('BG: ', bg)
484490
, ', <b>Temp Basal' + (canceled ? ' Canceled' : ' Started') + '</b>'
485491
, canceled ? '' : ' ' + prop.lastEnacted.rate.toFixed(2) + ' for ' + prop.lastEnacted.duration + 'm'
486492
, valueString(', ', prop.lastEnacted.reason)

lib/server/bootevent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function boot (env, language) {
3838

3939
const isLTS = process.release.lts ? true : false;
4040

41-
if (isLTS && (semver.satisfies(nodeVersion, '^20.0.0') || semver.satisfies(nodeVersion, '^18.0.0') || semver.satisfies(nodeVersion, '^16.0.0') || semver.satisfies(nodeVersion, '^14.0.0'))) {
41+
if (isLTS || (semver.satisfies(nodeVersion, '^20.0.0') || semver.satisfies(nodeVersion, '^18.0.0') || semver.satisfies(nodeVersion, '^16.0.0') || semver.satisfies(nodeVersion, '^14.0.0'))) {
4242
//Latest Node 14 LTS and Node 16 LTS are recommended and supported.
4343
//Require at least Node 14 without known security issues
4444
console.debug('Node LTS version ' + nodeVersion + ' is supported');

0 commit comments

Comments
 (0)