Skip to content

Commit

Permalink
Merge pull request #35 from mountrcg/skipNTfix
Browse files Browse the repository at this point in the history
 skip_neutral_temps only if SMB's disabled
  • Loading branch information
dnzxy authored Dec 26, 2024
2 parents bbdf258 + 7153b43 commit ff54c14
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/determine-basal/determine-basal.js
Original file line number Diff line number Diff line change
Expand Up @@ -1690,8 +1690,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;
Expand Down

0 comments on commit ff54c14

Please sign in to comment.