Skip to content

Commit

Permalink
Merge branch 'NightscoutFoundation:master' into Navid_2023_12_02
Browse files Browse the repository at this point in the history
  • Loading branch information
Navid200 authored Dec 23, 2023
2 parents 5ef0937 + 1d84ed1 commit 1212e75
Show file tree
Hide file tree
Showing 16 changed files with 1,410 additions and 511 deletions.
20 changes: 20 additions & 0 deletions Documentation/Quick_Start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Quick Start

### Currently Recommended IDE

Android Studio Giraffe | 2022.3.1 Patch 3


### Lombok Plugin

Until we are using Android Studio Iguana (where the lombok regression is believed to be corrected) you will need to manually install the lombok plugin jar from the etc source tree folder.

To install it you go to Settings -> Plugins -> Cog icon -> Install plugin from disk -> select the lombok-giraffe.jar file

### Android Studio Bugs and Regressions

Be aware that each new version of Android Studio introduces more regressions and bugs. There are still uncorrected bugs which were introduced back in version 3.6! Also each IDE version is tightly coupled with various versions of gradle which are also tightly coupled with various versions of the Android framework tools.

What this means, is that even though the command line compilation always works fine, any single version of Android Studio is unable to compile the entire xDrip source tree history and is likely to break in misleading and confusing ways based on simple dependency changes as there is such poor support in Android Studio for forward or backwards compatibility.

Expect to have to run multiple different versions of Android Studio over time or where in the commit history you may be working from and for each new version to potentially introduce new and unpredictable issues. Expect to have to clear cache and restart to avoid being misled about the source of errors.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

xDrip+ is an unofficial and independent Android app which works as data hub and processor between many different devices.

It supports wireless connections to G4, G5, G6, Medtrum A6, Libre via NFC and Bluetooth, 630G, 640G, 670G pumps and Eversense CGM via companion apps. Bluetooth Glucose Meters such as the Contour Next One, AccuChek Guide, Verio Flex & Diamond Mini as well as devices like the Pendiq 2.0 Insulin Pen.
It supports wireless connections to G4, G5, G6, G7, Medtrum A6, Libre via NFC and Bluetooth, 630G, 640G, 670G pumps, CareSens Air and Eversense CGM via companion apps. Bluetooth Glucose Meters such as the Contour Next One, AccuChek Guide, Verio Flex & Diamond Mini as well as devices like the Pendiq 2.0 Insulin Pen.

