Home Forums EasyTransfer Library Support Forum Easy Transfer Array Populating (from SD?) Reply To: Easy Transfer Array Populating (from SD?)

#3528

Sounds like a good plan.

I believe the lock up is from

int arraydata[];

 

in the struct. This does not specify a length. Hence it was simply a pointer to a single INT not really an array and the memcopy over wrote from that point, locking the code up, when used by the ET.sendData().

I was able to get https://gist.github.com/mpflaga/c1f957f4f5146b990c28daa8d82fb16e to not lock up, printing out the results to monitor. I did not test the ET feature to a RX. But assume it works, as it does not lock up.

The inherent danger of using MemCopy is that it can over/under write things. Hence pointers are safer, but a bit tricky to understand and follow.

the SdCard example I see had several typo’s. So not sure if it even works. But I have compiled it into a solution similar to your specification at https://gist.github.com/mpflaga/1a9d0ad89258f069d5c0c2d6a6b10e5e this posted GIST does compile. I did not actually try it with a SdCard, (not one handy), but it seems like it should work.

Assuming this works, be mindful of the Scope of an entity and its true length.

happy Blinking.