Question about NodeEditor "Switch" Node
 1-16  17-26

Previous
Next
 From:  bemfarmer
9984.17 In reply to 9984.16 
Well, I am mistaken, the Button mode could be used to temporarily bump up one pole.
Or else slowly scan through poles? Scan mode?

So I'll plan on adding Button mode.

Note, Button mode means to change connection while the button is pressed, (mouse down), and revert when the button is released, (mouse up).

- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9984.18 In reply to 9984.15 
Modifying one line corrects the wire color bug.
(Only Inputs which are hooked up show the the wire color matching the datatytpe, which is nice.)
(Also for SwDPDT, wire color is NOT neutral for non-hooked up inputs, call it a Bug in SwDPDT.)


// if (this.isInputConnected(this.internal.on*1)) { ctx.strokeStyle = LGraphCanvas.link_type_colors[this.inputs[0].type];}
if (this.isInputConnected(this.internal.poleIndex)) { ctx.strokeStyle = LGraphCanvas.link_type_colors[this.inputs[0].type];}

(No more corrections, due to short term Travel, so corrected SwRotary not updated yet.)

- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9984.19 In reply to 9984.18 
With a vary minor addition, "Cycled" mode is working.
Both modes advance pole by pole, from first pole to last pole.
Then:
By push button, Cycled mode jumps from last pole to first pole. (delta = -5)
Or, By push button, Tic-tac mode reverses (delta = -1), from last pole to next to last pole, etc, back down to first pole.

Mode may be changed in the Info box.

Wire color is working.

"Final" version attached.
No plans for "Button" mode, at this time.

- Brian

EDITED: 20 Oct 2020 by BEMFARMER

Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  fcwilt
9984.20 In reply to 9984.19 
Hi,

Thanks for the work.

I'm having a senior moment here - what do I do with this file?

Frederick
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9984.21 In reply to 9984.20 
The two new switch nodes should be copied to the %AppDate% > nodeeditor > nodes > extensions directory.
The switch nodes then get loaded by the nodeeditor program, to the Widget menu.
Existing Widgets of Max are not changed. Max's Interface.js file is not changed.
These nodes are separate files, but are based upon Max's code, with some modifications made.
- Brian

After much study, the "arcane" to me code starts to make a little sense, but is still not totally understood.

The two files could be sequentially listed in a combined file, in the future.

EDITED: 20 Oct 2020 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  fcwilt
9984.22 In reply to 9984.21 
Hi,

OK copy to the folder - got it.

But I've gotten lost somewhere along the way - you mentioned two new switch nodes.

Just to be sure can you tell me the file names again - I think I've seen all your postings but maybe not.

Thanks.

Frederick
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9984.23 In reply to 9984.22 
Well, there is swDPDT.js, and swRotary.js, which show up in the widget menu with capitalized S.

- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  fcwilt
9984.24 In reply to 9984.23 
Hi,

Thanks.

Those are the two I have - just wanted to be sure I was still in sync with you.

Do you think there were would be a way to allow selecting any input on the "rotary" switch, as opposed to having to step through each position to get to the desired position?

Frederick
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9984.25 In reply to 9984.24 
Here is a quick partial demo, after very limited thought...
Create a temporary circle or square, by mouse click on standard Switch widget, in Button mode. (First hit Run).

Logic Split node, mask...

- Brian

(Or switch the two switches to Switch mode. Might want to add some other logic gate, so only one mask is active at a time?)

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  fcwilt
9984.26 In reply to 9984.25 
Hi,

Thanks for your efforts.

They are greatly appreciated.

Frederick
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages:  1-16  17-26