Experimental Tick to "Bool" and Wireless multi send.

For general discussion related FlowStone
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Experimental Tick to "Bool" and Wireless multi send.

Post by Spogg »

Just for fun, here’s a Ruby “Last” Radio push button system which you can easily expand as needed.
Attachments
Ruby Radio buttons .fsm
FS 3.06
(690 Bytes) Downloaded 598 times
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Experimental Tick to "Bool" and Wireless multi send.

Post by tulamide »

Actually, this is the code

Code: Select all

def event(i, v)
	output(0, v)
end
You don't need to check i with an if clause, because v always holds the value of the input that triggered the event method.
"There lies the dog buried" (German saying translated literally)
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Experimental Tick to "Bool" and Wireless multi send.

Post by Spogg »

tulamide wrote: You don't need to check i with an if clause, because v always holds the value of the input that triggered the event method.
You know, I was sure you would do it better! ;)

I made that ages ago when I was trying to learn some Ruby. I’m not saying I would’ve done it belter now though. I’m still too old-fashioned in my thinking. :oops:
Tepeix
Posts: 361
Joined: Sat Oct 16, 2021 3:11 pm

Re: Experimental Tick to "Bool" and Wireless multi send.

Post by Tepeix »

Thanks ! Now i even get new option ;)
Surprise how simple and useful is this in ruby !)
Post Reply