diff --git a/lib/determine-basal/determine-basal.js b/lib/determine-basal/determine-basal.js index 5e3ee78b8..87ef00ae3 100644 --- a/lib/determine-basal/determine-basal.js +++ b/lib/determine-basal/determine-basal.js @@ -923,8 +923,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 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: