From 050d4e59a9d133c4c144c4a9341bec1d12c1311e Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 26 Jun 2023 13:16:24 +0200 Subject: [PATCH 1/2] skip_NetralTemps only if SMB's somehow disabled --- lib/determine-basal/determine-basal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/determine-basal/determine-basal.js b/lib/determine-basal/determine-basal.js index 5e3ee78b8..3d4177ebb 100644 --- a/lib/determine-basal/determine-basal.js +++ b/lib/determine-basal/determine-basal.js @@ -922,8 +922,8 @@ var maxDelta_bg_threshold; // if not in LGS mode, cancel temps before the top of the hour to reduce beeping/vibration // console.error(profile.skip_neutral_temps, rT.deliverAt.getMinutes()); - if ( profile.skip_neutral_temps && rT.deliverAt.getMinutes() >= 55 ) { - rT.reason += "; Canceling temp at " + rT.deliverAt.getMinutes() + "m past the hour. "; + if ( profile.skip_neutral_temps && !enableSMB && rT.deliverAt.getMinutes() >= 55 ) { + rT.reason += "; Canceling temp at " + (60 - rT.deliverAt.getMinutes()) + "min before turn of the hour to avoid beeping of MDT. SMB disabled anyways."; return tempBasalFunctions.setTempBasal(0, 0, profile, rT, currenttemp); } From a823cf48bbd27eb7930fbf3fd6e698c8caf450e7 Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 27 Jun 2023 07:36:50 +0200 Subject: [PATCH 2/2] log message for not skipping neutral temps while SMB's are possible --- lib/determine-basal/determine-basal.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/determine-basal/determine-basal.js b/lib/determine-basal/determine-basal.js index 3d4177ebb..87ef00ae3 100644 --- a/lib/determine-basal/determine-basal.js +++ b/lib/determine-basal/determine-basal.js @@ -922,9 +922,13 @@ var maxDelta_bg_threshold; // if not in LGS mode, cancel temps before the top of the hour to reduce beeping/vibration // console.error(profile.skip_neutral_temps, rT.deliverAt.getMinutes()); - if ( profile.skip_neutral_temps && !enableSMB && rT.deliverAt.getMinutes() >= 55 ) { - rT.reason += "; Canceling temp at " + (60 - rT.deliverAt.getMinutes()) + "min before turn of the hour to avoid beeping of MDT. SMB disabled anyways."; - return tempBasalFunctions.setTempBasal(0, 0, profile, rT, currenttemp); + if ( profile.skip_neutral_temps && rT.deliverAt.getMinutes() >= 55 ) { + if (!enableSMB) { + rT.reason += "; Canceling temp at " + (60 - rT.deliverAt.getMinutes()) + "min before turn of the hour to avoid beeping of MDT. SMB disabled anyways."; + return tempBasalFunctions.setTempBasal(0, 0, profile, rT, currenttemp); + } else { + console.error((60 - rT.deliverAt.getMinutes()) + "min before turn of the hour, but SMB's are enabled - no skipping neutral temps") + } } if (eventualBG < min_bg) { // if eventual BG is below target: