Skip to content

1.5.0

Choose a tag to compare

@apadevices apadevices released this 21 Sep 06:00
· 4 commits to main since this release

Added

  • Generic two-point guided calibration screen: addCalibrationScreen(), startCalibration(), setCalMessage(), and a new ST_CAL_PROMPT state (12 -> 13 states). APALCDGUI has no concept of what is being calibrated -- the two known-value parameters and two callbacks fully describe the process, so one registration serves any two-point sensor (pH, ORP, or otherwise). Launched as a modal from a FIELD_CHOICE-toggle-plus-onSave() pattern (recommended, matches every other settings screen's select-toggle-then-SAVE convention), not KB1-navigable. New capacity constant APA_LCD_MAX_CAL_SCREENS (default 2), new timing constants APALCDGUI_CAL_CAPTURED_MS (1500ms) and APALCDGUI_CAL_RESULT_MS (3000ms). Real-hardware-verified (both a pH-shaped and an ORP-shaped calibration) against apadevices/APAPHX2_ADS1115. See docs/API.md's new "Calibration screen" section and examples/07_calibration/ for a complete working example.

Fixed

  • _checkMenuTimeout() never exempted the new calibration-prompt state, forcing an immediate return to HOME the instant the first calibration point finished, before the second point's prompt was ever reachable. Fixed by adding the same exemption already given to the RTC modal.
  • _stateFlashSave() silently discarded a state change made by the screen's own onSave() callback -- it called onSave() first, then unconditionally forced ST_NAV right after. Fixed generally: the function now only forces the normal save behavior if onSave() didn't already redirect elsewhere.
  • _blUpdate() (backlight dim/off) shares the same _inputMs-staleness hazard as the menu-timeout bug above. Fixed by refreshing _inputMs immediately after each blocking calibration capture returns.
  • Calibration prompt's row-3 button hint listed KB1/KB2 in the wrong order relative to the RTC modal's own convention. Fixed.
  • addCalibrationScreen()'s own doc comment showed a stale FIELD_ACTION-based usage example, superseded by the FIELD_CHOICE+onSave() redesign. Corrected.