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

main: ButtonCallbackTank: Use stop switch for 3rd channel #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dirkbehme
Copy link

Use the left and right stop button to control the 3rd channel of the
CircuitCube. As we are using the RELEASED event to set the channels
back to 0, we don't need the stop buttons for the same. So we can use
the stop buttons for other actions.

In this change the left stop button is used to enable the 3rd CircuitCube
output, while the right stop button disables it. This can be used, e.g.
to control a light attached to this channel.

This is for non TRAIN_CONTROL mode (i.e. TRAIN_CONTROL define disabled).

Dirk Behme added 2 commits February 27, 2023 07:36
The CircuitCube::BuildVelocityCommand() adds 55 to the value sent
to the CircuitCube. As the max value is 255, passing 255 to it results
in an overflow, resulting in no Cube (Tank) movement. Limit the value
to 200 so that in the end 255, the max value, is sent. In main loop() see the
for() loop in TRAIN_CONTROL mode which limits the max value to 200, too.

This is for non TRAIN_CONTROL mode (i.e. TRAIN_CONTROL define disabled).

Signed-off-by: Dirk Behme <[email protected]>
Use the left and right stop button to control the 3rd channel of the
CircuitCube. As we are using the RELEASED event to set the channels
back to 0, we don't need the stop buttons for the same. So we can use
the stop buttons for other actions.

In this change the left stop button is used to enable the 3rd CircuitCube
output, while the right stop button disables it. This can be used, e.g.
to control a light attached to this channel.

This is for non TRAIN_CONTROL mode (i.e. TRAIN_CONTROL define disabled).

Signed-off-by: Dirk Behme <[email protected]>
@dirkbehme
Copy link
Author

The first commit is the same like in PR #2, so this PR depends on #2.

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