Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Increase rendering granularity to support AAPS TBRs #8281

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/client/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ function init (client, d3) {
}
}
lastbasal = basalvalue;
date += times.mins(1).msecs;
date += times.secs(1).msecs;
}

var toTempBasal = profile.getTempBasal(to);
Expand Down
6 changes: 3 additions & 3 deletions lib/report_plugins/daytoday.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ daytoday.report = function report_daytoday (datastorage, sorteddaystoshow, optio
console.log("Device COB status available: ", cobStatusAvailable);
console.log("Device IOB status available: ", iobStatusAvailable);

for (var dt = moment(from); dt < to; dt.add(5, 'minutes')) {
for (var dt = moment(from); dt < to; dt.add(1, 'seconds')) {
if (options.iob && !iobStatusAvailable) {
var iob = client.plugins('iob').calcTotal(datastorage.treatments, datastorage.devicestatus, profile, dt.toDate()).iob;
// make the graph discontinuous when data is missing
Expand Down Expand Up @@ -503,8 +503,8 @@ daytoday.report = function report_daytoday (datastorage, sorteddaystoshow, optio
var hournow = dt.hour();
var basalvalue = profile.getTempBasal(date);
// Calculate basal stats
baseBasalInsulin += basalvalue.basal * 5 / 60; // 5 minutes part
var tempPart = (basalvalue.tempbasal - basalvalue.basal) * 5 / 60;
baseBasalInsulin += basalvalue.basal * 1 / 3600; // 1 secs part
var tempPart = (basalvalue.tempbasal - basalvalue.basal) * 1 / 3600;
if (tempPart > 0) {
positiveTemps += tempPart;
data.netBasalPositive[hournow] += tempPart;
Expand Down
Loading