From 7153b43542e62861aeb7ea16c5e4f178382d9c7a Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 9 Dec 2024 08:11:30 +0100 Subject: [PATCH] skip_NetralTemps only if SMB's somehow disabled log message for not skipping neutral temps while SMB's are possible --- lib/determine-basal/determine-basal.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/determine-basal/determine-basal.js b/lib/determine-basal/determine-basal.js index 96204d80..805d2167 100644 --- a/lib/determine-basal/determine-basal.js +++ b/lib/determine-basal/determine-basal.js @@ -1693,8 +1693,12 @@ 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. "; - return tempBasalFunctions.setTempBasal(0, 0, profile, rT, currenttemp); + if (!enableSMB) { + rT.reason += "; Canceling temp at " + (60 - rT.deliverAt.getMinutes()) + "min before turn of the hour to avoid beeping of MDT. SMB are 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 - not skipping neutral temps.") + } } var insulinReq = 0;