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

ControlValue and ControlTrigger do exactly the same thing #230

Open
ndonald2 opened this issue Nov 15, 2013 · 2 comments
Open

ControlValue and ControlTrigger do exactly the same thing #230

ndonald2 opened this issue Nov 15, 2013 · 2 comments
Labels

Comments

@ndonald2
Copy link
Member

I just noticed this. The only difference is the interface - both will output a particular value with a "triggered" status when you either call setValue() or trigger().

ControlValue also responds to forceNewOutput but I want to phase that out when I refactor the synthesis context stuff.

Maybe ControlTrigger just wraps ControlValue_ but the output value is limited to 1 when it's triggered and 0 when it's not?

@morganpackard
Copy link
Member

Sounds good. I like the clarity of the name ControlTrigger, and the trigger method, but see that's it's totally redundant. I'd be ok with just removing it if you felt that's the way to go, but I'm inclined to keep the class, just turn it in to a wrapper as you suggest.

@ndonald2
Copy link
Member Author

I think keeping it as a wrapper definitely has value, and having it output a float value of 0 or 1 depending on the triggered state may prove useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants