fix crash when pump status not loaded yet
This commit is contained in:
parent
3d3e849d8a
commit
b9b08c1528
|
@ -258,6 +258,8 @@ public class DanaRPlugin implements PluginBase, PumpInterface, ConstraintsInterf
|
||||||
if (!isInitialized())
|
if (!isInitialized())
|
||||||
return true; // TODO: not sure what's better. so far TRUE to prevent too many SMS
|
return true; // TODO: not sure what's better. so far TRUE to prevent too many SMS
|
||||||
DanaRPump pump = getDanaRPump();
|
DanaRPump pump = getDanaRPump();
|
||||||
|
if (pump.pumpProfiles == null)
|
||||||
|
return true; // TODO: not sure what's better. so far TRUE to prevent too many SMS
|
||||||
int basalValues = pump.basal48Enable ? 48 : 24;
|
int basalValues = pump.basal48Enable ? 48 : 24;
|
||||||
int basalIncrement = pump.basal48Enable ? 30 * 60 : 60 * 60;
|
int basalIncrement = pump.basal48Enable ? 30 * 60 : 60 * 60;
|
||||||
for (int h = 0; h < basalValues; h++) {
|
for (int h = 0; h < basalValues; h++) {
|
||||||
|
|
|
@ -258,6 +258,8 @@ public class DanaRKoreanPlugin implements PluginBase, PumpInterface, Constraints
|
||||||
if (!isInitialized())
|
if (!isInitialized())
|
||||||
return true; // TODO: not sure what's better. so far TRUE to prevent too many SMS
|
return true; // TODO: not sure what's better. so far TRUE to prevent too many SMS
|
||||||
DanaRKoreanPump pump = getDanaRPump();
|
DanaRKoreanPump pump = getDanaRPump();
|
||||||
|
if (pump.pumpProfiles == null)
|
||||||
|
return true; // TODO: not sure what's better. so far TRUE to prevent too many SMS
|
||||||
int basalValues = pump.basal48Enable ? 48 : 24;
|
int basalValues = pump.basal48Enable ? 48 : 24;
|
||||||
int basalIncrement = pump.basal48Enable ? 30 * 60 : 60 * 60;
|
int basalIncrement = pump.basal48Enable ? 30 * 60 : 60 * 60;
|
||||||
for (int h = 0; h < basalValues; h++) {
|
for (int h = 0; h < basalValues; h++) {
|
||||||
|
|
Loading…
Reference in a new issue