wear yet again current situation tweaks
This commit is contained in:
parent
663a865595
commit
95432e35e0
1 changed files with 4 additions and 4 deletions
|
@ -329,13 +329,13 @@ public class WatchUpdaterService extends WearableListenerService implements
|
||||||
tb2 = MainApp.getConfigBuilder().getTempBasal(new Date(now)); //use "now" to express current situation
|
tb2 = MainApp.getConfigBuilder().getTempBasal(new Date(now)); //use "now" to express current situation
|
||||||
if(tb2 == null) {
|
if(tb2 == null) {
|
||||||
//express the cancelled temp by painting it down one minute early
|
//express the cancelled temp by painting it down one minute early
|
||||||
temps.add(tempDatamap(tb_start, tb_before, now - 1 * 60 * 1000, tb_amount, tb_amount));
|
temps.add(tempDatamap(tb_start, tb_before, now - 1 * 60 * 1000, endBasalValue, tb_amount));
|
||||||
} else {
|
} else {
|
||||||
//express currently running temp by painting it a bit into the future
|
//express currently running temp by painting it a bit into the future
|
||||||
double currentAmount = tb2.tempBasalConvertedToAbsolute(new Date(runningTime));
|
double currentAmount = tb2.tempBasalConvertedToAbsolute(new Date(now));
|
||||||
if(currentAmount != tb_amount){
|
if(currentAmount != tb_amount){
|
||||||
temps.add(tempDatamap(tb_start, tb_before, runningTime, tb_amount, tb_amount));
|
temps.add(tempDatamap(tb_start, tb_before, now, tb_amount, tb_amount));
|
||||||
temps.add(tempDatamap(runningTime, tb_amount, runningTime + 5 * 60 * 1000, currentAmount, currentAmount));
|
temps.add(tempDatamap(now, tb_amount, runningTime + 5 * 60 * 1000, currentAmount, currentAmount));
|
||||||
} else {
|
} else {
|
||||||
temps.add(tempDatamap(tb_start, tb_before, runningTime + 5 * 60 * 1000, tb_amount, tb_amount));
|
temps.add(tempDatamap(tb_start, tb_before, runningTime + 5 * 60 * 1000, tb_amount, tb_amount));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue