0.10.3-SNAPSHOT

- fix for error
This commit is contained in:
Andy Rozman 2019-05-18 18:25:40 +01:00
parent a897a72142
commit 26d02c0062
4 changed files with 14 additions and 4 deletions

View file

@ -105,7 +105,7 @@ android {
multiDexEnabled true multiDexEnabled true
versionCode 1500 versionCode 1500
// dev_version: 2.3.1-dev // dev_version: 2.3.1-dev
version "medtronic-0.10.2-SNAPSHOT" version "medtronic-0.10.3-SNAPSHOT"
buildConfigField "String", "VERSION", '"' + version + '"' buildConfigField "String", "VERSION", '"' + version + '"'
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"' buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
buildConfigField "String", "HEAD", '"' + generateGitBuild() + '"' buildConfigField "String", "HEAD", '"' + generateGitBuild() + '"'

View file

@ -187,10 +187,10 @@ public class MainApp extends Application {
pluginsList.add(CareportalPlugin.getPlugin()); pluginsList.add(CareportalPlugin.getPlugin());
if (Config.PUMPDRIVERS) pluginsList.add(ComboPlugin.getPlugin()); if (Config.PUMPDRIVERS) pluginsList.add(ComboPlugin.getPlugin());
if (Config.MDI) pluginsList.add(MDIPlugin.getPlugin()); if (Config.MDI) pluginsList.add(MDIPlugin.getPlugin());
pluginsList.add(VirtualPumpPlugin.getPlugin());
if (Config.PUMPDRIVERS && engineeringMode) { if (Config.PUMPDRIVERS && engineeringMode) {
pluginsList.add(MedtronicPumpPlugin.getPlugin()); pluginsList.add(MedtronicPumpPlugin.getPlugin());
} }
pluginsList.add(VirtualPumpPlugin.getPlugin());
if (Config.APS) pluginsList.add(LoopPlugin.getPlugin()); if (Config.APS) pluginsList.add(LoopPlugin.getPlugin());
if (Config.APS) pluginsList.add(OpenAPSMAPlugin.getPlugin()); if (Config.APS) pluginsList.add(OpenAPSMAPlugin.getPlugin());
if (Config.APS) pluginsList.add(OpenAPSAMAPlugin.getPlugin()); if (Config.APS) pluginsList.add(OpenAPSAMAPlugin.getPlugin());

View file

@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import info.nightscout.androidaps.R; import info.nightscout.androidaps.R;
import info.nightscout.androidaps.MainApp;
public enum RileyLinkEncodingType { public enum RileyLinkEncodingType {
@ -24,7 +25,7 @@ public enum RileyLinkEncodingType {
for (RileyLinkEncodingType encType : values()) { for (RileyLinkEncodingType encType : values()) {
if (encType.resourceId!=null) { if (encType.resourceId!=null) {
encodingTypeMap.put(MainApp.gs(encType.resourceId), encType);
} }
} }
} }
@ -34,9 +35,18 @@ public enum RileyLinkEncodingType {
this.value = (byte)value; this.value = (byte)value;
} }
RileyLinkEncodingType(int value, Integer resourceId) { RileyLinkEncodingType(int value, Integer resourceId) {
this.value = (byte)value; this.value = (byte)value;
this.resourceId = resourceId; this.resourceId = resourceId;
} }
public static RileyLinkEncodingType getByDescription(String description) {
if (encodingTypeMap.containsKey(description)) {
return encodingTypeMap.get(description);
}
return RileyLinkEncodingType.FourByteSixByteLocal;
}
} }

View file

@ -253,7 +253,7 @@ public class MedtronicPumpStatus extends PumpStatus {
String encodingTypeStr = SP.getString(MedtronicConst.Prefs.Encoding, null); String encodingTypeStr = SP.getString(MedtronicConst.Prefs.Encoding, null);
RileyLinkEncodingType newEncodingType = RileyLinkEncodingType.valueOf(encodingTypeStr); RileyLinkEncodingType newEncodingType = RileyLinkEncodingType.getByDescription(encodingTypeStr);
if (this.encodingType == null) { if (this.encodingType == null) {
this.encodingType = newEncodingType; this.encodingType = newEncodingType;