commit
36023e35db
|
@ -109,7 +109,7 @@ android {
|
|||
defaultConfig {
|
||||
multiDexEnabled true
|
||||
versionCode 1500
|
||||
version "3.0.0"
|
||||
version "3.0.0.1"
|
||||
buildConfigField "String", "VERSION", '"' + version + '"'
|
||||
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
|
||||
buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"'
|
||||
|
|
|
@ -75,7 +75,7 @@ class NSClientAddUpdateWorker(
|
|||
if (mills > latestDateInReceivedData) latestDateInReceivedData = mills
|
||||
|
||||
if (insulin > 0) {
|
||||
if (sp.getBoolean(R.string.key_ns_receive_insulin, false) && buildHelper.isEngineeringMode() || config.NSCLIENT) {
|
||||
if (sp.getBoolean(R.string.key_ns_receive_insulin, false) || config.NSCLIENT) {
|
||||
bolusFromJson(json)?.let { bolus ->
|
||||
repository.runTransactionForResult(SyncNsBolusTransaction(bolus))
|
||||
.doOnError {
|
||||
|
@ -109,7 +109,7 @@ class NSClientAddUpdateWorker(
|
|||
}
|
||||
}
|
||||
if (carbs > 0) {
|
||||
if (sp.getBoolean(R.string.key_ns_receive_carbs, false) && buildHelper.isEngineeringMode() || config.NSCLIENT) {
|
||||
if (sp.getBoolean(R.string.key_ns_receive_carbs, false) || config.NSCLIENT) {
|
||||
carbsFromJson(json)?.let { carb ->
|
||||
repository.runTransactionForResult(SyncNsCarbsTransaction(carb))
|
||||
.doOnError {
|
||||
|
@ -159,7 +159,7 @@ class NSClientAddUpdateWorker(
|
|||
when {
|
||||
insulin > 0 || carbs > 0 -> Any()
|
||||
eventType == TherapyEvent.Type.TEMPORARY_TARGET.text ->
|
||||
if (sp.getBoolean(R.string.key_ns_receive_temp_target, false) && buildHelper.isEngineeringMode() || config.NSCLIENT) {
|
||||
if (sp.getBoolean(R.string.key_ns_receive_temp_target, false) || config.NSCLIENT) {
|
||||
temporaryTargetFromJson(json)?.let { temporaryTarget ->
|
||||
repository.runTransactionForResult(SyncNsTemporaryTargetTransaction(temporaryTarget))
|
||||
.doOnError {
|
||||
|
@ -205,7 +205,7 @@ class NSClientAddUpdateWorker(
|
|||
} ?: aapsLogger.error("Error parsing TT json $json")
|
||||
}
|
||||
eventType == TherapyEvent.Type.NOTE.text && json.isEffectiveProfileSwitch() -> // replace this by new Type when available in NS
|
||||
if (sp.getBoolean(R.string.key_ns_receive_profile_switch, false) && buildHelper.isEngineeringMode() || config.NSCLIENT) {
|
||||
if (sp.getBoolean(R.string.key_ns_receive_profile_switch, false) || config.NSCLIENT) {
|
||||
effectiveProfileSwitchFromJson(json, dateUtil)?.let { effectiveProfileSwitch ->
|
||||
repository.runTransactionForResult(SyncNsEffectiveProfileSwitchTransaction(effectiveProfileSwitch))
|
||||
.doOnError {
|
||||
|
@ -399,7 +399,7 @@ class NSClientAddUpdateWorker(
|
|||
} ?: aapsLogger.error("Error parsing TemporaryBasal json $json")
|
||||
}
|
||||
eventType == TherapyEvent.Type.PROFILE_SWITCH.text ->
|
||||
if (sp.getBoolean(R.string.key_ns_receive_profile_switch, false) && buildHelper.isEngineeringMode() || config.NSCLIENT) {
|
||||
if (sp.getBoolean(R.string.key_ns_receive_profile_switch, false) || config.NSCLIENT) {
|
||||
profileSwitchFromJson(json, dateUtil, activePlugin)?.let { profileSwitch ->
|
||||
repository.runTransactionForResult(SyncNsProfileSwitchTransaction(profileSwitch))
|
||||
.doOnError {
|
||||
|
|
|
@ -154,10 +154,10 @@ class NSClientPlugin @Inject constructor(
|
|||
// preferenceFragment.findPreference<SwitchPreference>(rh.gs(R.string.key_ns_sync_use_absolute))?.isVisible = false
|
||||
} else {
|
||||
// APS or pumpControl mode
|
||||
preferenceFragment.findPreference<SwitchPreference>(rh.gs(R.string.key_ns_receive_profile_switch))?.isVisible = buildHelper.isEngineeringMode()
|
||||
preferenceFragment.findPreference<SwitchPreference>(rh.gs(R.string.key_ns_receive_insulin))?.isVisible = buildHelper.isEngineeringMode()
|
||||
preferenceFragment.findPreference<SwitchPreference>(rh.gs(R.string.key_ns_receive_carbs))?.isVisible = buildHelper.isEngineeringMode()
|
||||
preferenceFragment.findPreference<SwitchPreference>(rh.gs(R.string.key_ns_receive_temp_target))?.isVisible = buildHelper.isEngineeringMode()
|
||||
// preferenceFragment.findPreference<SwitchPreference>(rh.gs(R.string.key_ns_receive_profile_switch))?.isVisible = buildHelper.isEngineeringMode()
|
||||
// preferenceFragment.findPreference<SwitchPreference>(rh.gs(R.string.key_ns_receive_insulin))?.isVisible = buildHelper.isEngineeringMode()
|
||||
// preferenceFragment.findPreference<SwitchPreference>(rh.gs(R.string.key_ns_receive_carbs))?.isVisible = buildHelper.isEngineeringMode()
|
||||
// preferenceFragment.findPreference<SwitchPreference>(rh.gs(R.string.key_ns_receive_temp_target))?.isVisible = buildHelper.isEngineeringMode()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package info.nightscout.androidaps.plugins.general.overview
|
||||
|
||||
import android.graphics.Color
|
||||
import android.view.View
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.StringRes
|
||||
import info.nightscout.androidaps.R
|
||||
|
@ -39,7 +40,12 @@ class StatusLightHandler @Inject constructor(
|
|||
val pump = activePlugin.activePump
|
||||
val bgSource = activePlugin.activeBgSource
|
||||
handleAge(careportal_cannula_age, TherapyEvent.Type.CANNULA_CHANGE, R.string.key_statuslights_cage_warning, 48.0, R.string.key_statuslights_cage_critical, 72.0)
|
||||
handleAge(careportal_insulin_age, TherapyEvent.Type.INSULIN_CHANGE, R.string.key_statuslights_iage_warning, 72.0, R.string.key_statuslights_iage_critical, 144.0)
|
||||
if (pump.model() == PumpType.OMNIPOD_EROS || pump.model() == PumpType.OMNIPOD_DASH) {
|
||||
careportal_insulin_age?.visibility = View.GONE
|
||||
} else {
|
||||
careportal_insulin_age?.visibility = View.VISIBLE
|
||||
handleAge(careportal_insulin_age, TherapyEvent.Type.INSULIN_CHANGE, R.string.key_statuslights_iage_warning, 72.0, R.string.key_statuslights_iage_critical, 144.0)
|
||||
}
|
||||
handleAge(careportal_sensor_age, TherapyEvent.Type.SENSOR_CHANGE, R.string.key_statuslights_sage_warning, 216.0, R.string.key_statuslights_sage_critical, 240.0)
|
||||
if (pump.pumpDescription.isBatteryReplaceable || (pump is OmnipodErosPumpPlugin && pump.isUseRileyLinkBatteryLevel && pump.isBatteryChangeLoggingEnabled)) {
|
||||
handleAge(careportal_pb_age, TherapyEvent.Type.PUMP_BATTERY_CHANGE, R.string.key_statuslights_bage_warning, 216.0, R.string.key_statuslights_bage_critical, 240.0)
|
||||
|
|
Loading…
Reference in a new issue