Add 1st exception rule
This commit is contained in:
@@ -15,10 +15,15 @@ function getTemperatureStatus(targetDateString, previousDaysInCycle) {
|
||||
acc.high.push(curr)
|
||||
}
|
||||
|
||||
// regular rule
|
||||
// we round the difference because of JS decimal weirdness
|
||||
if (acc.high.length === 3 && rounded(curr - acc.ltl, 0.01) >= 0.2) {
|
||||
acc.shiftDetected = true
|
||||
}
|
||||
// 1st exception rule
|
||||
if (acc.high.length === 4 && curr > acc.ltl) {
|
||||
acc.shiftDetected = true
|
||||
}
|
||||
|
||||
return acc
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user