- added change for remainingInsulin where we get too liitle data in some cases

This commit is contained in:
Andy Rozman 2023-02-18 17:32:28 +00:00
parent d869a343e1
commit 260729bf6d

View file

@ -82,6 +82,10 @@ class MedtronicConverter @Inject constructor(
if (strokes == 40) { if (strokes == 40) {
startIdx = 2 startIdx = 2
} }
if (rawData.size==2 && strokes == 40) {
aapsLogger.error(LTag.PUMPCOMM, "It seems configuration is not correct, detected model $pumpModel should have length bigger than 2, but it doesn't (data: $rawData)")
startIdx = 0
}
val reqLength = startIdx + 1 val reqLength = startIdx + 1
val value: Double val value: Double
value = if (reqLength >= rawData.size) { value = if (reqLength >= rawData.size) {