Skip to content

DTSW-7554-Update-the-handling-of-billboards-with-a-priority-of-zero#125

Merged
Tuxliri merged 1 commit intomainfrom
DTSW-7554-Update-the-handling-of-billboards-with-a-priority-of-zero
Jan 15, 2026
Merged

DTSW-7554-Update-the-handling-of-billboards-with-a-priority-of-zero#125
Tuxliri merged 1 commit intomainfrom
DTSW-7554-Update-the-handling-of-billboards-with-a-priority-of-zero

Conversation

@liammcalpineduckietown
Copy link
Contributor

@liammcalpineduckietown liammcalpineduckietown commented Jan 7, 2026

This pull request refines the logic for selecting billboards from the local database in the get_billboard function. The update ensures that billboards with higher priorities are favored, and priority 0 billboards are only included if no higher-priority billboards exist. The selection process is now more robust and avoids errors if the database is empty or the selected billboard is missing.

Billboard selection logic improvements:

  • Refactored the weighted selection to first determine the maximum priority among billboards, ensuring that only the highest-priority billboards are considered unless only priority 0 billboards exist.
  • Improved error handling by checking for empty databases and missing billboard entries, returning None safely if no valid billboard is found.

@Tuxliri Tuxliri merged commit bf9fdc3 into main Jan 15, 2026
3 of 4 checks passed
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.

2 participants

Comments