Merge branch 'nightscout:dev' into dev
This commit is contained in:
commit
3a640d91ca
13 changed files with 49 additions and 26 deletions
|
@ -109,7 +109,7 @@ android {
|
|||
defaultConfig {
|
||||
multiDexEnabled true
|
||||
versionCode 1500
|
||||
version "3.0.0.1-dev-i"
|
||||
version "3.0.0.2-dev-i"
|
||||
buildConfigField "String", "VERSION", '"' + version + '"'
|
||||
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
|
||||
buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"'
|
||||
|
|
|
@ -101,7 +101,7 @@ abstract class InsulinOrefBasePlugin(
|
|||
return comment
|
||||
}
|
||||
|
||||
abstract val peak: Int
|
||||
override abstract val peak: Int
|
||||
abstract fun commentStandardText(): String
|
||||
|
||||
companion object {
|
||||
|
|
|
@ -302,6 +302,7 @@
|
|||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="@string/activate_profile"
|
||||
android:visibility="gone"
|
||||
app:icon="@drawable/ic_local_activate"
|
||||
app:iconTint="@color/ic_local_activate" />
|
||||
|
||||
|
@ -323,6 +324,7 @@
|
|||
android:paddingStart="1dp"
|
||||
android:paddingEnd="1dp"
|
||||
android:text="@string/reset"
|
||||
android:visibility="gone"
|
||||
app:icon="@drawable/ic_local_reset"
|
||||
app:iconTint="@color/ic_local_reset" />
|
||||
|
||||
|
@ -338,6 +340,7 @@
|
|||
android:paddingStart="1dp"
|
||||
android:paddingEnd="1dp"
|
||||
android:text="@string/save"
|
||||
android:visibility="gone"
|
||||
app:icon="@drawable/ic_local_save"
|
||||
app:iconTint="@color/ic_local_save" />
|
||||
</LinearLayout>
|
||||
|
|
|
@ -70,7 +70,14 @@ public class RuffyScripter implements RuffyCommands {
|
|||
private final IRTHandler mHandler = new IRTHandler.Stub() {
|
||||
@Override
|
||||
public void log(String message) {
|
||||
aapsLogger.debug(LTag.PUMP, "Ruffy says: " + message);
|
||||
// Ruffy is very verbose at this level, but the data provided isn't too helpful for
|
||||
// debugging. For debugging Ruffy, it makes more sense to check logcat, where other
|
||||
// possibly relevant (BT) events are also logged.
|
||||
// Due to the amount of calls, logging this causes timing issues as reported in
|
||||
// https://github.com/nightscout/AndroidAPS/issues/1619#issuecomment-1115811485
|
||||
// This was caused by changing the log level from trace to debug so these messages
|
||||
// where logged by default.
|
||||
//aapsLogger.debug(LTag.PUMP, "Ruffy says: " + message);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,6 +27,7 @@ interface Insulin : ConfigExportImport {
|
|||
val friendlyName: String
|
||||
val comment: String
|
||||
val dia: Double
|
||||
val peak: Int
|
||||
|
||||
fun iobCalcForTreatment(bolus: Bolus, time: Long, dia: Double): Iob
|
||||
|
||||
|
|
|
@ -271,7 +271,7 @@ class PumpSyncImplementation @Inject constructor(
|
|||
.blockingGet()
|
||||
.also { result ->
|
||||
result.inserted.forEach { aapsLogger.debug(LTag.DATABASE, "Inserted TemporaryBasal $it") }
|
||||
result.updated.forEach { aapsLogger.debug(LTag.DATABASE, "Updated TemporaryBasal $it") }
|
||||
result.updated.forEach { aapsLogger.debug(LTag.DATABASE, "Updated ${it.first} TemporaryBasal ${it.second}") }
|
||||
return result.inserted.size > 0
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,24 +7,24 @@
|
|||
android:pathData="M5.719,19.125L5.719,11.828"
|
||||
android:strokeWidth="2.2677"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#FEAF05"
|
||||
android:strokeColor="?attr/statsColor"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M9.792,19.125L9.792,8.01"
|
||||
android:strokeWidth="2.2677"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#FEAF05"
|
||||
android:strokeColor="?attr/statsColor"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M13.865,19.125L13.865,9.51"
|
||||
android:strokeWidth="2.2677"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#FEAF05"
|
||||
android:strokeColor="?attr/statsColor"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M17.938,19.125L17.938,4.594"
|
||||
android:strokeWidth="2.2677"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#FEAF05"
|
||||
android:strokeColor="?attr/statsColor"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context="info.nightscout.androidaps.dana.DanaFragment"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
@ -658,50 +659,58 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/view_profile"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:drawableTop="@drawable/ic_danarprofile"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/viewprofile" />
|
||||
android:text="@string/viewprofile"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
app:iconPadding="-4dp"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/history"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:drawableTop="@drawable/ic_pump_history"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/pumphistory"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
app:iconPadding="-4dp"
|
||||
tools:ignore="TooManyViews" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/stats"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:drawableTop="@drawable/ic_danarstats"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/stats" />
|
||||
android:text="@string/stats"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
app:iconPadding="-4dp"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
android:id="@+id/user_options"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="-2dp"
|
||||
android:drawableTop="@drawable/ic_danar_useropt"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/danar_useroptions" />
|
||||
android:text="@string/danar_useroptions"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
app:iconPadding="-4dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -29,7 +29,7 @@ class SyncPumpTemporaryBasalTransaction(
|
|||
existing.duration = temporaryBasal.duration
|
||||
existing.type = type ?: existing.type
|
||||
database.temporaryBasalDao.updateExistingEntry(existing)
|
||||
result.updated.add(existing)
|
||||
result.updated.add(Pair(Reason.EXISTING_ID, existing))
|
||||
}
|
||||
} else {
|
||||
val running = database.temporaryBasalDao.getTemporaryBasalActiveAt(temporaryBasal.timestamp).blockingGet()
|
||||
|
@ -37,7 +37,7 @@ class SyncPumpTemporaryBasalTransaction(
|
|||
running.end = temporaryBasal.timestamp
|
||||
running.interfaceIDs.endId = temporaryBasal.interfaceIDs.pumpId
|
||||
database.temporaryBasalDao.updateExistingEntry(running)
|
||||
result.updated.add(running)
|
||||
result.updated.add(Pair(Reason.ACTIVE, running))
|
||||
}
|
||||
database.temporaryBasalDao.insertNewEntry(temporaryBasal)
|
||||
result.inserted.add(temporaryBasal)
|
||||
|
@ -45,9 +45,12 @@ class SyncPumpTemporaryBasalTransaction(
|
|||
return result
|
||||
}
|
||||
|
||||
enum class Reason {
|
||||
EXISTING_ID, ACTIVE
|
||||
}
|
||||
class TransactionResult {
|
||||
|
||||
val inserted = mutableListOf<TemporaryBasal>()
|
||||
val updated = mutableListOf<TemporaryBasal>()
|
||||
val updated = mutableListOf<Pair<Reason,TemporaryBasal>>()
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue