Add readPulseLog method in AapsOmnipodManager
This commit is contained in:
parent
49a9ddf72d
commit
aea725e9ad
2 changed files with 17 additions and 3 deletions
|
@ -1,5 +1,7 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.podinfo;
|
package info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.podinfo;
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -47,9 +49,15 @@ public class PodInfoRecentHighFlashLogDump extends PodInfo {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "PodInfoRecentHighFlashLogDump{" +
|
String out = "PodInfoRecentHighFlashLogDump{" +
|
||||||
"lastEntryIndex=" + lastEntryIndex +
|
"lastEntryIndex=" + lastEntryIndex +
|
||||||
",dwords=" + dwords +
|
",dwords=[";
|
||||||
'}';
|
List<String> hexDwords = new ArrayList<>();
|
||||||
|
for (byte[] dword : dwords) {
|
||||||
|
hexDwords.add(ByteUtil.shortHexString(dword));
|
||||||
|
}
|
||||||
|
out += TextUtils.join(",", hexDwords);
|
||||||
|
out += "]}";
|
||||||
|
return out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.comm.OmnipodCommunication
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.comm.OmnipodManager;
|
import info.nightscout.androidaps.plugins.pump.omnipod.comm.OmnipodManager;
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.comm.SetupActionResult;
|
import info.nightscout.androidaps.plugins.pump.omnipod.comm.SetupActionResult;
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.StatusResponse;
|
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.StatusResponse;
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.podinfo.PodInfoRecentHighFlashLogDump;
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.podinfo.PodInfoResponse;
|
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.podinfo.PodInfoResponse;
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.defs.AlertSlot;
|
import info.nightscout.androidaps.plugins.pump.omnipod.defs.AlertSlot;
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.defs.AlertType;
|
import info.nightscout.androidaps.plugins.pump.omnipod.defs.AlertType;
|
||||||
|
@ -441,6 +442,11 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
|
||||||
return new PumpEnactResult().success(true).enacted(true);
|
return new PumpEnactResult().success(true).enacted(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PodInfoRecentHighFlashLogDump readPulseLog() {
|
||||||
|
PodInfoResponse response = delegate.getPodInfo(PodInfoType.RECENT_HIGH_FLASH_LOG_DUMP);
|
||||||
|
return response.getPodInfo();
|
||||||
|
}
|
||||||
|
|
||||||
public OmnipodCommunicationService getCommunicationService() {
|
public OmnipodCommunicationService getCommunicationService() {
|
||||||
return delegate.getCommunicationService();
|
return delegate.getCommunicationService();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue