Skip to content

Commit ff54c14

Browse files
authored
Merge pull request #35 from mountrcg/skipNTfix
skip_neutral_temps only if SMB's disabled
2 parents bbdf258 + 7153b43 commit ff54c14

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/determine-basal/determine-basal.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,8 +1690,12 @@ var maxDelta_bg_threshold;
16901690
// if not in LGS mode, cancel temps before the top of the hour to reduce beeping/vibration
16911691
// console.error(profile.skip_neutral_temps, rT.deliverAt.getMinutes());
16921692
if ( profile.skip_neutral_temps && rT.deliverAt.getMinutes() >= 55 ) {
1693-
rT.reason += "; Canceling temp at " + rT.deliverAt.getMinutes() + "m past the hour. ";
1694-
return tempBasalFunctions.setTempBasal(0, 0, profile, rT, currenttemp);
1693+
if (!enableSMB) {
1694+
rT.reason += "; Canceling temp at " + (60 - rT.deliverAt.getMinutes()) + "min before turn of the hour to avoid beeping of MDT. SMB are disabled anyways.";
1695+
return tempBasalFunctions.setTempBasal(0, 0, profile, rT, currenttemp);
1696+
} else {
1697+
console.error((60 - rT.deliverAt.getMinutes()) + "min before turn of the hour, but SMB's are enabled - not skipping neutral temps.")
1698+
}
16951699
}
16961700

16971701
var insulinReq = 0;

0 commit comments

Comments
 (0)