log autosens input data in fragment

This commit is contained in:
Milos Kozak 2017-01-08 00:07:18 +01:00
parent f707029560
commit 9c93d3ad7d
3 changed files with 19 additions and 0 deletions

View file

@ -42,6 +42,7 @@ public class OpenAPSAMAFragment extends Fragment implements View.OnClickListener
TextView iobDataView; TextView iobDataView;
TextView profileView; TextView profileView;
TextView mealDataView; TextView mealDataView;
TextView autosensDataView;
TextView resultView; TextView resultView;
TextView requestView; TextView requestView;
@ -58,6 +59,7 @@ public class OpenAPSAMAFragment extends Fragment implements View.OnClickListener
iobDataView = (TextView) view.findViewById(R.id.openapsma_iobdata); iobDataView = (TextView) view.findViewById(R.id.openapsma_iobdata);
profileView = (TextView) view.findViewById(R.id.openapsma_profile); profileView = (TextView) view.findViewById(R.id.openapsma_profile);
mealDataView = (TextView) view.findViewById(R.id.openapsma_mealdata); mealDataView = (TextView) view.findViewById(R.id.openapsma_mealdata);
autosensDataView = (TextView) view.findViewById(R.id.openapsma_autosensdata);
resultView = (TextView) view.findViewById(R.id.openapsma_result); resultView = (TextView) view.findViewById(R.id.openapsma_result);
requestView = (TextView) view.findViewById(R.id.openapsma_request); requestView = (TextView) view.findViewById(R.id.openapsma_request);
@ -121,6 +123,7 @@ public class OpenAPSAMAFragment extends Fragment implements View.OnClickListener
} }
profileView.setText(JSONFormatter.format(determineBasalAdapterAMAJS.getProfileParam())); profileView.setText(JSONFormatter.format(determineBasalAdapterAMAJS.getProfileParam()));
mealDataView.setText(JSONFormatter.format(determineBasalAdapterAMAJS.getMealDataParam())); mealDataView.setText(JSONFormatter.format(determineBasalAdapterAMAJS.getMealDataParam()));
autosensDataView.setText(JSONFormatter.format(determineBasalAdapterAMAJS.getAutosensDataParam()));
} }
if (getPlugin().lastAPSRun != null) { if (getPlugin().lastAPSRun != null) {
lastRunView.setText(getPlugin().lastAPSRun.toLocaleString()); lastRunView.setText(getPlugin().lastAPSRun.toLocaleString());
@ -141,6 +144,7 @@ public class OpenAPSAMAFragment extends Fragment implements View.OnClickListener
iobDataView.setText(""); iobDataView.setText("");
profileView.setText(""); profileView.setText("");
mealDataView.setText(""); mealDataView.setText("");
autosensDataView.setText("");
requestView.setText(""); requestView.setText("");
lastRunView.setText(""); lastRunView.setText("");
} }

View file

@ -132,6 +132,20 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/openapsma_autosensdata_label"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_marginLeft="5dp" />
<TextView
android:id="@+id/openapsma_autosensdata"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout

View file

@ -401,4 +401,5 @@
<string name="short_avgdelta">Short avg. delta</string> <string name="short_avgdelta">Short avg. delta</string>
<string name="long_avgdelta">Long avg. delta</string> <string name="long_avgdelta">Long avg. delta</string>
<string name="array_of_elements">Array of %d elements.\nActual value:</string> <string name="array_of_elements">Array of %d elements.\nActual value:</string>
<string name="openapsma_autosensdata_label">Autosens data</string>
</resources> </resources>