diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/command/insulin/program/util/ProgramBasalUtil.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/command/insulin/program/util/ProgramBasalUtil.kt index c363048557..5ce3028b0c 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/command/insulin/program/util/ProgramBasalUtil.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/command/insulin/program/util/ProgramBasalUtil.kt @@ -199,7 +199,7 @@ object ProgramBasalUtil { val index = ((hourOfDay * 60 + minuteOfHour) / 30).toByte() val secondOfDay = secondOfMinute + hourOfDay * 3600 + minuteOfHour * 60 val secondsRemaining = ((index + 1) * 1800 - secondOfDay).toShort() - val pulsesRemaining = (pulsesPerSlot!![index.toInt()].toDouble() * secondsRemaining / 1800).toShort() + val pulsesRemaining = (pulsesPerSlot!![index.toInt()].toDouble() * secondsRemaining / 1800).toInt().toShort() return CurrentSlot(index, (secondsRemaining * 8).toShort(), pulsesRemaining) }