UART receive MAVLink messages micropython
Posted: Fri Jun 30, 2017 3:35 pm
Hello,
As the title says I'm trying to read MAVLink messages using Micropython.
I know the length of the message, so I was thinking of using uart.read(LENGTH_OF_MESSAGE) - but that doesn't ensure I'm reading from the start of a message. Is there a way to specify start and stop bytes for UART read using Micropython? If I can't implement this in MicroPython, coding in C may be easier because headers for these messages can be auto-generated. However where the actual code for reading from UART using C is buried is beyond me. I've taken a look at files uart.c, uart.h and stream.c.
I've also read through /viewtopic.php?t=2848 and didn't find anything that helpful for me. Any ideas on how to proceed would be greatly appreciated.
Thanks!
As the title says I'm trying to read MAVLink messages using Micropython.
I know the length of the message, so I was thinking of using uart.read(LENGTH_OF_MESSAGE) - but that doesn't ensure I'm reading from the start of a message. Is there a way to specify start and stop bytes for UART read using Micropython? If I can't implement this in MicroPython, coding in C may be easier because headers for these messages can be auto-generated. However where the actual code for reading from UART using C is buried is beyond me. I've taken a look at files uart.c, uart.h and stream.c.
I've also read through /viewtopic.php?t=2848 and didn't find anything that helpful for me. Any ideas on how to proceed would be greatly appreciated.
Thanks!