Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use aspect maps and add ability to use alternate light config (#422) #423

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mb-m
Copy link

@mb-m mb-m commented Oct 1, 2024

Idea to use a map to control the pins set for the different signal aspects, instead of just straight RED->redpin, AMBER->amberpin, GREEN->greenpin. There is a main map which does this and then an alternate map which may do anything. In the example, we use red -> amber/green -> green, which is the Deutsche Bahn signalling resolution (where physical signals are used rather than in-cab).

This rewrites the LED section of the RMFT2::doSignal(), making it use the aspect map for even the features of merging red and green together for amber and the high-is-off setting. It adds 2 new automations: SIGNALA and SIGNALAH to allow the use of the alternate maps.

…#422)

Idea to use a map to control the pins set for the different signal aspects,
instead of just straight RED->redpin, AMBER->amberpin, GREEN->greenpin. There
is a main map which does this and then an alternate map which may do anything.
In the example, we use red -> amber/green -> green, which is the Deutsche Bahn
signalling resolution (where physical signals are used rather than in-cab).

This rewrites the LED section of the RMFT2::doSignal(), making it use the
aspect map for even the features of merging red and green together for amber
and the high-is-off setting. It adds 2 new automations: SIGNALA and SIGNALAH
to allow the use of the alternate maps.
@mb-m
Copy link
Author

mb-m commented Oct 1, 2024

Hi Maintainers, please note this is a work in progress and hasn't actually been tested as per the issue it references (#422). I'm mostly interested in what you think of it at this stage - am I barking up the wrong tree?

Copy link
Contributor

@Asbelos Asbelos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is, I think, a welcome change.
However the doSignal code has recently been rewritten to provide for additional signal types such as neopixels. This makes it much easier to expand but means that this PR will not merge to the latest development branches.

Author, please take a look at the latest signal code and discuss with me (UKBloke,) on discord.

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