From 572e726678d2beb43905b6eb62a08fa8f044b21f Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Tue, 16 May 2017 13:10:02 +0200 Subject: [PATCH] basal and bolus step in DanaR Fragment --- .../plugins/PumpDanaR/DanaRFragment.java | 7 ++ .../PumpDanaRKorean/DanaRKoreanFragment.java | 6 ++ app/src/main/res/layout/danar_fragment.xml | 90 +++++++++++++++++++ app/src/main/res/values/strings.xml | 2 + 4 files changed, 105 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java index 4aed68baec..c7ae887731 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java @@ -63,6 +63,8 @@ public class DanaRFragment extends Fragment { TextView reservoirView; TextView iobView; TextView firmwareView; + TextView basalStepView; + TextView bolusStepView; Button viewProfileButton; Button historyButton; Button statsButton; @@ -109,6 +111,8 @@ public class DanaRFragment extends Fragment { viewProfileButton = (Button) view.findViewById(R.id.danar_viewprofile); historyButton = (Button) view.findViewById(R.id.danar_history); statsButton = (Button) view.findViewById(R.id.danar_stats); + basalStepView = (TextView) view.findViewById(R.id.danar_basalstep); + bolusStepView = (TextView) view.findViewById(R.id.danar_bolusstep); viewProfileButton.setOnClickListener(new View.OnClickListener() { @@ -239,6 +243,9 @@ public class DanaRFragment extends Fragment { } else { firmwareView.setText("OLD"); } + basalStepView.setText("" + pump.basalStep); + bolusStepView.setText("" + pump.bolusStep); + } }); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRKorean/DanaRKoreanFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRKorean/DanaRKoreanFragment.java index bafe3f63ff..e03fc97b33 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRKorean/DanaRKoreanFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRKorean/DanaRKoreanFragment.java @@ -60,6 +60,8 @@ public class DanaRKoreanFragment extends Fragment { TextView reservoirView; TextView iobView; TextView firmwareView; + TextView basalStepView; + TextView bolusStepView; Button viewProfileButton; Button historyButton; Button statsButton; @@ -106,6 +108,8 @@ public class DanaRKoreanFragment extends Fragment { viewProfileButton = (Button) view.findViewById(R.id.danar_viewprofile); historyButton = (Button) view.findViewById(R.id.danar_history); statsButton = (Button) view.findViewById(R.id.danar_stats); + basalStepView = (TextView) view.findViewById(R.id.danar_basalstep); + bolusStepView = (TextView) view.findViewById(R.id.danar_bolusstep); viewProfileButton.setOnClickListener(new View.OnClickListener() { @@ -237,6 +241,8 @@ public class DanaRKoreanFragment extends Fragment { } else { firmwareView.setText("OLD"); } + basalStepView.setText("" + pump.basalStep); + bolusStepView.setText("" + pump.bolusStep); } }); diff --git a/app/src/main/res/layout/danar_fragment.xml b/app/src/main/res/layout/danar_fragment.xml index 6a6b866d0e..82af40b141 100644 --- a/app/src/main/res/layout/danar_fragment.xml +++ b/app/src/main/res/layout/danar_fragment.xml @@ -459,6 +459,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + All data sent to NS are dropped. AAPS is connected to NS but no change in NS is done ns_upload_only ns_noupload + Basal Step + Bolus Step