07-07-2015 09:31 AM
(new features, see beta notes below)
What it does
Takes selected wires then finds and inserts a conversion for that wire. To do this, you have to intentionally create a broken wire, select it, then run the plugin. The plugin will insert the relevant function and create any necessary constants (i.e. the typecast type).
If no conversion is found, a type cast is automatically used. You can also default to typecast by holding shift while running the plugin.
What it converts
Example
Then wire it up and select the wires
Then run the plugin
Version History
V 1.0- Release as document (from prototype: added conversion binary file instead of constant, fixed U8 enum conversions, error doesn't undo)
V 1.1- Fixed a bug with typecasted sinks, didn't wire correctly. Small fixes to binary file editor. Did a lot of commenting and cleaning.
V1.2- Fixed constant creation within sub-diagrams (for/while/case/etc).
V1.3- Added merge errors. Fixed variant to data connecting to wrong output. Added to VIPM.
V1.3 Beta- So the program flow has been bugging me a little and I woke up (hit my head on the sink) and came up with an idea. You have two options for running the program.
(1) Select an existing broken wire, it will insert at the selected segment(s).
(2) Run without selections. It will then wait for the next wire to show up (i.e. creating a brand new wire) or change (i.e. connecting an existing wire to a new sink terminal). It grabs the segment nearest that terminal and inserts the conversion function.
Personally, I like this programming flow better. This might be a little buggy, but it's getting better. (sorry for the spam... this board seems quiet)
-Also added waveform bundle/unbundle.
I am definitely open to new ideas and comments on the code (specifically the code that finds terminals on multi-sink wires)
07-08-2015 12:52 AM
followed the progress of development since the start and wasn't able to figure out how this would help. Now I know - I used to assign a whole bunch of key kombinations like "i32" or "b2u8" for those conversion types of functions. With your shortcut I only ever need to remember CTRL+e.
Well done, mate!