Page 1 of 1

SPI Legacy - Send String and Byte Arrays

Posted: Sun Apr 08, 2012 12:46 pm
by Jay Dee
Hi guys,
I have in the past sent a series of bytes using the char send function in the legacy SPI component, I'm now on a new project and looking to tidy the whole process up.
I though I could use the send string function to send a byte array. However the send string function does seem to want an array but the actual 'text' string.
Is there a function to convert a byte array to a text string?

As an side query, The current SPI legacy can often be made to work but has anyone heard of plans in the future for a more general purpose SPI component?
Cheers,
John

Re: SPI Legacy - Send String and Byte Arrays

Posted: Tue Apr 10, 2012 10:20 am
by Benj
Hi John,

You can create a string variable in the variable manager and then use this just like you would a byte array. You could then pass this directly to the send string function. The difference between a byte array and a string is negligible and its more of a Flowcode syntax problem where the component is expecting a string type variable.

We do have plans for a generic SPI component, in fact the C code for this is done and is just waiting for a front end.

Re: SPI Legacy - Send String and Byte Arrays

Posted: Thu Apr 12, 2012 8:19 pm
by Jay Dee
Thanks for the pointers Ben, thumbs up as usual! Look forward to SPI developments :-)