Heart-rate and step counter data is processed from Android Wear, Garmin, Fitbit and Pebble smart-watches and watch-faces for those that show glucose values and graphs.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public class SensorExpiry extends BaseAlert {
private static final long[] THRESHOLDS = {
// need to be in ascending order so first hit is first applicable to avoid multiple triggers
Constants.HOUR_IN_MS * 2,
Constants.HOUR_IN_MS * 9,
Constants.HOUR_IN_MS * 6,
Constants.HOUR_IN_MS * 12,
Constants.HOUR_IN_MS * 24,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ public static void updateAge(final String transmitterId, final int dexTimeStamp,
if (dexTimeStamp < 1) {
UserError.Log.e(TAG, "Invalid dex timestamp in updateAge: " + dexTimeStamp);
if (dexTimeStamp == 0 && absolute) {
if (FirmwareCapability.isTransmitterStandardFirefly(getTransmitterID())) { // Firefly, which cannot be hard reset
UserError.Log.e(TAG, "Your transmitter clock has stopped or never started.");
} else {
if (FirmwareCapability.isTransmitterG5(getTransmitterID()) || FirmwareCapability.isTransmitterTimeTravelCapable(getTransmitterID()) || FirmwareCapability.isTransmitterModified(getTransmitterID())) { // Devices that can be hard reset only
DexResetHelper.offer("Your transmitter clock has stopped or never started. Do you want to hard reset it?");
} else { // Everything else - future devices will be here. If a future device can be hard reset, they should be added to the true (other) side.
UserError.Log.e(TAG, "Your transmitter clock has stopped or never started.");
}
}
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ private static void backFillIfNeeded(Ob1G5CollectionService parent, RxBleConnect
}
}

private static boolean shortTxId() {
public static boolean shortTxId() {
return getTransmitterID().length() < 6;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package com.eveningoutpost.dexdrip.insulin;

import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.ScrollView;

import com.eveningoutpost.dexdrip.BaseAppCompatActivity;
import com.eveningoutpost.dexdrip.R;
Expand All @@ -36,8 +34,6 @@ public class InsulinProfileEditor extends BaseAppCompatActivity {
private Spinner basalSpinner, bolusSpinner;
private HashMap<Insulin, CheckBox> checkboxes;
private HashMap<String, Insulin> profiles;
private ScrollView parentScrollView;
private ScrollView childScrollView;

//private Context mContext;

Expand All @@ -56,19 +52,7 @@ protected void onCreate(Bundle savedInstanceState) {
linearLayout = (LinearLayout) findViewById(R.id.profile_layout_view);
basalSpinner = (Spinner) findViewById(R.id.basalSpinner);
bolusSpinner = (Spinner) findViewById(R.id.bolusSpinner);
parentScrollView = (ScrollView) findViewById(R.id.parent_scroll_view);
childScrollView = (ScrollView) findViewById(R.id.child_scroll_view);

parentScrollView.setOnTouchListener((v, event) -> {
findViewById(R.id.parent_scroll_view).getParent().requestDisallowInterceptTouchEvent(false);
return false;
});

childScrollView.setOnTouchListener((v, event) -> {
// Disallow the touch request for parent scroll on touch of child view
v.getParent().getParent().requestDisallowInterceptTouchEvent(true);
return false;
});
val iprofiles = InsulinManager.getAllProfiles();
if (iprofiles == null) {
JoH.static_toast_long("Can't initialize insulin profiles");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public class SourceWizard {
Tree<Item> other = root.addChild(new Item(gs(R.string.other), gs(R.string.which_type_of_device), R.drawable.wikimedia_question_mark));
{
other.addChild(new Item("640G / 670G", DexCollectionType.NSEmulator, R.drawable.mm600_series));
other.addChild(new Item("CareSens Air", DexCollectionType.NSEmulator, R.drawable.caresens_air_icon_image));
other.addChild(new Item("Medtrum A6 / S7", DexCollectionType.Medtrum, R.drawable.a6_icon));
other.addChild(new Item("Nightscout Follower", DexCollectionType.NSFollow, R.drawable.nsfollow_icon));
other.addChild(new Item("Dex Share Follower", DexCollectionType.SHFollow, R.drawable.nsfollow_icon));
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 27 additions & 35 deletions app/src/main/res/layout/activity_insulinprofile_editor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
android:fitsSystemWindows="true">

<ScrollView
android:id="@+id/parent_scroll_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
Expand All @@ -21,10 +20,8 @@
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="true">
android:layout_height="wrap_content"
android:weightSum="1">

<TextView
android:id="@+id/Text"
Expand All @@ -34,26 +31,20 @@
android:text="@string/pref_enable_insulinprofiles"
android:textSize="18sp" />

<ScrollView
android:id="@+id/child_scroll_view"
android:layout_width="match_parent"
android:layout_height="440dp"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingBottom="@dimen/activity_vertical_margin">

<LinearLayout
android:id="@+id/profile_layout_view"
android:layout_width="wrap_content"
android:layout_height="440dp"
android:layout_gravity="bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:layout_weight="1"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:fadeScrollbars="false"
android:orientation="vertical"
android:scrollbars="vertical"></LinearLayout>

</ScrollView>
android:scrollbars="vertical">
</LinearLayout>

<TextView
android:id="@+id/Text2"
Expand Down Expand Up @@ -87,41 +78,42 @@

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="94dp"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_weight="1"
android:paddingTop="@dimen/activity_vertical_margin"
android:gravity="bottom">

<Button
android:id="@+id/profileCancelbtn"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="32dp"
android:text="@string/cancel"
android:id="@+id/profileCancelbtn"
android:onClick="profileCancelButton"
android:layout_alignParentBottom="true"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/profileUndoBtn"
android:layout_alignParentStart="true"
android:layout_alignTop="@+id/profileUndoBtn" />
android:layout_alignParentBottom="true"
android:onClick="profileCancelButton"
android:text="@string/cancel" />

<Button
android:id="@+id/profileSaveBtn"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/save"
android:id="@+id/profileSaveBtn"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignTop="@+id/profileUndoBtn"
android:onClick="profileSaveButton" />
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:onClick="profileSaveButton"
android:text="@string/save" />

<Button
android:id="@+id/profileUndoBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/reset"
android:id="@+id/profileUndoBtn"
android:layout_alignParentBottom="true"
android:layout_toEndOf="@+id/profileCancelbtn"
android:onClick="profileUndoButton" />
android:onClick="profileUndoButton"
android:text="@string/reset" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
Expand Down
11 changes: 6 additions & 5 deletions app/src/main/res/layout/activity_system_status.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable name="ms" type="com.eveningoutpost.dexdrip.ui.MicroStatus"/>
<import type="android.view.View"/>
Expand Down Expand Up @@ -65,7 +66,7 @@
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Data Source:"
android:text="@string/data_source"
android:textAppearance="@style/TextAppearance.AppCompat.Title" />

<TextView
Expand All @@ -79,7 +80,7 @@

<LinearLayout
android:id="@+id/layout_device"
android:visibility="@{ms.bluetooth() ? View.VISIBLE : View.GONE}"
app:showIfTrue="@{ms.bluetooth()}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
Expand All @@ -103,7 +104,7 @@

<LinearLayout
android:id="@+id/layout_status"
android:visibility="@{ms.bluetooth() ? View.VISIBLE : View.GONE}"
app:showIfTrue="@{ms.bluetooth()}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
Expand Down Expand Up @@ -153,7 +154,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="@{ms.xmitterBattery() ? View.VISIBLE : View.GONE}"
app:showIfTrue="@{ms.xmitterBattery()}"
android:paddingTop="10dp">

<TextView
Expand Down
Loading

0 comments on commit 1212e75

Please sign in to comment.