dstroy0 / InputHandler

Arduino input handler
https://dstroy0.github.io/InputHandler/
GNU General Public License v3.0
1 stars 0 forks source link

[Reminder] add `getArgument()` that returns a pointer #39

Closed 2bndy5 closed 2 years ago

2bndy5 commented 2 years ago

If you want to launch two functions with the same arg set just pass them the UserInput pointer inside of the target, I’ll make a new method getArgument(size_t) that will return a pointer to the arg if one exists else NULL, so you can iterate over that arg set which will remain in scope for the sub functions in the target wrapper however you want.

Originally posted by @dstroy0 in https://github.com/dstroy0/InputHandler/issues/38#issuecomment-1087080681


I'm not sure I fully understand, but it does sound like better solution than having a single command trigger multiple wildcard UserInput commands.

dstroy0 commented 2 years ago

Thank you! feature added!

I commented in #38 about reusing an arg set.