- small logging so that we can fix this date parsing problem
This commit is contained in:
parent
5230a2dda0
commit
0fdcb862a6
2 changed files with 10 additions and 8 deletions
|
@ -243,7 +243,6 @@ public class PodHistoryActivity extends NoSplashActivity {
|
||||||
if (record != null) {
|
if (record != null) {
|
||||||
holder.timeView.setText(record.getDateTimeString());
|
holder.timeView.setText(record.getDateTimeString());
|
||||||
holder.typeView.setText(record.getPodDbEntryType().getResourceId());
|
holder.typeView.setText(record.getPodDbEntryType().getResourceId());
|
||||||
//holder.valueView.setText(""); // TODO
|
|
||||||
setValue(record, holder.valueView);
|
setValue(record, holder.valueView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -255,8 +254,7 @@ public class PodHistoryActivity extends NoSplashActivity {
|
||||||
|
|
||||||
case FillCannulaSetBasalProfile: {
|
case FillCannulaSetBasalProfile: {
|
||||||
if (historyEntry.getData() != null) {
|
if (historyEntry.getData() != null) {
|
||||||
Profile profile = OmnipodUtil.getGsonInstance().fromJson(historyEntry.getData(), Profile.class);
|
setProfileValue(historyEntry.getData(), valueView);
|
||||||
valueView.setText(ProfileUtil.getProfileDisplayable(profile, PumpType.Insulet_Omnipod));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -268,8 +266,7 @@ public class PodHistoryActivity extends NoSplashActivity {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SetBasalSchedule: {
|
case SetBasalSchedule: {
|
||||||
Profile profile = OmnipodUtil.getGsonInstance().fromJson(historyEntry.getData(), Profile.class);
|
setProfileValue(historyEntry.getData(), valueView);
|
||||||
valueView.setText(ProfileUtil.getProfileDisplayable(profile, PumpType.Insulet_Omnipod));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GetPodStatus:
|
case GetPodStatus:
|
||||||
|
@ -301,6 +298,7 @@ public class PodHistoryActivity extends NoSplashActivity {
|
||||||
case ResumeDelivery:
|
case ResumeDelivery:
|
||||||
case UnknownEntryType:
|
case UnknownEntryType:
|
||||||
default:
|
default:
|
||||||
|
valueView.setText("");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -310,6 +308,12 @@ public class PodHistoryActivity extends NoSplashActivity {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setProfileValue(String data, TextView valueView) {
|
||||||
|
LOG.debug("Profile json:\n" + data);
|
||||||
|
Profile profile = OmnipodUtil.getGsonInstance().fromJson(data, Profile.class);
|
||||||
|
valueView.setText(ProfileUtil.getProfileDisplayable(profile, PumpType.Insulet_Omnipod));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemCount() {
|
public int getItemCount() {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.omnipod.driver.db;
|
package info.nightscout.androidaps.plugins.pump.omnipod.driver.db;
|
||||||
|
|
||||||
import androidx.annotation.IdRes;
|
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -37,8 +36,7 @@ public enum PodHistoryEntryType {
|
||||||
SuspendDelivery(60, R.string.omnipod_cmd_suspend_delivery),
|
SuspendDelivery(60, R.string.omnipod_cmd_suspend_delivery),
|
||||||
ResumeDelivery(61, R.string.omnipod_cmd_resume_delivery),
|
ResumeDelivery(61, R.string.omnipod_cmd_resume_delivery),
|
||||||
|
|
||||||
UnknownEntryType(99, R.string.omnipod_cmd_umknown_entry)
|
UnknownEntryType(99, R.string.omnipod_cmd_unknown_entry);
|
||||||
;
|
|
||||||
|
|
||||||
private int code;
|
private int code;
|
||||||
private static Map<Integer, PodHistoryEntryType> instanceMap;
|
private static Map<Integer, PodHistoryEntryType> instanceMap;
|
||||||
|
|
Loading…
Reference in a new issue