[core] Address review: fix docstrings per Copilot feedback

- get_app_state(): say 'STATUS_LED_* only', not 'STATUS_LED_* and lifecycle'
  since lifecycle bits are no longer maintained in app_state_.
- STATUS_LED_SETTLE_S: remove incorrect mention of feed_wdt re-dispatch;
  status_led_light is driven by the main loop, not feed_wdt.
- snapshot_led service: say 'status_led_light output' not 'pin state'
  since the fixture uses a template output, not GPIO.
This commit is contained in:
J. Nick Koston
2026-04-11 17:37:59 -10:00
parent 79f27d7a19
commit 8800c10181
3 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -262,7 +262,7 @@ class Application {
*/
void teardown_components(uint32_t timeout_ms);
/// Return the public app state bits (STATUS_LED_* and lifecycle).
/// Return the public app state status bits (STATUS_LED_* only).
/// Internal bookkeeping bits like APP_STATE_SETUP_COMPLETE are masked
/// out so external readers (status_led components, etc.) never see them.
uint8_t get_app_state() const { return this->app_state_ & ~APP_STATE_SETUP_COMPLETE; }
+1 -1
View File
@@ -52,7 +52,7 @@ api:
- component.update: app_warning_bit
- component.update: app_error_bit
# Snapshot of the status_led's written pin state for observation.
# Snapshot of the status_led_light's output state for observation.
- action: snapshot_led
then:
- component.update: status_led_writes
+3 -4
View File
@@ -22,10 +22,9 @@ import pytest
from .state_utils import InitialStateHelper, SensorTracker, build_key_to_entity_mapping
from .types import APIClientConnectedFactory, RunCompiledFunction
# Time to let the main loop run so status_led_light writes to its output.
# feed_wdt re-dispatches every ~3 ms; 300 ms gives ~100 opportunities and
# is long enough that even a slow host-mode main loop produces measurable
# write-count changes.
# Time to let the host-mode main loop run so status_led_light.loop() can
# execute enough iterations to produce measurable write-count changes on
# the fake template output. 300 ms is well above the minimum needed.
STATUS_LED_SETTLE_S = 0.3