-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: signs can have a "default mode"
Previously, if a sign wasn't configured in SignsUI, it would always be in the `off` mode. We'd like to be able to configure our new lab signs for testing without the complexity of supporting this unique "kind" of sign in SignsUI as well as this project. This adds an optional `default_mode` field to sign configuration, which can be set to any of the "modes" supported by SignsUI. For now, this is only supported by `Realtime` (a.k.a. subway) signs and not `Bus` signs, but this would be easy enough to extend later if needed. Due to now needing a sign's default mode as well as its ID whenever we want to determine its "current mode", this includes a refactor of the previously-added `current_config` logging so the value is determined when a message is enqueued, instead of when it is later processed.
- Loading branch information
1 parent
4c86c2e
commit 7ef9e24
Showing
13 changed files
with
112 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
defmodule Engine.ConfigAPI do | ||
@callback sign_config(String.t()) :: Engine.Config.sign_config() | ||
@callback sign_config(id :: String.t(), default :: Engine.Config.sign_config()) :: | ||
Engine.Config.sign_config() | ||
@callback headway_config(String.t(), DateTime.t()) :: Engine.Config.Headway.t() | nil | ||
@callback scu_migrated?(String.t()) :: boolean() | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.