RS report unsupported firmware
This commit is contained in:
parent
455383cfd5
commit
9d7e2f1bec
3 changed files with 10 additions and 0 deletions
|
@ -55,6 +55,7 @@ public class Notification {
|
|||
public static final int WRONG_DRIVER = 24;
|
||||
public static final int PUMP_UNREACHABLE = 26;
|
||||
public static final int BG_READINGS_MISSED = 27;
|
||||
public static final int UNSUPPORTED_FIRMWARE = 28;
|
||||
|
||||
public int id;
|
||||
public Date date;
|
||||
|
|
|
@ -6,6 +6,10 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import info.nightscout.androidaps.Config;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.plugins.Overview.events.EventNewNotification;
|
||||
import info.nightscout.androidaps.plugins.Overview.notifications.Notification;
|
||||
import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPump;
|
||||
|
||||
public class DanaRS_Packet_General_Get_Pump_Check extends DanaRS_Packet {
|
||||
|
@ -37,6 +41,10 @@ public class DanaRS_Packet_General_Get_Pump_Check extends DanaRS_Packet {
|
|||
log.debug("Protocol: " + String.format("%02X ", pump.protocol));
|
||||
log.debug("Product Code: " + String.format("%02X ", pump.productCode));
|
||||
}
|
||||
|
||||
if (pump.productCode < 2) {
|
||||
MainApp.bus().post(new EventNewNotification(new Notification(Notification.UNSUPPORTED_FIRMWARE, MainApp.sResources.getString(R.string.unsupportedfirmware), Notification.URGENT)));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -784,5 +784,6 @@
|
|||
<string name="customapp">Customized APK for download</string>
|
||||
<string name="wear_detailed_delta_title">Show detailed delta</string>
|
||||
<string name="wear_detailed_delta_summary">Show delta with one more decimal place</string>
|
||||
<string name="unsupportedfirmware">Unsupported pump firmware</string>
|
||||
</resources>
|
||||
|
||||
|
|
Loading…
Reference in a new issue