Skip to content

Commit 8f1ceb2

Browse files
v0.4.26.0 (final version for Phase 1 release)
- added 2 custom commands, Get Alerts and get Alarms, most of changes here are now for that change
1 parent fbb5bef commit 8f1ceb2

File tree

11 files changed

+160
-297
lines changed

11 files changed

+160
-297
lines changed

pump/tandem/schemas/info.nightscout.androidaps.plugins.pump.tslim.database.YpsoPumpDatabase/1.json

Lines changed: 0 additions & 288 deletions
This file was deleted.

pump/tandem/src/main/kotlin/app/aaps/pump/tandem/common/driver/TandemPumpStatus.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import app.aaps.pump.common.defs.PumpUpdateFragmentType
1717
import app.aaps.pump.common.events.EventPumpFragmentValuesChanged
1818
import app.aaps.pump.tandem.common.driver.connector.response.HomeScreenMirrorDto
1919
import app.aaps.pump.tandem.common.driver.connector.response.PumpVersionDto
20+
import com.jwoglom.pumpx2.pump.messages.response.currentStatus.AlarmStatusResponse
21+
import com.jwoglom.pumpx2.pump.messages.response.currentStatus.AlertStatusResponse
2022
import com.jwoglom.pumpx2.pump.messages.response.currentStatus.PumpFeaturesV1Response
2123
import com.jwoglom.pumpx2.pump.messages.response.currentStatus.PumpFeaturesV2Response
2224
import java.util.*
@@ -60,6 +62,8 @@ class TandemPumpStatus @Inject constructor(val resourceHelper: ResourceHelper,
6062
var featuresV1: PumpFeaturesV1Response? = null
6163
var lastQualifyingEventsInfo: String? = null
6264
var tandemPumpVersion : PumpVersionDto? = null
65+
var tandemAlerts : Set<AlertStatusResponse.AlertResponseType>? = null
66+
var tandemAlarms : Set<AlarmStatusResponse.AlarmResponseType>? = null
6367

6468
//var forceRefreshBasalProfile: Boolean = true
6569
//var basalProfilePump: BasalProfileDto? = null

pump/tandem/src/main/kotlin/app/aaps/pump/tandem/common/driver/connector/TandemPumpConnectionManager.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ import app.aaps.pump.common.driver.connector.commands.data.CustomCommandTypeInte
2323
import app.aaps.pump.tandem.common.data.defs.TandemPumpApiVersion
2424
import app.aaps.pump.tandem.common.driver.connector.def.TandemCustomCommand
2525
import app.aaps.pump.tandem.common.driver.connector.def.TandemCustomCommand.*
26+
import app.aaps.pump.tandem.common.driver.connector.response.AlarmStatusDto
27+
import app.aaps.pump.tandem.common.driver.connector.response.AlertStatusDto
2628
import app.aaps.pump.tandem.common.driver.connector.response.PumpVersionDto
2729
import app.aaps.pump.tandem.common.util.TandemPumpConst
2830
import io.reactivex.rxjava3.disposables.CompositeDisposable
@@ -191,6 +193,14 @@ class TandemPumpConnectionManager @Inject constructor(
191193
sp.putString(TandemPumpConst.Prefs.PumpSerial, "" + tandemPumpStatus.serialNumber)
192194
}
193195
}
196+
GET_ALARMS -> {
197+
val alarms = responseData.value as AlarmStatusDto
198+
tandemPumpStatus.tandemAlarms = alarms.alarms
199+
}
200+
GET_ALERTS -> {
201+
val alarms = responseData.value as AlertStatusDto
202+
tandemPumpStatus.tandemAlerts = alarms.alerts
203+
}
194204
else -> { }
195205
}
196206

0 commit comments

Comments
 (0)