Re: C-code
Posted: Wed Nov 20, 2019 11:31 pm
Hi,
Glad to hear it's receiving ok!
Can you post your code that's giving the errors? I used m ((msg) as an array to receive the data and x (& y) as data to be extracted.
Both were declared as local variables ( hence the '.' at the start) - it's good practice to keep a minimum number of globals to aid readability.
You can output all the data in the message using a loop: - for example to output it to UART. Note that m, i and error are defined as local (m[12] byte, byte and byte) and I don't check error (if .error & 0x80 then something has gone awry)
Martin
Glad to hear it's receiving ok!
Can you post your code that's giving the errors? I used m ((msg) as an array to receive the data and x (& y) as data to be extracted.
Both were declared as local variables ( hence the '.' at the start) - it's good practice to keep a minimum number of globals to aid readability.
You can output all the data in the message using a loop: - for example to output it to UART. Note that m, i and error are defined as local (m[12] byte, byte and byte) and I don't check error (if .error & 0x80 then something has gone awry)
Martin