add missing pump types, hide buttons in Action tab, fix configuration sync

This commit is contained in:
Milos Kozak 2021-11-07 19:54:15 +01:00
parent 3bbf50ca3e
commit cb4b4b5e21
6 changed files with 15 additions and 9 deletions

View file

@ -274,7 +274,7 @@ class ActionsFragment : DaggerFragment() {
pump.isInitialized() &&
!pump.isSuspended()).toVisibility()
if (!pump.pumpDescription.isExtendedBolusCapable || !pump.isInitialized() || pump.isSuspended() || pump.isFakingTempsByExtendedBoluses) {
if (!pump.pumpDescription.isExtendedBolusCapable || !pump.isInitialized() || pump.isSuspended() || pump.isFakingTempsByExtendedBoluses || config.NSCLIENT) {
extendedBolus?.visibility = View.GONE
extendedBolusCancel?.visibility = View.GONE
} else {
@ -290,7 +290,7 @@ class ActionsFragment : DaggerFragment() {
}
}
if (!pump.pumpDescription.isTempBasalCapable || !pump.isInitialized() || pump.isSuspended()) {
if (!pump.pumpDescription.isTempBasalCapable || !pump.isInitialized() || pump.isSuspended() || config.NSCLIENT) {
setTempBasal?.visibility = View.GONE
cancelTempBasal?.visibility = View.GONE
} else {

View file

@ -92,9 +92,10 @@
<string-array name="virtualPumpTypes">
<item>Generic AAPS</item>
<item>Accu-Chek Spirit</item>
<item>Accu-Chek Combo</item>
<item>Accu-Chek Spirit</item>
<item>Accu-Chek Insight</item>
<item>Accu-Chek Solo</item>
<item>Animas Ping</item>
<item>Animas Vibe</item>
<item>Cellnovo</item>
@ -102,13 +103,16 @@
<item>DanaR Korean</item>
<item>DanaRS</item>
<item>DanaRv2</item>
<item>Insulet Omnipod</item>
<item>DanaI</item>
<item>Diaconn G8</item>
<item>Medtronic 512/712</item>
<item>Medtronic 515/715</item>
<item>Medtronic 522/722</item>
<item>Medtronic 523/723 (Revel)</item>
<item>Medtronic 554/754 (Veo)</item>
<item>Medtronic 640G</item>
<item>Omnipod Dash</item>
<item>Omnipod Eros</item>
<item>Tandem t:slim</item>
<item>Tandem t:flex</item>
<item>Tandem t:slim G4</item>

View file

@ -34,11 +34,13 @@ class RunningConfiguration @Inject constructor(
// called in AAPS mode only
fun configuration(): JSONObject {
val json = JSONObject()
val pumpInterface = activePlugin.activePump
if (!pumpInterface.isInitialized()) return json
if (counter++ % every == 0)
try {
val insulinInterface = activePlugin.activeInsulin
val sensitivityInterface = activePlugin.activeSensitivity
val pumpInterface = activePlugin.activePump
val overviewInterface = activePlugin.activeOverview
val safetyInterface = activePlugin.activeSafety

View file

@ -81,7 +81,8 @@ class DanaRSPlugin @Inject constructor(
private var danaRSService: DanaRSService? = null
private var mDeviceAddress = ""
var mDeviceName = ""
override val pumpDescription = PumpDescription(PumpType.DANA_RS)
override val pumpDescription
get() = PumpDescription(danaPump.pumpType())
override fun updatePreferenceSummary(pref: Preference) {
super.updatePreferenceSummary(pref)

View file

@ -9,7 +9,6 @@ import info.nightscout.androidaps.events.EventDanaRSyncStatus
import info.nightscout.androidaps.interfaces.PumpSync
import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.bus.RxBus
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
import info.nightscout.androidaps.utils.T
import org.joda.time.DateTime
import java.util.*