Skip to content

Commit

Permalink
Merge pull request #8321 from nightscout/wip/bewest/collaborations
Browse files Browse the repository at this point in the history
Wip/bewest/collaborations
  • Loading branch information
bewest authored Dec 14, 2024
2 parents 46069a9 + 9195c3c commit bda257d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -87,4 +87,4 @@ jobs:
platforms: ${{ env.PLATFORMS }}
tags: |
${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }}
${{ env.DOCKER_IMAGE }}:latest
${{ env.DOCKER_IMAGE }}:latest
10 changes: 8 additions & 2 deletions lib/plugins/openaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
, ', <b>Temp Basal' + (canceled ? ' Canceled' : ' Started') + '</b>'
, canceled ? '' : ' ' + prop.lastEnacted.rate.toFixed(2) + ' for ' + prop.lastEnacted.duration + 'm'
, valueString(', ', prop.lastEnacted.reason)
Expand Down
2 changes: 1 addition & 1 deletion lib/server/bootevent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit bda257d

Please sign in to comment.