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

RC action switch threshold defaults #14631

Merged
merged 1 commit into from
Apr 9, 2020
Merged

Conversation

baumanta
Copy link
Contributor

@baumanta baumanta commented Apr 9, 2020

There are a couple of action switches which trigger a behavior if mapped. The behavior is only triggered if the switch is flipped all the way down. So for 3-position switches (1-2-3) only at position 1.

The action switches behaved differently on manual_control_setpoint due to different thresholds. Example:

RTL switch:
switch up: manual_control_setpoint.return_switch=1 (on)
switch middle: manual_control_setpoint.return_switch=3 (off)
switch down: manual_control_setpoint.return_switch=3 (off)

kill switch:
switch up: manual_control_setpoint.return_switch=1 (on)
switch middle: manual_control_setpoint.return_switch=1 (on) -> not correct
switch down: manual_control_setpoint.return_switch=3 (off)

This PR changes the thresholds to be consistent and correct.

@baumanta baumanta requested a review from MaEtUgR April 9, 2020 11:27
Copy link
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this. I don't see how different default thresholds for the exact same purpose make any sense. And 0.75 is a reasonable default for a two-state input since you can also map it to a three-way switch and get consistent results.

@MaEtUgR MaEtUgR added the bug label Apr 9, 2020
@MaEtUgR MaEtUgR merged commit 8b89cfc into master Apr 9, 2020
@MaEtUgR MaEtUgR deleted the rc-switch-defaults-upstream branch April 9, 2020 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants