Merge branch 'dev' into fix/marterial_date_time_picker_ok_cancel_color
This commit is contained in:
commit
2634261412
22 changed files with 267 additions and 64 deletions
|
@ -5,6 +5,7 @@
|
|||
<w>abcdef</w>
|
||||
<w>acked</w>
|
||||
<w>actionstring</w>
|
||||
<w>aidex</w>
|
||||
<w>allowednumbers</w>
|
||||
<w>androidaps</w>
|
||||
<w>autosens</w>
|
||||
|
@ -105,4 +106,4 @@
|
|||
<w>ypsopump</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
||||
</component>
|
||||
|
|
|
@ -34,6 +34,10 @@
|
|||
<!-- To receive data from xdrip. -->
|
||||
<uses-permission android:name="com.eveningoutpost.dexdrip.permissions.RECEIVE_BG_ESTIMATE" />
|
||||
|
||||
<!-- To receive data from Aidex -->
|
||||
<uses-permission android:name="com.microtechmd.cgms.aidex.permissions.RECEIVE_BG_ESTIMATE" />
|
||||
|
||||
|
||||
<application
|
||||
android:name=".MainApp"
|
||||
android:allowBackup="true"
|
||||
|
@ -133,6 +137,8 @@
|
|||
<action android:name="com.china.poctech.data"/>
|
||||
<!-- Receiver from Tomato -->
|
||||
<action android:name="com.fanqies.tomatofn.BgEstimate"/>
|
||||
<!-- Receiver from GlucoRx Aidex -->
|
||||
<action android:name="com.microtechmd.cgms.aidex.action.BgEstimate"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
|
|
|
@ -87,6 +87,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang
|
|||
@Inject lateinit var poctechPlugin: PoctechPlugin
|
||||
@Inject lateinit var tomatoPlugin: TomatoPlugin
|
||||
@Inject lateinit var glunovoPlugin: GlunovoPlugin
|
||||
@Inject lateinit var aidexPlugin: AidexPlugin
|
||||
@Inject lateinit var smsCommunicatorPlugin: SmsCommunicatorPlugin
|
||||
@Inject lateinit var statusLinePlugin: StatusLinePlugin
|
||||
@Inject lateinit var tidepoolPlugin: TidepoolPlugin
|
||||
|
@ -163,6 +164,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang
|
|||
addPreferencesFromResourceIfEnabled(tomatoPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(glunovoPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(poctechPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(aidexPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(glimpPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(loopPlugin, rootKey, config.APS)
|
||||
addPreferencesFromResourceIfEnabled(openAPSAMAPlugin, rootKey, config.APS)
|
||||
|
@ -447,4 +449,4 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang
|
|||
this.filter = filter
|
||||
preferenceManager?.preferenceScreen?.let { updateFilterVisibility(filter, it) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -358,6 +358,12 @@ abstract class PluginsModule {
|
|||
@IntKey(460)
|
||||
abstract fun bindTomatoPlugin(plugin: TomatoPlugin): PluginBase
|
||||
|
||||
@Binds
|
||||
@AllConfigs
|
||||
@IntoMap
|
||||
@IntKey(465)
|
||||
abstract fun bindAidexPlugin(plugin: AidexPlugin): PluginBase
|
||||
|
||||
@Binds
|
||||
@AllConfigs
|
||||
@IntoMap
|
||||
|
|
|
@ -32,4 +32,5 @@ abstract class WorkersModule {
|
|||
@ContributesAndroidInjector abstract fun contributesNSClientMbgWorker(): NSClientMbgWorker
|
||||
@ContributesAndroidInjector abstract fun contributesFoodWorker(): FoodPlugin.FoodWorker
|
||||
@ContributesAndroidInjector abstract fun contributesCsvExportWorker(): ImportExportPrefsImpl.CsvExportWorker
|
||||
@ContributesAndroidInjector abstract fun contributesAidexWorker(): AidexPlugin.AidexWorker
|
||||
}
|
|
@ -4,8 +4,6 @@ import android.text.Spanned
|
|||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.interfaces.Config
|
||||
import info.nightscout.shared.logging.AAPSLogger
|
||||
import info.nightscout.shared.logging.LTag
|
||||
import info.nightscout.androidaps.plugins.aps.loop.APSResult
|
||||
import info.nightscout.androidaps.plugins.configBuilder.RunningConfiguration
|
||||
import info.nightscout.androidaps.utils.DateUtil
|
||||
|
@ -14,6 +12,8 @@ import info.nightscout.androidaps.utils.JsonHelper
|
|||
import info.nightscout.androidaps.utils.Round
|
||||
import info.nightscout.androidaps.utils.T
|
||||
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
||||
import info.nightscout.shared.logging.AAPSLogger
|
||||
import info.nightscout.shared.logging.LTag
|
||||
import info.nightscout.shared.sharedPreferences.SP
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONException
|
||||
|
@ -88,7 +88,7 @@ class NSDeviceStatus @Inject constructor(
|
|||
fun handleNewData(deviceStatuses: JSONArray) {
|
||||
aapsLogger.debug(LTag.NSCLIENT, "Got NS deviceStatus: \$deviceStatuses")
|
||||
try {
|
||||
for (i in deviceStatuses.length() -1 downTo 0) {
|
||||
for (i in deviceStatuses.length() - 1 downTo 0) {
|
||||
val devicestatusJson = deviceStatuses.getJSONObject(i)
|
||||
if (devicestatusJson != null) {
|
||||
setData(devicestatusJson)
|
||||
|
@ -157,7 +157,7 @@ class NSDeviceStatus @Inject constructor(
|
|||
|
||||
//String[] ALL_STATUS_FIELDS = {"reservoir", "battery", "clock", "status", "device"};
|
||||
val string = StringBuilder()
|
||||
.append("<span style=\"color:${rh.gcs(R.color.defaultText)}\">")
|
||||
.append("<span style=\"color:${rh.gac(R.attr.nsTitleColor)}\">")
|
||||
.append(rh.gs(R.string.pump))
|
||||
.append(": </span>")
|
||||
|
||||
|
@ -165,13 +165,13 @@ class NSDeviceStatus @Inject constructor(
|
|||
val level = when {
|
||||
pumpData.clock + nsSettingsStatus.extendedPumpSettings("urgentClock") * 60 * 1000L < dateUtil.now() -> Levels.URGENT
|
||||
pumpData.reservoir < nsSettingsStatus.extendedPumpSettings("urgentRes") -> Levels.URGENT
|
||||
pumpData.isPercent && pumpData.percent < nsSettingsStatus.extendedPumpSettings("urgentBattP") -> Levels.URGENT
|
||||
pumpData.isPercent && pumpData.percent < nsSettingsStatus.extendedPumpSettings("urgentBattP") -> Levels.URGENT
|
||||
!pumpData.isPercent && pumpData.voltage < nsSettingsStatus.extendedPumpSettings("urgentBattV") -> Levels.URGENT
|
||||
pumpData.clock + nsSettingsStatus.extendedPumpSettings("warnClock") * 60 * 1000L < dateUtil.now() -> Levels.WARN
|
||||
pumpData.reservoir < nsSettingsStatus.extendedPumpSettings("warnRes") -> Levels.WARN
|
||||
pumpData.isPercent && pumpData.percent < nsSettingsStatus.extendedPumpSettings("warnBattP") -> Levels.WARN
|
||||
!pumpData.isPercent && pumpData.voltage < nsSettingsStatus.extendedPumpSettings("warnBattV") -> Levels.WARN
|
||||
else -> Levels.INFO
|
||||
pumpData.isPercent && pumpData.percent < nsSettingsStatus.extendedPumpSettings("warnBattP") -> Levels.WARN
|
||||
!pumpData.isPercent && pumpData.voltage < nsSettingsStatus.extendedPumpSettings("warnBattV") -> Levels.WARN
|
||||
else -> Levels.INFO
|
||||
}
|
||||
string.append("<span style=\"color:${level.toColor()}\">")
|
||||
val fields = nsSettingsStatus.pumpExtendedSettingsFields()
|
||||
|
@ -248,7 +248,7 @@ class NSDeviceStatus @Inject constructor(
|
|||
val openApsStatus: Spanned
|
||||
get() {
|
||||
val string = StringBuilder()
|
||||
.append("<span style=\"color:${rh.gcs(R.color.defaultText)}\">")
|
||||
.append("<span style=\"color:${rh.gac(R.attr.nsTitleColor)}\">")
|
||||
.append(rh.gs(R.string.openaps_short))
|
||||
.append(": </span>")
|
||||
|
||||
|
@ -256,7 +256,7 @@ class NSDeviceStatus @Inject constructor(
|
|||
val level = when {
|
||||
deviceStatusData.openAPSData.clockSuggested + T.mins(sp.getLong(R.string.key_nsalarm_urgent_staledatavalue, 31)).msecs() < dateUtil.now() -> Levels.URGENT
|
||||
deviceStatusData.openAPSData.clockSuggested + T.mins(sp.getLong(R.string.key_nsalarm_staledatavalue, 16)).msecs() < dateUtil.now() -> Levels.WARN
|
||||
else -> Levels.INFO
|
||||
else -> Levels.INFO
|
||||
}
|
||||
string.append("<span style=\"color:${level.toColor()}\">")
|
||||
if (deviceStatusData.openAPSData.clockSuggested != 0L) string.append(dateUtil.minAgo(rh, deviceStatusData.openAPSData.clockSuggested)).append(" ")
|
||||
|
@ -268,8 +268,10 @@ class NSDeviceStatus @Inject constructor(
|
|||
get() {
|
||||
val string = StringBuilder()
|
||||
try {
|
||||
if (deviceStatusData.openAPSData.enacted != null && deviceStatusData.openAPSData.clockEnacted != deviceStatusData.openAPSData.clockSuggested) string.append("<b>").append(dateUtil.minAgo(rh, deviceStatusData.openAPSData.clockEnacted)).append("</b> ").append(deviceStatusData.openAPSData.enacted!!.getString("reason")).append("<br>")
|
||||
if (deviceStatusData.openAPSData.suggested != null) string.append("<b>").append(dateUtil.minAgo(rh, deviceStatusData.openAPSData.clockSuggested)).append("</b> ").append(deviceStatusData.openAPSData.suggested!!.getString("reason")).append("<br>")
|
||||
if (deviceStatusData.openAPSData.enacted != null && deviceStatusData.openAPSData.clockEnacted != deviceStatusData.openAPSData.clockSuggested) string.append("<b>")
|
||||
.append(dateUtil.minAgo(rh, deviceStatusData.openAPSData.clockEnacted)).append("</b> ").append(deviceStatusData.openAPSData.enacted!!.getString("reason")).append("<br>")
|
||||
if (deviceStatusData.openAPSData.suggested != null) string.append("<b>").append(dateUtil.minAgo(rh, deviceStatusData.openAPSData.clockSuggested)).append("</b> ")
|
||||
.append(deviceStatusData.openAPSData.suggested!!.getString("reason")).append("<br>")
|
||||
return fromHtml(string.toString())
|
||||
} catch (e: JSONException) {
|
||||
aapsLogger.error("Unhandled exception", e)
|
||||
|
@ -321,7 +323,7 @@ class NSDeviceStatus @Inject constructor(
|
|||
val uploaderStatusSpanned: Spanned
|
||||
get() {
|
||||
val string = StringBuilder()
|
||||
string.append("<span style=\"color:${rh.gcs(R.color.defaultText)}\">")
|
||||
string.append("<span style=\"color:${rh.gac(R.attr.nsTitleColor)}\">")
|
||||
string.append(rh.gs(R.string.uploader_short))
|
||||
string.append(": </span>")
|
||||
val iterator: Iterator<*> = deviceStatusData.uploaderMap.entries.iterator()
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
package info.nightscout.androidaps.plugins.source
|
||||
|
||||
import android.content.Context
|
||||
import androidx.work.Worker
|
||||
import androidx.work.WorkerParameters
|
||||
import androidx.work.workDataOf
|
||||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.Constants
|
||||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.database.AppRepository
|
||||
import info.nightscout.androidaps.database.entities.GlucoseValue
|
||||
import info.nightscout.androidaps.database.transactions.CgmSourceTransaction
|
||||
import info.nightscout.androidaps.interfaces.BgSource
|
||||
import info.nightscout.androidaps.interfaces.PluginBase
|
||||
import info.nightscout.androidaps.interfaces.PluginDescription
|
||||
import info.nightscout.androidaps.interfaces.PluginType
|
||||
import info.nightscout.shared.logging.AAPSLogger
|
||||
import info.nightscout.shared.logging.LTag
|
||||
import info.nightscout.androidaps.receivers.DataWorker
|
||||
import info.nightscout.androidaps.services.Intents
|
||||
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
import kotlin.math.log
|
||||
|
||||
@Singleton
|
||||
class AidexPlugin @Inject constructor(
|
||||
injector: HasAndroidInjector,
|
||||
rh: ResourceHelper,
|
||||
aapsLogger: AAPSLogger
|
||||
) : PluginBase(PluginDescription()
|
||||
.mainType(PluginType.BGSOURCE)
|
||||
.fragmentClass(BGSourceFragment::class.java.name)
|
||||
.pluginIcon((R.drawable.ic_blooddrop_48))
|
||||
.pluginName(R.string.aidex)
|
||||
.shortName(R.string.aidex_short)
|
||||
.description(R.string.description_source_aidex),
|
||||
aapsLogger, rh, injector
|
||||
), BgSource {
|
||||
|
||||
private var advancedFiltering = false
|
||||
|
||||
/**
|
||||
* Aidex App doesn't have upload to NS
|
||||
*/
|
||||
override fun shouldUploadToNs(glucoseValue: GlucoseValue): Boolean = true
|
||||
|
||||
override fun advancedFilteringSupported(): Boolean {
|
||||
return advancedFiltering
|
||||
}
|
||||
|
||||
// cannot be inner class because of needed injection
|
||||
class AidexWorker(
|
||||
context: Context,
|
||||
params: WorkerParameters
|
||||
) : Worker(context, params) {
|
||||
|
||||
@Inject lateinit var aapsLogger: AAPSLogger
|
||||
@Inject lateinit var aidexPlugin: AidexPlugin
|
||||
@Inject lateinit var repository: AppRepository
|
||||
@Inject lateinit var dataWorker: DataWorker
|
||||
|
||||
init {
|
||||
(context.applicationContext as HasAndroidInjector).androidInjector().inject(this)
|
||||
}
|
||||
|
||||
override fun doWork(): Result {
|
||||
var ret = Result.success()
|
||||
|
||||
if (!aidexPlugin.isEnabled()) return Result.success(workDataOf("Result" to "Plugin not enabled"))
|
||||
val bundle = dataWorker.pickupBundle(inputData.getLong(DataWorker.STORE_KEY, -1))
|
||||
?: return Result.failure(workDataOf("Error" to "missing input data"))
|
||||
|
||||
aapsLogger.debug(LTag.BGSOURCE, "Received Aidex data: $bundle")
|
||||
|
||||
if (bundle.containsKey(Intents.AIDEX_TRANSMITTER_SN)) aapsLogger.debug(LTag.BGSOURCE, "transmitterSerialNumber: " + bundle.getString(Intents.AIDEX_TRANSMITTER_SN))
|
||||
if (bundle.containsKey(Intents.AIDEX_SENSOR_ID)) aapsLogger.debug(LTag.BGSOURCE, "sensorId: " + bundle.getString(Intents.AIDEX_SENSOR_ID))
|
||||
|
||||
val glucoseValues = mutableListOf<CgmSourceTransaction.TransactionGlucoseValue>()
|
||||
|
||||
val timestamp = bundle.getLong(Intents.AIDEX_TIMESTAMP, 0)
|
||||
val bgType = bundle.getString(Intents.AIDEX_BG_TYPE, "mg/dl")
|
||||
val bgValue = bundle.getDouble(Intents.AIDEX_BG_VALUE, 0.0)
|
||||
|
||||
val bgValueTarget = if (bgType.equals("mg/dl")) bgValue else bgValue * Constants.MMOLL_TO_MGDL
|
||||
|
||||
aapsLogger.debug(LTag.BGSOURCE, "Received Aidex broadcast [time=$timestamp, bgType=$bgType, value=$bgValue, targetValue=$bgValueTarget")
|
||||
|
||||
glucoseValues += CgmSourceTransaction.TransactionGlucoseValue(
|
||||
timestamp = timestamp,
|
||||
value = bgValueTarget,
|
||||
raw = null,
|
||||
noise = null,
|
||||
trendArrow = GlucoseValue.TrendArrow.fromString(bundle.getString(Intents.AIDEX_BG_SLOPE_NAME)),
|
||||
sourceSensor = GlucoseValue.SourceSensor.AIDEX
|
||||
)
|
||||
repository.runTransactionForResult(CgmSourceTransaction(glucoseValues, emptyList(), null))
|
||||
.doOnError {
|
||||
aapsLogger.error(LTag.DATABASE, "Error while saving values from Aidex", it)
|
||||
ret = Result.failure(workDataOf("Error" to it.toString()))
|
||||
}
|
||||
.blockingGet()
|
||||
.also { savedValues ->
|
||||
savedValues.all().forEach {
|
||||
aapsLogger.debug(LTag.DATABASE, "Inserted bg $it")
|
||||
}
|
||||
}
|
||||
return ret
|
||||
}
|
||||
}
|
||||
}
|
|
@ -197,6 +197,7 @@ class BGSourceFragment : DaggerFragment() {
|
|||
R.string.tomato -> Sources.Tomato
|
||||
R.string.glunovo -> Sources.Glunovo
|
||||
R.string.xdrip -> Sources.Xdrip
|
||||
R.string.aidex -> Sources.Aidex
|
||||
else -> Sources.Unknown
|
||||
}
|
||||
uel.log(
|
||||
|
|
|
@ -66,6 +66,9 @@ open class DataReceiver : DaggerBroadcastReceiver() {
|
|||
Intents.DEXCOM_BG ->
|
||||
OneTimeWorkRequest.Builder(DexcomPlugin.DexcomWorker::class.java)
|
||||
.setInputData(dataWorker.storeInputData(bundle, intent)).build()
|
||||
Intents.AIDEX_NEW_BG_ESTIMATE ->
|
||||
OneTimeWorkRequest.Builder(AidexPlugin.AidexWorker::class.java)
|
||||
.setInputData(dataWorker.storeInputData(bundle, intent)).build()
|
||||
else -> null
|
||||
}?.let { request -> dataWorker.enqueue(request) }
|
||||
}
|
||||
|
|
|
@ -31,6 +31,15 @@ interface Intents {
|
|||
const val POCTECH_BG = "com.china.poctech.data"
|
||||
const val TOMATO_BG = "com.fanqies.tomatofn.BgEstimate"
|
||||
|
||||
// Aidex -> AAPS
|
||||
var AIDEX_NEW_BG_ESTIMATE = "com.microtechmd.cgms.aidex.action.BgEstimate"
|
||||
var AIDEX_BG_TYPE = "com.microtechmd.cgms.aidex.BgType"
|
||||
var AIDEX_BG_VALUE = "com.microtechmd.cgms.aidex.BgValue"
|
||||
var AIDEX_BG_SLOPE_NAME = "com.microtechmd.cgms.aidex.BgSlopeName"
|
||||
var AIDEX_TIMESTAMP = "com.microtechmd.cgms.aidex.Time" // epoch in ms
|
||||
var AIDEX_TRANSMITTER_SN = "com.microtechmd.cgms.aidex.TransmitterSerialNumber"
|
||||
var AIDEX_SENSOR_ID = "com.microtechmd.cgms.aidex.SensorId"
|
||||
|
||||
// Broadcast status
|
||||
const val AAPS_BROADCAST = "info.nightscout.androidaps.status"
|
||||
}
|
||||
|
|
|
@ -47,56 +47,100 @@
|
|||
android:orientation="horizontal"
|
||||
android:padding="5dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tdds"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardview_tdds"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:orientation="vertical" />
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardUseCompatPadding="false"
|
||||
app:contentPadding="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tir"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/done_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@android:color/transparent"
|
||||
android:gravity="end"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/reset"
|
||||
style="@style/OkCancelButton.Text"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:id="@+id/tdds"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/reset" />
|
||||
android:layout_marginStart="10dp"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/ok"
|
||||
style="@style/OkCancelButton.Text"
|
||||
android:layout_width="wrap_content"
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardview_tir"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardUseCompatPadding="false"
|
||||
app:contentPadding="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tir"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/ok" />
|
||||
android:layout_marginStart="10dp"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardview_activity"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardUseCompatPadding="false"
|
||||
app:contentPadding="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/done_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@android:color/transparent"
|
||||
android:gravity="end"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/reset"
|
||||
style="@style/OkCancelButton.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/reset" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/ok"
|
||||
style="@style/OkCancelButton.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/ok" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -135,7 +135,6 @@
|
|||
android:id="@+id/nsclient"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorControlHighlight"
|
||||
app:alignContent="stretch"
|
||||
app:alignItems="stretch"
|
||||
app:flexDirection="row"
|
||||
|
|
|
@ -1212,6 +1212,7 @@
|
|||
<string name="show_hide_records">Hide loop records</string>
|
||||
<string name="widget_description">AndroidAPS widget</string>
|
||||
<string name="configure">Configure opacity</string>
|
||||
|
||||
<string name="a11y_otp_qr_code">QR Code for setup one time password</string>
|
||||
<string name="a11y_open_settings">open settings</string>
|
||||
<string name="a11y_set_carb_timer">set carb timer alarm</string>
|
||||
|
@ -1221,4 +1222,10 @@
|
|||
<string name="a11y_only_on_watch">only on watch</string>
|
||||
<string name="a11y_only_on_phone">only on phone</string>
|
||||
<string name="a11y_drag_and_drop_handle">drag and drop handle</string>
|
||||
|
||||
<!-- Aidex Cgms -->
|
||||
<string name="aidex">GlucoRx Aidex</string>
|
||||
<string name="aidex_short">Aidex</string>
|
||||
<string name="description_source_aidex">Receive BG values from GlucoRx Aidex CGMS.</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -255,6 +255,7 @@ class Translator @Inject internal constructor(
|
|||
Sources.MM640g -> TODO()
|
||||
Sources.NSClientSource -> TODO()
|
||||
Sources.PocTech -> TODO()
|
||||
Sources.Aidex -> TODO()
|
||||
Sources.Tomato -> TODO()
|
||||
Sources.Xdrip -> TODO()
|
||||
Sources.LocalProfile -> TODO()
|
||||
|
@ -293,4 +294,4 @@ class Translator @Inject internal constructor(
|
|||
|
||||
else -> source.name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,6 +109,7 @@ class UserEntryMapper {
|
|||
Actions (UserEntry.Sources.Actions),
|
||||
Automation (UserEntry.Sources.Automation),
|
||||
BG (UserEntry.Sources.BG),
|
||||
Aidex (UserEntry.Sources.Aidex),
|
||||
Dexcom (UserEntry.Sources.Dexcom),
|
||||
Eversense (UserEntry.Sources.Eversense),
|
||||
Glimp (UserEntry.Sources.Glimp),
|
||||
|
@ -150,4 +151,4 @@ class UserEntryMapper {
|
|||
Unknown(UserEntry.Sources.Unknown)
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ class UserEntryPresentationHelper @Inject constructor(
|
|||
Sources.Actions -> R.drawable.ic_action
|
||||
Sources.Automation -> R.drawable.ic_automation
|
||||
Sources.BG -> R.drawable.ic_generic_cgm
|
||||
Sources.Aidex -> R.drawable.ic_blooddrop_48
|
||||
Sources.Dexcom -> R.drawable.ic_dexcom_g6
|
||||
Sources.Eversense -> R.drawable.ic_eversense
|
||||
Sources.Glimp -> R.drawable.ic_glimp
|
||||
|
@ -226,4 +227,4 @@ class UserEntryPresentationHelper @Inject constructor(
|
|||
|
||||
private fun String.addWithSeparator(add: Any) =
|
||||
this + (if (this.isBlank()) "" else " / ") + add.toString()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -241,6 +241,8 @@
|
|||
<item name="isNotCompletedColor">@color/isNotCompleted</item>
|
||||
<item name="materialCalendarStyle">@style/DatePicker</item>
|
||||
<item name="materialTimePickerStyle">@style/DatePicker</item>
|
||||
<!---Nightscout client TitelColor -->
|
||||
<item name="nsTitleColor">@color/defaulttext</item>
|
||||
</style>
|
||||
|
||||
<style name="Aaps_ActionBarStyle" parent="@style/Widget.AppCompat.ActionBar">
|
||||
|
|
|
@ -213,4 +213,6 @@
|
|||
<attr name="separatorColor" format="reference|color" />
|
||||
<attr name="isCompletedColor" format="reference|color" />
|
||||
<attr name="isNotCompletedColor" format="reference|color" />
|
||||
<!---Nightscout client TitelColor -->
|
||||
<attr name="nsTitleColor" format="reference|color" />
|
||||
</resources>
|
|
@ -60,7 +60,7 @@
|
|||
<color name="errorAlertHeaderText">#FF000000</color>
|
||||
<color name="helperProfile">#C803A9F4</color>
|
||||
<color name="examinedProfile">#FFFF5555</color>
|
||||
<color name="defaultText">#BBBBBB</color>
|
||||
<color name="defaulttext">#666666</color>
|
||||
|
||||
<!-- Datepicker-->
|
||||
<color name="dateTimePickerBackground">@color/white</color>
|
||||
|
|
|
@ -242,6 +242,8 @@
|
|||
<item name="separatorColor">@color/sphere_plastic_grey</item>
|
||||
<item name="isCompletedColor">@color/isCompleted</item>
|
||||
<item name="isNotCompletedColor">@color/isNotCompleted</item>
|
||||
<!---Nightscout client TitelColor -->
|
||||
<item name="nsTitleColor">@color/defaulttext</item>
|
||||
</style>
|
||||
|
||||
<style name="Aaps_ActionBarStyle" parent="@style/Widget.AppCompat.ActionBar">
|
||||
|
|
|
@ -111,6 +111,7 @@ data class GlucoseValue(
|
|||
GLUNOVO_NATIVE("Glunovo"),
|
||||
MM_600_SERIES("MM600Series"),
|
||||
EVERSENSE("Eversense"),
|
||||
AIDEX("GlucoRx Aidex"),
|
||||
RANDOM("Random"),
|
||||
UNKNOWN("Unknown"),
|
||||
|
||||
|
|
|
@ -139,6 +139,7 @@ data class UserEntry(
|
|||
Actions, //From Actions plugin
|
||||
Automation, //From Automation plugin
|
||||
BG, //From BG plugin => Add One Source per BG Source for Calibration or Sensor Change
|
||||
Aidex,
|
||||
Dexcom,
|
||||
Eversense,
|
||||
Glimp,
|
||||
|
@ -197,4 +198,4 @@ data class UserEntry(
|
|||
Pump,
|
||||
Aaps
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue