Skip to content

Commit

Permalink
Merge pull request #195 from tidepool-org/gniezen/tandem-more-final-f…
Browse files Browse the repository at this point in the history
…ixes

More Tandem fixes for release candidate
  • Loading branch information
gniezen committed Nov 16, 2015
2 parents bf564f1 + e9b015d commit 6900f90
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/drivers/tandemTslimDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,7 @@ module.exports = function (config) {
}
else {
if(__DEBUG__) {
debug('oldest event seq: ', start_seq);
debug('oldest record deviceTime: ', result.payload.deviceTime);
}
minIndex = start_seq;
Expand All @@ -1194,7 +1195,7 @@ module.exports = function (config) {
function binarySearch(err, result) {

if (err) {
debug('error retrieving record ', result);
debug('error retrieving record during binary search ', result);
callback(err, null);
}
else {
Expand All @@ -1213,6 +1214,9 @@ module.exports = function (config) {
tandemFetchEventRange(progress, data, callback);
}
currentIndex = (minIndex + maxIndex) / 2 | 0;
if (currentIndex < start_seq) {
currentIndex = start_seq;
}
tandemLogRequester(currentIndex, currentIndex, progress, binarySearch);
} else {

Expand Down Expand Up @@ -1543,6 +1547,7 @@ module.exports = function (config) {
case 'timed_segment|temp_rate_end':
case 'new_profile':
case 'temp_rate_end':
case 'temp_rate_end|pump_resumed':
case 'pump_resumed':
// when the command_basal_rate is not the same as the base_basal_rate
// that means we're in a temp basal that crosses the border between
Expand Down

0 comments on commit 6900f90

Please sign in to comment.