mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-09-14 23:26:38 +00:00
No board in this repo has one built in, and no default pin is assumed anywhere -- whoever wires a Hall-effect or reed sensor to a free GPIO sets PIN_HALL_SENSOR (and HALL_ACTIVE_HIGH, for a sensor that pulls the pin high rather than low on presence) as a build_flag on their own env. Entirely opt-in and a no-op elsewhere, same pattern as PIN_GPIO1..4/ADC_MULTIPLIER/ CARDKB_ENABLE. Level-triggered polling (like pollCardKB()) rather than an edge interrupt -- a magnet held near the sensor reads the same way every tick, so the new pollHallSensor() only acts on the two transitions. Closing locks and blanks the display with no wake grace (the cover is physically over the screen, so there's nothing to show); opening unlocks and wakes it, with no key combo either way. Both are independent of the Auto-lock setting, which is a timeout, not a physical event. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>