Merge pull request #2908 from AAPS-Omnipod/dev

Store LastRun SMB data in their dedicated fields instead of overwriting TBR fields
This commit is contained in:
Milos Kozak 2020-08-21 09:43:20 +02:00 committed by GitHub
commit 7854bb1ce4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -537,11 +537,11 @@ public class LoopPlugin extends PluginBase implements LoopInterface {
applySMBRequest(resultAfterConstraints, new Callback() {
@Override
public void run() {
//Callback is only called if a bolus was acutally requested
// Callback is only called if a bolus was actually requested
if (result.enacted || result.success) {
lastRun.setTbrSetByPump(result);
lastRun.setLastTBRRequest(lastRun.getLastAPSRun());
lastRun.setLastTBREnact(DateUtil.now());
lastRun.setSmbSetByPump(result);
lastRun.setLastSMBRequest(lastRun.getLastAPSRun());
lastRun.setLastSMBEnact(DateUtil.now());
} else {
new Thread(() -> {
SystemClock.sleep(1000);