- small fix on MedtronicHistoryEntry initialization

- added version string into initialixzation of MedtrinicPumpPlugin
This commit is contained in:
Andy Rozman 2021-11-09 19:53:47 +00:00
parent 0d0c5e116f
commit af7a22a5df
2 changed files with 6 additions and 6 deletions

View file

@ -112,7 +112,7 @@ class MedtronicPumpPlugin @Inject constructor(
private var isBusy = false
override fun onStart() {
aapsLogger.debug(LTag.PUMP, deviceID() + " started.")
aapsLogger.debug(LTag.PUMP, deviceID() + " started. (V2.0005)")
serviceConnection = object : ServiceConnection {
override fun onServiceDisconnected(name: ComponentName) {
aapsLogger.debug(LTag.PUMP, "RileyLinkMedtronicService is disconnected")

View file

@ -14,13 +14,13 @@ import info.nightscout.androidaps.plugins.pump.common.utils.StringUtil
*/
abstract class MedtronicHistoryEntry : MedtronicHistoryEntryInterface {
lateinit var rawData: List<Byte>
var rawData: List<Byte> = listOf()
protected var sizes = IntArray(3)
lateinit var head: ByteArray
lateinit var datetime: ByteArray
lateinit var body: ByteArray
var head: ByteArray = byteArrayOf()
var datetime: ByteArray = byteArrayOf()
var body: ByteArray = byteArrayOf()
var id: Long = 0
@ -164,7 +164,7 @@ abstract class MedtronicHistoryEntry : MedtronicHistoryEntryInterface {
sb.append("]")
return sb.toString()
}
if (head.size != 0) {
if (head!=null && head.size != 0) {
sb.append(", head=")
sb.append(ByteUtil.shortHexString(head))
}