Repository navigation
Releases
1.7.0
Added
addTimerModal(onSave)andopenTimerScreen()— open the timer schedule from another screen, without spending a menu slot.addTimerModal()registers the same timer screen asaddTimerScreen()(same slots, EEPROM and getters) but keeps it out of the KB1 rotation;openTimerScreen()opens it, typically from a screen'sonSave(e.g. a "Schedule: EDIT" choice next to the pump mode — the same pattern asstartCalibration()). 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
Fixed
- "Confirm action?" prompt had a cursor that never moved, and a double press could fire the action. The prompt drew a static
>*NO ... *YESbut was really two buttons (KB1 = NO, KB2 = YES): turning a knob did nothing, and a second KB2 press right after opening aconfirm=trueaction 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
snprintfbuffers were 5 bytes forint16_tvalues, which GCC flags as possible truncation (-Wformat-truncation); now sized for the fullint16_trange. Examples04_rtc,05_multi_homeand07_calibrationalso 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.hnotes 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.mddescribe the new confirm-prompt behaviour.
1.6.1
Fixed
APALCDGUI_VERSIONreported"1.4.0"— the macro inAPALCDGUI.hhad 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 showed12:3instead of12:34.02_8screens,05_multi_home: the uptime row lost itshunit.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) — nowPassive: R+1 R+2/Active: R+3 R+4.05_multi_home: page 2'sTotal acidrow lost itsmlunit under the page indicator; page 3 rows were 21-22 chars;doseStr/fwStrbuffers were one byte short for larger values (now 8).04_rtc: the time row was 21 chars (harmless truncation, now exactly 20).
- Examples
02_8screensand05_multi_home: home-screenbufenlarged 21 → 22 (worst-caseint16_tORP value);01_minimalnow uses realistic pH/ORP setpoint fields.
1.6.0
Added
isTimerActive(nowMin)— returnstruewhen 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 comparinggetTimerStart()/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, or22:00-00:00for "until midnight"), but nothing read such a slot correctly:getTimerTotalMinutes()wrapped around and returned ~64000 minutes, the screen's ownTotal: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:00stays "disabled", as before). Found while wiring the APA-CONTROLLER filtration pump schedule. getTimerTotalMinutes()counted overlapping slots twice (08:00-12:00+10:00-14:00gave 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'sTotal:row uses the same function, so the two can no longer disagree.
Changed
- README,
docs/API.mdandexamples/06_timersuseisTimerActive()in place of the manual start/end loop.keywords.txtgainsisTimerActiveand the previously missinggetTimerTotalMinutes.
1.5.0
Added
- Generic two-point guided calibration screen:
addCalibrationScreen(),startCalibration(),setCalMessage(), and a newST_CAL_PROMPTstate (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 aFIELD_CHOICE-toggle-plus-onSave()pattern (recommended, matches every other settings screen's select-toggle-then-SAVE convention), not KB1-navigable. New capacity constantAPA_LCD_MAX_CAL_SCREENS(default 2), new timing constantsAPALCDGUI_CAL_CAPTURED_MS(1500ms) andAPALCDGUI_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 ownonSave()callback -- it calledonSave()first, then unconditionally forcedST_NAVright after. Fixed generally: the function now only forces the normal save behavior ifonSave()didn't already redirect elsewhere._blUpdate()(backlight dim/off) shares the same_inputMs-staleness hazard as the menu-timeout bug above. Fixed by refreshing_inputMsimmediately 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 staleFIELD_ACTION-based usage example, superseded by theFIELD_CHOICE+onSave()redesign. Corrected.
1.4.3
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
Fixed
addHomeScreen()/setHomeCallback()'s own doc comment claimed the home callback "is called on everyupdate()while that page is shown" — this was false, and is almost certainly what led to the 1.4.1markDirty()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 explicitmarkDirty()call), never on a hidden timer. Corrected inAPALCDGUI.h,README.md, anddocs/API.md, and cross-referenced frommarkDirty()'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
Fixed
examples/04_rtc: the home screen's "live clock" never actually refreshed on its own — the library only redraws HOME whenmarkDirty()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-secondmarkDirty()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 inAPALCDGUI.h's own header comment. Relying solely on the conditional#includeburied insideAPALCDGUI.hcaused 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 aDS3231.h: No such fileerror even with correctbuild_flags/lib_deps.examples/04_rtc:buf[21]indrawHome()was one byte too small for its worst-case content; widened tobuf[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
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 SRAMgetTimerTotalMinutes()— 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
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