diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b3d49dc6332..be07a1061bb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x, 16.x] + node-version: [14.x, 16.x, 20, lts/*] mongodb-version: [4.4, 5.0, 6.0] steps: @@ -87,4 +87,4 @@ jobs: platforms: ${{ env.PLATFORMS }} tags: | ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }} - ${{ env.DOCKER_IMAGE }}:latest \ No newline at end of file + ${{ env.DOCKER_IMAGE }}:latest diff --git a/lib/plugins/openaps.js b/lib/plugins/openaps.js index 81e7bc25a05..3b3136a274b 100644 --- a/lib/plugins/openaps.js +++ b/lib/plugins/openaps.js @@ -392,7 +392,7 @@ function init (ctx) { function addSuggestion () { if (prop.lastSuggested) { var bg = prop.lastSuggested.bg; - var units = sbx.data.profile.getUnits(); + var units = sbx.settings.units; if (units === 'mmol') { bg = Math.round(bg / consts.MMOL_TO_MGDL * 10) / 10; @@ -478,9 +478,15 @@ function init (ctx) { if ('enacted' === prop.status.code) { var canceled = prop.lastEnacted.rate === 0 && prop.lastEnacted.duration === 0; + var bg = prop.lastEnacted.bg; + var units = sbx.settings.units; + + if (units === 'mmol') { + bg = Math.round(bg / consts.MMOL_TO_MGDL * 10) / 10; + } var valueParts = [ - valueString('BG: ', prop.lastEnacted.bg) + valueString('BG: ', bg) , ', Temp Basal' + (canceled ? ' Canceled' : ' Started') + '' , canceled ? '' : ' ' + prop.lastEnacted.rate.toFixed(2) + ' for ' + prop.lastEnacted.duration + 'm' , valueString(', ', prop.lastEnacted.reason) diff --git a/lib/server/bootevent.js b/lib/server/bootevent.js index b377abcce98..7f09e130095 100644 --- a/lib/server/bootevent.js +++ b/lib/server/bootevent.js @@ -38,7 +38,7 @@ function boot (env, language) { const isLTS = process.release.lts ? true : false; - 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'))) { + 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'))) { //Latest Node 14 LTS and Node 16 LTS are recommended and supported. //Require at least Node 14 without known security issues console.debug('Node LTS version ' + nodeVersion + ' is supported');