DanaI 0x0A support
This commit is contained in:
parent
da76506e01
commit
909e909525
2 changed files with 7 additions and 7 deletions
|
@ -411,19 +411,19 @@ class DanaPump @Inject constructor(
|
|||
fun modelFriendlyName(): String =
|
||||
when (hwModel) {
|
||||
0x01 -> "DanaR Korean"
|
||||
0x03 ->
|
||||
0x03 ->
|
||||
when (protocol) {
|
||||
0x00 -> "DanaR old"
|
||||
0x02 -> "DanaR v2"
|
||||
else -> "DanaR" // 0x01 and 0x03 known
|
||||
}
|
||||
0x05 ->
|
||||
0x05 ->
|
||||
if (protocol < 10) "DanaRS"
|
||||
else "DanaRS v3"
|
||||
0x06 -> "DanaRS Korean"
|
||||
0x07 -> "Dana-i (BLE4.2)"
|
||||
0x09 -> "Dana-i (BLE5)"
|
||||
else -> "Unknown Dana pump"
|
||||
0x06 -> "DanaRS Korean"
|
||||
0x07 -> "Dana-i (BLE4.2)"
|
||||
0x09, 0x0A -> "Dana-i (BLE5)"
|
||||
else -> "Unknown Dana pump"
|
||||
}
|
||||
|
||||
fun pumpType(): PumpType =
|
||||
|
|
|
@ -573,7 +573,7 @@ class BLEComm @Inject internal constructor(
|
|||
disconnect("Non existing pairing key")
|
||||
}
|
||||
|
||||
if (danaPump.hwModel == 0x09) {
|
||||
if (danaPump.hwModel == 0x09 || danaPump.hwModel == 0x0A) {
|
||||
bleEncryption.setBle5Key(storedPairingKey.encodeToByteArray())
|
||||
aapsLogger.debug(LTag.PUMPBTCOMM, "<<<<< " + "ENCRYPTION__PUMP_CHECK BLE5 (OK)" + " " + DanaRSPacket.toHexString(decryptedBuffer))
|
||||
// Dana-i BLE5 Pump
|
||||
|
|
Loading…
Reference in a new issue