RS extended disabled warning
This commit is contained in:
parent
e3ad396f65
commit
6cee6c0f51
1 changed files with 13 additions and 0 deletions
|
@ -5,6 +5,12 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import info.nightscout.androidaps.Config;
|
||||
import com.cozmo.danar.util.BleCommandUtil;
|
||||
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.plugins.Overview.Notification;
|
||||
import info.nightscout.androidaps.plugins.Overview.events.EventDismissNotification;
|
||||
import info.nightscout.androidaps.plugins.Overview.events.EventNewNotification;
|
||||
import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPump;
|
||||
|
||||
public class DanaRS_Packet_Bolus_Get_Bolus_Option extends DanaRS_Packet {
|
||||
|
@ -95,6 +101,13 @@ public class DanaRS_Packet_Bolus_Get_Bolus_Option extends DanaRS_Packet {
|
|||
dataSize = 1;
|
||||
int missedBolus04EndMin = byteArrayToInt(getBytes(data, dataIndex, dataSize));
|
||||
|
||||
if (!pump.isExtendedBolusEnabled) {
|
||||
Notification notification = new Notification(Notification.EXTENDED_BOLUS_DISABLED, MainApp.sResources.getString(R.string.danar_enableextendedbolus), Notification.URGENT);
|
||||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
} else {
|
||||
MainApp.bus().post(new EventDismissNotification(Notification.EXTENDED_BOLUS_DISABLED));
|
||||
}
|
||||
|
||||
if (Config.logDanaMessageDetail) {
|
||||
log.debug("Extended bolus enabled: " + pump.isExtendedBolusEnabled);
|
||||
log.debug("Missed bolus config: " + pump.missedBolusConfig);
|
||||
|
|
Loading…
Reference in a new issue