deviations < 2 as equal
This commit is contained in:
parent
db5dcc0064
commit
645bcdbb8a
2 changed files with 6 additions and 3 deletions
|
@ -60,4 +60,7 @@ public class Constants {
|
|||
|
||||
//Screen: Threshold for width to go into small width layout
|
||||
public static final int SMALL_WIDTH = 320;
|
||||
|
||||
//Autosens
|
||||
public static final double DEVIATION_TO_BE_EQUAL = 2.0;
|
||||
}
|
||||
|
|
|
@ -308,10 +308,10 @@ public class IobCobCalculatorPlugin implements PluginBase {
|
|||
|
||||
// calculate autosens only without COB
|
||||
if (autosensData.cob <= 0) {
|
||||
if (deviation > 0) {
|
||||
autosensData.pastSensitivity += "+";
|
||||
} else if (deviation == 0) {
|
||||
if (Math.abs(deviation) < Constants.DEVIATION_TO_BE_EQUAL) {
|
||||
autosensData.pastSensitivity += "=";
|
||||
} else if (deviation > 0) {
|
||||
autosensData.pastSensitivity += "+";
|
||||
} else {
|
||||
autosensData.pastSensitivity += "-";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue