Skip to content

Fix pedestrian walk timer not resetting on state change#3

Open
thiagoralves wants to merge 1 commit into
developmentfrom
fix/pedestrian-timeout
Open

Fix pedestrian walk timer not resetting on state change#3
thiagoralves wants to merge 1 commit into
developmentfrom
fix/pedestrian-timeout

Conversation

@thiagoralves
Copy link
Copy Markdown
Contributor

Summary

  • Fixed walk and flash timers not being reset when traffic transitions away from RED
  • Stale timer state was carrying over into the next walk cycle, potentially shortening or skipping the walk phase

Changes

  • Reset walkTimer and flashTimer in the traffic state change cleanup block
  • Added tests verifying timer reset behavior across walk cycles

Test plan

  • Walk timer starts fresh after being cancelled by traffic state change
  • Flash timer resets cleanly when interrupted
  • Subsequent walk requests work correctly after cancellation

@thiagoralves thiagoralves force-pushed the fix/pedestrian-timeout branch from 26a4ae6 to 57f0d95 Compare March 3, 2026 14:37
@thiagoralves thiagoralves force-pushed the fix/pedestrian-timeout branch 2 times, most recently from 69ac048 to 64bfa3f Compare March 3, 2026 14:46
@thiagoralves thiagoralves force-pushed the fix/pedestrian-timeout branch 2 times, most recently from b2ffff1 to 64f4a8d Compare March 3, 2026 14:52
When traffic transitions away from RED while a pedestrian walk is
active, the walk and flash timers were not being reset. This caused
stale timer state to carry over into the next walk cycle, potentially
shortening or skipping the walk phase entirely.

Reset both walkTimer and flashTimer when cancelling a walk due to
traffic state change.
@thiagoralves thiagoralves force-pushed the fix/pedestrian-timeout branch from 64f4a8d to d4a5283 Compare March 3, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant