hal: split 'toggle2nist.comp' for toggle and momentary inputs#4223
hal: split 'toggle2nist.comp' for toggle and momentary inputs#4223Sigma1912 wants to merge 1 commit into
Conversation
|
What about a pin to change the mode from momentary to toggle button behaviour? And what exactly is the definition of "nist outputs" or "nist logic"? I haven't found anything about that. |
The thing that made me lean towards a separate component is that
All I can tell you is what is in the man page:
|
So if you don't know what the name of your component means, maybe it's a chance to name it different? (Even though the name is the not so close to toggl2nist) What about something like momentary_toggle or momentary2onoff ? |
|
I get your point but I don't think we should start calling the same things differently. Given that the two components both provide a logic conversion that only differs in the input logic it seems reasonable to retain 'nist' since that is what the output logic has been called for years. |
Creates different components for handling toggle buttons and momentary buttons with component names that actually reflect the functionality. - Restores the legacy functionality (as in 2.9) of 'toggle2nist' with added input debounce. - Fixes the toggle2nist documentation so it matches actual (legacy) behavior. - Adds a new 'momentary2nist' component that does what the old 'toggle2nist' docs described.
4992bb1 to
79232fa
Compare
Creates different components for handling toggle buttons and momentary buttons with component names that actually reflect the functionality.
Background
Before #3193 'toggle2nist' component docs described the functionality as converting
momentary inputs to nist outputs but the actual functionality was converting toggled
inputs to nist outputs. This required using a preceding 'toggle' component to match
documented behavior.
The fix in #3193 changed the behavior to match the documentation (and added debouncing
to the inputs). While this fixed the issues reported on the forum it breaks functionality
for hal files that use the preceeding 'toggle' component. Also the name 'toggle2nist' does
no longer reflect the actual function.