On boot and with every pH recalibration, we send a SLOPE? request to the pH probe.
Whenever the pH probe reports a slope less than 95% of ideal or more than 105% of ideal, this is flagged as a "bad calibration."
In the SeePHCalibration state (which follows every new calibration), a "bad calibration" flag causes an immediate transition to a BadPHCalibration state.
In the BadPHCalibration state, the user is shown the pH slopes with a warning that this looks like a bad calibration. This is an "in calibration" state that does not time out. The user must choose whether to clear/reset the calibration or to accept the bad calibration. In the latter case, an "ignore bad calibration" flag is set on the nonvolatile EEPROM.
In the MainMenu state, a "bad calibration" flag with an "ignore bad calibration" flag causes the characters "pH" to blink with the "=" on the display. A "bad calibration" flag without an "ignore bad calibration" flag causes an immediate transition to a BadPHCalibration state.
Whenever the pH probe reports a slope between 95% and 105% of ideal, both the "bad calibration" flag and the "ignore bad calibration" flag are reset.
Whenever the user clears the calibration or sets a new calibration point, both the "bad calibration" flag and the "ignore bad calibration" flag are reset.
This pull request is intended to resolve issue #403.
This pull request is intended to resolve issue #403.