mrrwa/NmraDcc

SMB Examples drop packets

Closed this issue · 2 comments

Hi,
I found out, that the SMB Examples lose packets. The reason is that the Dcc.process() function isn't called often enough.
The Dcc.process() function must be called at least once for every received packet. A DCC accessory packet may be around 6ms long ( including the preamble ). Therefore the Dcc.process() must be called more than once every 6ms. Because of the delay(8) in the loop of the examples this is not possible.

Normally this will not be apparent, because the central station repeats the packets several times.
But I think especially the examples should be programmed to not lose packets under normal conditions.

Good catch!
I've CC'd Geoff

Regards

Alex Shepherd

On 15/08/2016, at 9:55 PM, Franz-Peter notifications@github.com wrote:

Hi,
I found out, that the SMB Examples lose packets. The reason is that the Dcc.process() function isn't called often enough.
The Dcc.process() function must be called at least once for every received packet. A DCC accessory packet may be around 6ms long ( including the preamble ). Therefore the Dcc.process() must be called more than once every 6ms. Because of the delay(8) in the loop of the examples this is not possible.

Normally this will not be apparent, because the central station repeats the packets several times.
But I think especially the examples should be programmed to not lose packets under normal conditions.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I've just merged changes from Geoff that should address this issue