Move carbs_suggestions_threshold to LoopPlugin so that non-critical carbs still show on overview (but no system notification)
This commit is contained in:
parent
b1097880f4
commit
72a3e825e3
|
@ -409,7 +409,9 @@ public class LoopPlugin extends PluginBase {
|
|||
if (closedLoopEnabled.value()) {
|
||||
|
||||
if (allowNotification) {
|
||||
if (resultAfterConstraints.isCarbsRequired() && carbsSuggestionsSuspendedUntil < System.currentTimeMillis()) {
|
||||
if (resultAfterConstraints.isCarbsRequired()
|
||||
&& resultAfterConstraints.carbsReq >= sp.getInt(R.string.key_smb_enable_carbs_suggestions_threshold, 0)
|
||||
&& carbsSuggestionsSuspendedUntil < System.currentTimeMillis()) {
|
||||
|
||||
Intent intentAction5m = new Intent(context, CarbSuggestionReceiver.class);
|
||||
intentAction5m.putExtra("ignoreDuration",5);
|
||||
|
|
|
@ -36,8 +36,7 @@ public class DetermineBasalResultSMB extends APSResult {
|
|||
//if (result.has("insulinReq")) insulinReq = result.getDouble("insulinReq");
|
||||
|
||||
if (SP.getBoolean(R.string.key_smb_enable_carbs_suggestions, false)) {
|
||||
if (result.has("carbsReq") && result.getInt("carbsReq") >= SP.getInt(R.string.key_smb_enable_carbs_suggestions_threshold, 0))
|
||||
carbsReq = result.getInt("carbsReq");
|
||||
if (result.has("carbsReq")) carbsReq = result.getInt("carbsReq");
|
||||
if (result.has("carbsReqWithin")) carbsReqWithin = result.getInt("carbsReqWithin");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue