another fix
This commit is contained in:
parent
af8e485250
commit
be26db356d
3 changed files with 3 additions and 3 deletions
|
@ -25,7 +25,7 @@ public class MealData {
|
||||||
NSProfile profile = MainApp.getConfigBuilder().getActiveProfile().getProfile();
|
NSProfile profile = MainApp.getConfigBuilder().getActiveProfile().getProfile();
|
||||||
if (profile == null) return;
|
if (profile == null) return;
|
||||||
|
|
||||||
List<BgReading> bgReadings = MainApp.getDbHelper().getBgreadingsDataFromTime((long) (new Date().getTime() - 60 * 60 * 1000L * profile.getDia() * 2), true);
|
List<BgReading> bgReadings = MainApp.getDbHelper().getBgreadingsDataFromTime((long) (new Date().getTime() - 60 * 60 * 1000L * profile.getDia() * 2), false);
|
||||||
|
|
||||||
long now = new Date().getTime();
|
long now = new Date().getTime();
|
||||||
long dia_ago = now - (new Double(1.5d * profile.getDia() * 60 * 60 * 1000l)).longValue();
|
long dia_ago = now - (new Double(1.5d * profile.getDia() * 60 * 60 * 1000l)).longValue();
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class Autosens {
|
||||||
//console.error(elapsed_minutes);
|
//console.error(elapsed_minutes);
|
||||||
long nextbgTime;
|
long nextbgTime;
|
||||||
while (elapsed_minutes > 5) {
|
while (elapsed_minutes > 5) {
|
||||||
nextbgTime = lastbgTime + 5 * 60 * 1000;
|
nextbgTime = lastbgTime - 5 * 60 * 1000;
|
||||||
j++;
|
j++;
|
||||||
BgReading newBgreading = new BgReading();
|
BgReading newBgreading = new BgReading();
|
||||||
newBgreading.timeIndex = nextbgTime;
|
newBgreading.timeIndex = nextbgTime;
|
||||||
|
|
|
@ -217,7 +217,7 @@ public class OpenAPSAMAPlugin implements PluginBase, APSInterface {
|
||||||
|
|
||||||
startPart = new Date();
|
startPart = new Date();
|
||||||
long oldestDataAvailable = MainApp.getConfigBuilder().getActiveTempBasals().oldestDataAvaialable();
|
long oldestDataAvailable = MainApp.getConfigBuilder().getActiveTempBasals().oldestDataAvaialable();
|
||||||
List<BgReading> bgReadings = MainApp.getDbHelper().getBgreadingsDataFromTime(Math.max(oldestDataAvailable, (long) (new Date().getTime() - 60 * 60 * 1000L * (24 + profile.getDia()))), true);
|
List<BgReading> bgReadings = MainApp.getDbHelper().getBgreadingsDataFromTime(Math.max(oldestDataAvailable, (long) (new Date().getTime() - 60 * 60 * 1000L * (24 + profile.getDia()))), false);
|
||||||
log.debug("Limiting data to oldest available temps: " + new Date(oldestDataAvailable).toString() + " (" + bgReadings.size() + " records)");
|
log.debug("Limiting data to oldest available temps: " + new Date(oldestDataAvailable).toString() + " (" + bgReadings.size() + " records)");
|
||||||
Profiler.log(log, "getBgreadingsDataFromTime()", startPart);
|
Profiler.log(log, "getBgreadingsDataFromTime()", startPart);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue