littleyoda / sigrok-DCC-Protocoll

Development of a DCC (Digital Command Control) Protocol decoder for Sigrok / Pulseview
GNU General Public License v2.0
13 stars 6 forks source link

Too few preamble bits in "compliance testing" mode testing #5

Open FrightRisk opened 3 years ago

FrightRisk commented 3 years ago

Looking at this trace, why is it counting the bits this way? Is it on our end or something in the protocol decoder? 2mHz scan on DCC++EX. This happens after every idle packet. Shouldn't it be 14 bits for the standard and 16 for Rockrail? And program track must send 20 bits? So I believe 17 is incorrect. Want me to fix it an issue a PR?

image

su68es commented 3 years ago

Hi Fred,

you are right, there are different standards here again. Since the program does not distinguish between main track and programming track / mode and there are different use cases, it is implemented so that at least 10 bits are required as a preamble and in the compliance mode is adjustable by the user to meet the different standards.

image

The default setting of 17 corresponds to the RCN. I know no way to make the default setting of values in sigrok dependent on conditions. So the user has to set it.

By the adjustability everything is given which is necessary for testing, isn't it?

What can be discussed is if the stopbit of the last packet should be counted in compliance mode or not. I currently do not do this in compliance mode and only in the normal evaluation. How do you see that?

Kind regards Roland