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
I just realized this topic was also discussed in #46, but I still think this is a bug.
The comment in #46 is that the application is not designed to work with multiple ports - but apart from this minor issue, the multi-port support is implemented well.
I also don't agree with the concern about the usage of the protocol in tiny controllers - the suggested fix has no memory impact if you instantiate only one port.
There seems to be a bug if you use multiple MIN ports at the same time with the TRANSPORT_PROTOCOL option enabled.
There is only one ring buffer defined in min.c:
While all other port related data - including access indices for this buffer - are available for each port in
struct min_context
The effect is that each port overwrites buffer data of the other ports.
I suggest that
uint8_t payloads_ring_buffer[TRANSPORT_FIFO_MAX_FRAME_DATA];
is moved to
struct min_context
so that each port has its own ring buffer.
The required changes are:
min.h - Add ring buffer in
min.c - Remove old ring buffer
min.c - make sure the two usages of the old buffer access the new buffer instead
The text was updated successfully, but these errors were encountered: