patch SMB determine_basal to not produce error
This commit is contained in:
parent
ed3f076bd7
commit
a08a6cbb70
1 changed files with 3 additions and 0 deletions
|
@ -213,6 +213,9 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_
|
|||
var lastTempAge;
|
||||
if (typeof iob_data.lastTemp !== 'undefined' ) {
|
||||
lastTempAge = round(( new Date().getTime() - iob_data.lastTemp.date ) / 60000); // in minutes
|
||||
// } ---- added to not produce errors
|
||||
} else {
|
||||
lastTempAge = 0;
|
||||
}
|
||||
//console.error("currenttemp:",currenttemp,"lastTemp:",JSON.stringify(iob_data.lastTemp),"lastTempAge:",lastTempAge,"m");
|
||||
tempModulus = (lastTempAge + currenttemp.duration) % 30;
|
||||
|
|
Loading…
Reference in a new issue