We’re working on an app that listens for digital input changes and then records them with a timestamp. At a later time, a separate app makes IPC calls to retrieve this data and flush it out.
The code for this app can be found here: https://github.com/nvandoorn/digitalInputs
Every time the separate app makes a call to retrieve the data, the data retrieved is incorrect, and the digital inputs app seg faults immediately after finishing any of the IPC functions specified in
brnkl_digital.api. As it stands, digital input values are stored in a fixed size, statically allocated array with no sanity checks. I understand that this is somewhat dangerous, however the plan for the future is to shift out old values to make room for new ones. For the time being we’ve been sure to test this with a low number of digital changes to avoid running out of memory.
This issue seems to go away when I comment out the contents of
digital_changeHandler which leads me to believe this issue is caused by incorrect usage of the Legato event loop.
Anyone have any ideas on how to further debug this?
Thanks in advance.