Skip to content

Releases

1.7.0

Choose a tag to compare

@apadevices apadevices released this 29 Sep 12:20

Added

  • addTimerModal(onSave) and openTimerScreen() — open the timer schedule from another screen, without spending a menu slot. addTimerModal() registers the same timer screen as addTimerScreen() (same slots, EEPROM and getters) but keeps it out of the KB1 rotation; openTimerScreen() opens it, typically from a screen's onSave (e.g. a "Schedule: EDIT" choice next to the pump mode — the same pattern as startCalibration()). SAVE and KB1 then return to the screen that opened it instead of HOME. Zero extra RAM (uses the last free bit of the timer's packed state byte). Driven by APA-CONTROLLER, where the filtration schedule belongs on the pump screen.

Fixed

  • Leaving the timer screen without saving kept the unsaved schedule active. Slot edits were written straight into the live slots, and KB1 ("discard") or a menu timeout only left the screen — so isTimerActive() / getTimerTotalMinutes() followed the unsaved schedule until the next reboot reloaded EEPROM. Now KB1 and the menu timeout reload the saved slots, as the original design intended.

1.6.2

Choose a tag to compare

@apadevices apadevices released this 28 Sep 16:25

Fixed

  • "Confirm action?" prompt had a cursor that never moved, and a double press could fire the action. The prompt drew a static >*NO ... *YES but was really two buttons (KB1 = NO, KB2 = YES): turning a knob did nothing, and a second KB2 press right after opening a confirm=true action fired it immediately — for an action like dosing-pump priming (which bypasses dosing safety checks) that is a real risk. Now the > starts on NO, turning KB2 right/left selects YES/NO, pressing KB2 carries out the selection (YES fires the action and moves the cursor to SAVE, as a plain action does), and pressing KB1 always cancels. Zero extra RAM. Found on real hardware by APA-CONTROLLER's Priming screen.
  • ESP8266 build warnings. The RTC modal's snprintf buffers were 5 bytes for int16_t values, which GCC flags as possible truncation (-Wformat-truncation); now sized for the full int16_t range. Examples 04_rtc, 05_multi_home and 07_calibration also warned; their values are now range-bounded. The library and all examples build without warnings on all five platforms.

Changed

  • Knob wording is function-only everywhere. Examples described KB1/KB2 as "right knob"/"left knob", which is only true for one board's wiring — on other boards (including APA Devices' own) KB1 sits on the left. Every example, the APALCDGUI.h notes and the design spec now name the knobs by what they do: KB1 navigates screens, KB2 moves the cursor and edits.
  • README and docs/API.md describe the new confirm-prompt behaviour.

1.6.1

Choose a tag to compare

@apadevices apadevices released this 28 Sep 14:33

Fixed

  • APALCDGUI_VERSION reported "1.4.0" — the macro in APALCDGUI.h had not been updated since 1.4.0, so 1.4.x–1.6.0 all reported the wrong version to code that reads it (e.g. example 05's status page). Now "1.6.1".
  • Example home screens wrote into columns the library owns, or past column 20. Row 2 cols 17-19 are the passive-alert indicator and row 3 cols 17-19 the page indicator (multi-page home); both are drawn after the home callback, so anything written there was erased:
    • 01_minimal: row 2 showed 12:3 instead of 12:34.
    • 02_8screens, 05_multi_home: the uptime row lost its h unit.
    • 03_alerts: row 1 was 21 chars; row 2 ran into the alert indicator. The labels were also wrong (R+2 is the critical passive alert, the active alerts are R+3/R+4) — now Passive: R+1 R+2 / Active: R+3 R+4.
    • 05_multi_home: page 2's Total acid row lost its ml unit under the page indicator; page 3 rows were 21-22 chars; doseStr/fwStr buffers were one byte short for larger values (now 8).
    • 04_rtc: the time row was 21 chars (harmless truncation, now exactly 20).
  • Examples 02_8screens and 05_multi_home: home-screen buf enlarged 21 → 22 (worst-case int16_t ORP value); 01_minimal now uses realistic pH/ORP setpoint fields.

1.6.0

Choose a tag to compare

@apadevices apadevices released this 28 Sep 12:20

Added

  • isTimerActive(nowMin) — returns true when any timer slot covers the given minute of the day (0–1439). Handles slots that run across midnight. Use it as the schedule bridge instead of comparing getTimerStart()/getTimerEnd() yourself: pump.begin([]() { return gui.isTimerActive(nowMin); }).

Fixed

  • Timer slots across midnight were not handled. The timer screen lets the operator set an end time before the start time (e.g. 22:00-02:00, or 22:00-00:00 for "until midnight"), but nothing read such a slot correctly: getTimerTotalMinutes() wrapped around and returned ~64000 minutes, the screen's own Total: row silently skipped the slot, and the documented control-loop pattern (start <= now < end, used in README, API.md and example 06) never switched it on. Such a slot now runs across midnight everywhere. A slot whose start equals its end is off (00:00-00:00 stays "disabled", as before). Found while wiring the APA-CONTROLLER filtration pump schedule.
  • getTimerTotalMinutes() counted overlapping slots twice (08:00-12:00 + 10:00-14:00 gave 8 h instead of 6 h). It now counts every half-hour covered by any slot once, so the value is the real daily run time (max 1440) — correct as an APAPUMP daily target. The screen's Total: row uses the same function, so the two can no longer disagree.

Changed

  • README, docs/API.md and examples/06_timers use isTimerActive() in place of the manual start/end loop. keywords.txt gains isTimerActive and the previously missing getTimerTotalMinutes.

1.5.0

Choose a tag to compare

@apadevices apadevices released this 21 Sep 06:00

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.

1.4.3

Choose a tag to compare

@apadevices apadevices released this 20 Sep 12:04

Fixed

Both-buttons RTC modal gesture (setRTC()) only worked reliably on a genuinely simultaneous double-press. Found via real-hardware testing and traced to the source: _checkBothPress()'s "both held together" timer (_bothMs) can never start earlier than whichever button was pressed second, but _checkLongPress() independently raced each button's own individual press time against the same 800ms threshold. Whichever knob physically went down first (essentially always, since a human can't press two separate knobs at the exact same millisecond) crossed its own long-press threshold first and fired its single-button action (opening brightness) before the both-press gesture ever got a chance — permanently cancelling that attempt at opening the RTC modal.

_checkLongPress() now skips individual per-button long-press detection entirely whenever both buttons are currently held, deferring fully to _checkBothPress(). The RTC modal (and any user setBothPressedCallback()) now opens reliably regardless of the natural timing offset between two physical button presses.

1.4.2

Choose a tag to compare

@apadevices apadevices released this 20 Sep 11:52

Fixed

  • addHomeScreen()/setHomeCallback()'s own doc comment claimed the home callback "is called on every update() while that page is shown" — this was false, and is almost certainly what led to the 1.4.1 markDirty() bug in the first place: the callback only runs when the screen is actually marked dirty (entering HOME, KB2 paging, an alert/status change, or an explicit markDirty() call), never on a hidden timer. Corrected in APALCDGUI.h, README.md, and docs/API.md, and cross-referenced from markDirty()'s own doc comment.
  • Documented, for the first time, that only row 3 is cleared automatically before the home callback runs — rows 0-2 retain whatever the previously-shown screen (a submenu, the RTC modal, the brightness screen) last drew, and the callback must pad every row it writes to the full 20-column width to avoid leftover text merging with its own content.

Changed

  • Softened "right knob"/"left knob" wording throughout the docs to "KB1 (knob1)"/"KB2 (knob2)" as the primary identifiers, with a clear note that physical left/right position is specific to the APA Devices HMI board v1.0's wiring — a different board can wire the two encoders to opposite physical positions, so identify knobs by function (KB1 navigates, KB2 edits), not by side.

1.4.1

Choose a tag to compare

@apadevices apadevices released this 20 Sep 11:04

Fixed

  • examples/04_rtc: the home screen's "live clock" never actually refreshed on its own — the library only redraws HOME when markDirty() is called, and the example never called it, so the clock (and the simulated pH/ORP readings) froze after the first draw until the operator touched an encoder. Added a 1-second markDirty() tick, skipped while a submenu is open so it doesn't force needless redraws of whatever the operator is editing.
  • examples/04_rtc: added an explicit #include <DS3231.h> before #include <APALCDGUI.h>, matching the requirement already documented in APALCDGUI.h's own header comment. Relying solely on the conditional #include buried inside APALCDGUI.h caused build tools that resolve dependencies by scanning a sketch's own top-level includes (e.g. PlatformIO's Library Dependency Finder) to miss that DS3231 is needed at all, producing a DS3231.h: No such file error even with correct build_flags/lib_deps.
  • examples/04_rtc: buf[21] in drawHome() was one byte too small for its worst-case content; widened to buf[22].
  • keywords.txt: the 1.2.0 timer-screen additions were implemented and documented but never actually added to this file — added now.

1.4.0

Choose a tag to compare

@apadevices apadevices released this 05 Jun 06:22

Added

  • setStatusIndicator(char c) / clearStatusIndicator() — show [c] in the alert corner (cols 17–19 row 2) when no passive alert is pending; alert always takes priority ([!] > [*] > [i] > status indicator > blank); 1 byte SRAM
  • getTimerTotalMinutes() — sum of all enabled timer slot durations in minutes; primary use: APAPUMP daily target bridge

Changed

  • Platform verification table updated to v1.4.0 numbers (02_8screens, default 4-screen limit)

v1.3.0

Choose a tag to compare

@apadevices apadevices released this 02 Jun 07:26

What's new

Scrollable timer list — up to 6 slots

  • \APA_LCD_MAX_TIMERS\ now supports up to 6 (default stays 3)
  • LCD shows 3 slots at a time; KB2 rotation scrolls the list automatically
  • ↑ / ↓ indicators at col 19 of rows 0–1 show when more slots exist above or below
  • Zero SRAM cost — \�iewTop\ packed into the existing _timerBits\ byte
  • EEPROM layout scales automatically with \APA_LCD_MAX_TIMERS\

License

  • Changed from MIT to dual license
  • Free for personal, educational, and hobby use
  • Commercial use requires a separate written license — contact kecup@vazac.eu

Other

  • Logo added to README (centered)
  • README version badge corrected