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 made the iir_ch array a bit longer (20x1) to show the issue in dual-iir:
When hitting list on a larger struct over the serial terminal, it truncates output at some variable length and doesn't print everything. I played with the buffers a bit but couldn't quickly figure out where the issue was.
So ultimately this is governed by the underlying SerialPort buffer size, which is 1024 bytes. The reason we can send more than that is because on each USB serial write, we can potentially send 64 bytes out the USB interface (if the EP is in a state to transmit) every time a write!() happens to the USB port.
If we wanted to guarantee that this would be resolved, we would need to increase the SerialPortwrite_store buffer size to something like 4KB.
I suspect that Booster does not have this issue (even though it can print a large settings structure) because the CPU is running at a slower speed than Stabilizer, which means it takes longer actual amounts of time to progress through listing, serializing, and transmitting the settings structure, which allows more data to be transmitted via USB while the CPU is processing data.
However, this is always going to be a cat-and-mouse game if we're using Stabilizer as a library, since a library user could always make a larger and larger settings structure. We could allow the buffer to be passed into the constructor via some generic StabilizerSettings parameter to allow customization.
Isn't there a way to keep the buffer small and make this async "blocking", i.e. use an async fn write() that does not discard when the buffer is full but suspends for another task to drain the buffer?
I made the
iir_ch
array a bit longer (20x1) to show the issue indual-iir
:When hitting
list
on a larger struct over the serial terminal, it truncates output at some variable length and doesn't print everything. I played with the buffers a bit but couldn't quickly figure out where the issue was.The text was updated successfully, but these errors were encountered: