Mark story 4-1 done, add deferred items from review
Review passed all criteria; update sprint-status to done, close the story file, and record two deferred items (GPIO pins into constants.py, ButtonHoldDetector init-time GPIO dependency) in deferred-work.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
# Story 4.1: GPIO Button Hold Detection & LED Feedback
|
# Story 4.1: GPIO Button Hold Detection & LED Feedback
|
||||||
|
|
||||||
Status: review
|
Status: done
|
||||||
|
|
||||||
## Story
|
## Story
|
||||||
|
|
||||||
|
|||||||
@@ -200,3 +200,17 @@ Description: `time.sleep(REFRESH_INTERVAL_S)` is a dumb fixed sleep appended aft
|
|||||||
Story: `2-7-operational-radar-loop-startup-screen-and-systemd-wiring`
|
Story: `2-7-operational-radar-loop-startup-screen-and-systemd-wiring`
|
||||||
Category: Technical debt
|
Category: Technical debt
|
||||||
Description: The startup screen text is drawn at `DISPLAY_WIDTH // 2 - 60, DISPLAY_HEIGHT // 2` (i.e. x=340). The offset of −60 is a pixel-counted approximation, not derived from actual font metrics. Depending on the Pillow version and the default font's rendered width, the text may appear left-biased. Future hardening: use `ImageDraw.textlength()` (Pillow ≥9.2) to compute the real string width and centre precisely.
|
Description: The startup screen text is drawn at `DISPLAY_WIDTH // 2 - 60, DISPLAY_HEIGHT // 2` (i.e. x=340). The offset of −60 is a pixel-counted approximation, not derived from actual font metrics. Depending on the Pillow version and the default font's rendered width, the text may appear left-biased. Future hardening: use `ImageDraw.textlength()` (Pillow ≥9.2) to compute the real string width and centre precisely.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Story 4.1: GPIO Button Hold Detection & LED Feedback
|
||||||
|
|
||||||
|
### [4-1] GPIO pin numbers belong in constants.py
|
||||||
|
Story: `4-1-gpio-button-hold-detection-and-led-feedback`
|
||||||
|
Category: Technical debt
|
||||||
|
Description: `BUTTON_GPIO_PIN = 17` and `LED_GPIO_PIN = 27` are module-level constants in `gpio_ctrl.py`. For production tuning and hardware revision they belong in `constants.py` alongside other hardware-facing constants. Future hardening: move both to `constants.py` and import them into `gpio_ctrl.py` from there.
|
||||||
|
|
||||||
|
### [4-1] ButtonHoldDetector instantiates real gpiozero.Button at __init__
|
||||||
|
Story: `4-1-gpio-button-hold-detection-and-led-feedback`
|
||||||
|
Category: Infrastructure/environment
|
||||||
|
Description: `ButtonHoldDetector.__init__` constructs a `gpiozero.Button` immediately. The radar main loop must construct `ButtonHoldDetector` at startup (not at import time), or the application will fail if GPIO is unavailable when the module is imported. This is currently safe because `gpio_ctrl.py` is not imported at module level in `main.py`, but any future reorganisation that imports it at the top of a module that runs on non-GPIO hardware will raise a `BadPinFactory` error unless a `MockFactory` is active.
|
||||||
|
|||||||
@@ -70,6 +70,6 @@ development_status:
|
|||||||
|
|
||||||
# Epic 4: Reset & Reconfiguration
|
# Epic 4: Reset & Reconfiguration
|
||||||
epic-4: in-progress
|
epic-4: in-progress
|
||||||
4-1-gpio-button-hold-detection-and-led-feedback: review
|
4-1-gpio-button-hold-detection-and-led-feedback: done
|
||||||
4-2-config-wipe-setup-screen-and-return-to-provisioning: backlog
|
4-2-config-wipe-setup-screen-and-return-to-provisioning: backlog
|
||||||
epic-4-retrospective: optional
|
epic-4-retrospective: optional
|
||||||
|
|||||||
Reference in New Issue
Block a user