Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virmata rohkost #99

Merged
merged 63 commits into from
Feb 7, 2013
Merged

Virmata rohkost #99

merged 63 commits into from
Feb 7, 2013

Conversation

jnslxndr
Copy link
Contributor

@jnslxndr jnslxndr commented Feb 4, 2013

Hi devvvvs!
The Firmata plugin is ported to raw + some features like full use of all pins and generic pin mode settings are implemented and tested as far as possible. Also i had the chance to test the i2c decoding. Changes in the plugin are reflected in the module and the matching help patch.
The old nodes are versioned Legacy and also marked as such in the diffff.xml. I hope got that one right!? In my builds they do not show up, as expected.

Happy to fix any mis-use or in-compliance!

greetz!

jens-a-e added 30 commits January 7, 2013 14:55
@joreg
Copy link
Member

joreg commented Feb 5, 2013

hei jens,

isn't it so that the Arduino (Devices StandardFirmata 2.x) module seen from outside looks/works exactly the same as before only with new innards?!

if so we'd not need a legacy version of it since you can simply fix it up internally and users of that node will not notice any difference.

only for the FirmataEncode/Decode node it really needs the legacy nodes as their pins have changed, right?

being picky:
why are pinnames different on FirmataEncode/Decode to those on the encapsulating Arduino module? the ones on the encode/decode nodes follow the https://vvvv.org/documentation/conventions.nodeandpinnaming correctly, the ones on the module don't. you can also fix and then diffff those, as described in the header of the file...

@jnslxndr
Copy link
Contributor Author

jnslxndr commented Feb 5, 2013

hi ioreg!
oh. if must not be indicated as Legacy, that's cool. damn, you discovered the inconsistency... yeah, sure i will fix this. i had a look on the explanation header already and was happy to discover the current semantic version definition. not sure though if i ever get the go on the "How To Legacy The Right Way"...

right, the data type changed on the pins, so the string versions of the actual plugin nodes are Legacy and should not be used anmore!

@jnslxndr
Copy link
Contributor Author

jnslxndr commented Feb 6, 2013

hm. there is actually some strange behavour, when a node gets Legacy, the same as renamed so to speak(right?) and changing a pin naming on the new node. if i add a pin child to the xml node, i get a crash right before any patch appears - a parser error the exception dialog says.
how do i put a node Legacy and rename the pins on the new one?

@joreg
Copy link
Member

joreg commented Feb 6, 2013

meinem gefühl nach i'd suggest something like this for your situation:

  • you want your old firmatanodes (those with stringIO) to be no longer visible in the nodebrowser. but if in any old patch someone used them they will be still in the patch when he opens it.
  • then on the Arduino module you only want to update pinnames
<NODE old="FirmataEncode (Devices 2.x)" new="FirmataEncode (Devices 2.x Legacy)"></NODE>
<NODE old="FirmataDecode (Devices 2.x)" new="FirmataDecode (Devices 2.x Legacy)"></NODE>
<NODE old="Arduino (Devices StandardFirmata 2.x)">
     <PIN old="PinModes" new="Pin Modes"> </PIN>
     ...
</NODE>

@jnslxndr
Copy link
Contributor Author

jnslxndr commented Feb 6, 2013

yeah! that's how i got it. i found my error on testing the pin renaming. i did set the patch version back to 28.1 and the pins were connected correctly. nevertheless this is not reflected in a patch with the current version. but that can be reconnected and is a new version anyways. right?

of course i will set the help patch back to the current version 29.1. i was trying to figure how the substitution works.

here is my xml snippet:

  <PATCH version="current">
    <NODE old="FirmataEncode (Devices 2.x)" new="FirmataEncode (Devices 2.x String Legacy)"></NODE>
    <NODE old="FirmataDecode (Devices 2.x)" new="FirmataDecode (Devices 2.x String Legacy)"></NODE>
    <NODE old="I2CDecode (Devices 2.x)" new="I2CDecode (Devices 2.x String Legacy)">
      <PIN old="I2CData" new="I2C Data"></PIN>
    </NODE>
    <NODE old="Arduino (Devices StandardFirmata 2.x)">
      <PIN old="SampleRate" new="Samplerate"></PIN>
      <PIN old="PinModes" new="Pin Modes"></PIN>
      <PIN old="ReportAnalog" new="Report Analog Pins"></PIN>
      <PIN old="ReportDigital" new="Report Digital Pins"></PIN>
      <PIN old="Analog" new="Analog In"></PIN>
      <PIN old="Digital" new="Digital In"></PIN>
      <PIN old="OnData" new="On Data"></PIN>
      <PIN old="Firmwareversion" new="Firmware Version"></PIN>
    </NODE>
  </PATCH>

@joreg
Copy link
Member

joreg commented Feb 6, 2013

looks good except:

  • leave out the "String" in the legacy firmatas. noone will ever see those anyway
  • I2CDecoder: it is strange to rename a pin on a now legacy node. when setting a node legacy it is rather the idea to leave it exactly as it was. it is just a bit wasted effort..

the helppatches you can update manually that they definitely reference the new versions of the node.

now the ultimate test is:

  • start beta28 (or the earliest that had your nodes)
  • create all your nodes just next to each other
  • make ioboxes for all inputs and outputs
  • save
  • open that patch with a29.1
    it should now look exactly the same, with no connections missing. only when hovering the nodes with the mouse you should see ...Legacy on the FirmataDecode/Encode and I2CDecode
    see?

@jnslxndr
Copy link
Contributor Author

jnslxndr commented Feb 7, 2013

:) i see the Legasee ;) yes, that has been working before. don't know, what has gotten me to rename, i think some strange error about parse. well it compiles and works fine for me.

let's hope i can get some more stuff done before the release!

@jnslxndr
Copy link
Contributor Author

jnslxndr commented Feb 7, 2013

btw. i discovered that error of a trialing white space behind the Devices category attribute. That caused old patches to not load it. i guess i would have had to add that extra space into the diffff. could that be fixed, so attributes get trimmed off whitespace at the beginning and the end?

@joreg
Copy link
Member

joreg commented Feb 7, 2013

not sure where you mean there was a trailing white space behind the Devices category?

joreg added a commit that referenced this pull request Feb 7, 2013
@joreg joreg merged commit 6594d04 into vvvv:develop Feb 7, 2013
@jnslxndr
Copy link
Contributor Author

jnslxndr commented Feb 7, 2013

thx herr ioreg!

@joreg
Copy link
Member

joreg commented Feb 7, 2013

merged in now. and tested all to work. even the I2C loads fine as legacy when opening a patch saved with b29

@jnslxndr
Copy link
Contributor Author

jnslxndr commented Feb 7, 2013

:) yes! it is always rising heartbeat...
i think the not loading i2c node in older versions was the reason why i fixed the whitespace so it went well with the legacy mapping... nevermind. i am getting closer to understanding the legacy system. next time i have ask again, i guess...
definitely looking forward to node next week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants