4 ms·
It seems to me that the following is liable to misclassify some pressure drop events as normal shutoffs: > } else if ((statesChanged[2] == 1 && pinStates[2] ==
by robryk 13y ago
It seems to me that the following is liable to misclassify some pressure drop events as normal shutoffs:
> } else if ((statesChanged[2] == 1 && pinStates[2] == OFF) &&
> (statesChanged[3] == 1 && pinStates[3] == OFF)) {
We look at the relay outputs twice a second and expect to see two of them switch within the same half-second in some cases. Even if they were actually depowered at the same instant in time, you'd often get a tens of millis window when one of them is already off, but the other isn't; then (irrespective of which was off first) you'd get a "Pump stopped" notification instead of a "Pressure dropped" notification. Am I missing something obvious or is that case just rare enough that handling it isn't worth the complexity?