You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CalliopEO.py currently needs "line-oriented" data from the Calliope Mini. When Calliope Mini transmits "unstructured" data without newlines, CalliopEO.py will not continue processing the data (until it eventually receives a newline).
This could be improved by reading abitrary chunks of data from the serial input buffer. Later, CalliopEO.py can extract the lines and do further processing like adding the time stamp and so on.
Maybe, we can define this as a feature for a v2.
The text was updated successfully, but these errors were encountered:
In my fork I created an issue branch. There, I completely rewrote the function readSerialData() (see here) to handle "unstructured data", in particular a stream of data not containing newlines or very, very long lines.
I defined a serial data buffer (see here) and new global variable MAX_LINE_LENGTH (see here). If the buffer length exceeds MAX_LINE_LENGTH the buffer is "cropped" by extracting MAX_LINE_LENGTH characters as a line which will be outputted to the file.
The functions waitSerialStart() and waitSerialEnd() are now incorporated in readSerialData().
The return value of this function is no longer a list of lines. The data is directly written to file (via function write2File()). The return value of readSerialData() is now the number of characters written to the file.
Before merging this change to main, this needs further testing. I will also adding a dedicated testcase with a hex file outputting very long lines.
CalliopEO.py currently needs "line-oriented" data from the Calliope Mini. When Calliope Mini transmits "unstructured" data without newlines, CalliopEO.py will not continue processing the data (until it eventually receives a newline).
This could be improved by reading abitrary chunks of data from the serial input buffer. Later, CalliopEO.py can extract the lines and do further processing like adding the time stamp and so on.
Maybe, we can define this as a feature for a v2.
The text was updated successfully, but these errors were encountered: