Skip to content

Commit

Permalink
compilation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mushroom-dev committed Dec 14, 2024
1 parent 9f2a45e commit e5319cc
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -933,7 +933,7 @@ class SmsCommunicatorPlugin @Inject constructor(
if (divided.size == 3 && !isMeal) {
sendSMS(Sms(receivedSms.phoneNumber, rh.gs(R.string.wrong_format)))
} else if (bolus > 0.0) {
val iob = (iobCobCalculator.calculateIobFromBolus() + iobCobCalculator.calculateIobFromTempBasalsIncludingConvertedExtended()).round()
val iob = iobCobCalculator.calculateIobFromBolus().round().iob + iobCobCalculator.calculateIobFromTempBasalsIncludingConvertedExtended().round().basaliob
val passCode = generatePassCode()
val reply = if (isMeal)
rh.gs(R.string.smscommunicator_meal_bolus_reply_with_code, bolus, passCode, iob)
3 changes: 2 additions & 1 deletion ui/src/main/kotlin/app/aaps/ui/dialogs/InsulinDialog.kt
Original file line number Diff line number Diff line change
@@ -130,7 +130,8 @@ class InsulinDialog : DialogFragmentWithDate() {

val pump = activePlugin.activePump
if (config.NSCLIENT) {
// If SmsAllowRemoteCommands is True, then user might use either SMS command or record only, otherwise hardcode record_only option
// If SmsAllowRemoteCommands is True and valid phone number is provided. then user might use either SMS command or record only.
// Hardcode record_only option otherwise
val allowSms = preferences.get(BooleanKey.SmsAllowRemoteCommands)
if(allowSms) {
binding.recordOnly.isEnabled = !preferences.get(StringKey.SmsReceiverNumber).isNullOrBlank()

0 comments on commit e5319cc

Please sign in to comment.