Hook up fertility temp status to app

This commit is contained in:
Julia Friesel
2018-07-02 16:55:20 +02:00
parent 03a0f1fb75
commit 1c791df5ad
6 changed files with 57 additions and 25 deletions
+4 -10
View File
@@ -31,7 +31,7 @@ function detectTemperatureShift(temperaturesOfCycle) {
// if we do, remember the details and start collecting the high level temps
acc.detected = true
acc.high = [temp]
acc.rules = checkResult.rules
acc.rule = checkResult.rule
acc.ltl = ltl
acc.low = getSixTempsBefore(i)
@@ -57,9 +57,7 @@ function checkIfFirstHighMeasurement(temp, i, temps, ltl) {
if (regularRuleApplies(temp, nextTemps, ltl)) {
return {
isFirstHighMeasurement: true,
rules: {
regular: true,
},
rule: 0,
ltl
}
}
@@ -67,9 +65,7 @@ function checkIfFirstHighMeasurement(temp, i, temps, ltl) {
if (firstExceptionRuleApplies(temp, nextTemps, ltl)) {
return {
isFirstHighMeasurement: true,
rules: {
firstException: true,
},
rule: 1,
ltl
}
}
@@ -77,9 +73,7 @@ function checkIfFirstHighMeasurement(temp, i, temps, ltl) {
if (secondExceptionRuleApplies(temp, nextTemps, ltl)) {
return {
isFirstHighMeasurement: true,
rules: {
secondException: true,
},
rule: 2,
ltl
}
}