mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-16 18:03:23 +00:00
The `on <event>` action re-executed on every property poll because the event pending flag was sticky: event_callback returned the same non-zero pending value whether the event had just changed or had stayed satisfied from an earlier change. init_action_foreach_event could not distinguish an edge from a steady state and re-enqueued the action each round (board_netinit ran 262 times per boot). Introduce a three-state result (EVENT_STATE_UNSATISFIED / SATISFIED / TRIGGERED). event_callback now returns TRIGGERED only on the edge where pending flips false -> true. foreach folds per-event states into a product clamped to TRIGGERED, enqueuing the action only when every event is satisfied AND at least one fired this round. Assisted-by: GitHubCopilot:claude-4.8-opus Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com> |
||
|---|---|---|
| .. | ||
| action.c | ||
| action.h | ||
| builtin.c | ||
| builtin.h | ||
| CMakeLists.txt | ||
| import.c | ||
| import.h | ||
| init.c | ||
| init.h | ||
| Kconfig | ||
| Make.defs | ||
| Makefile | ||
| parser.c | ||
| parser.h | ||
| property.h | ||
| property_simple.c | ||
| service.c | ||
| service.h | ||