-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: can't stack decoders #530
Comments
@fornellas |
@dreamsource-tai I believe this change indeed broke existing functionality. The API for protocol decoders defines that each can have a list of Eg: the protocol decoder I wrote expects This is what I get back: So it unconditionally forces me to use the I suppose I could rename the new uart decoder from #429 to output something like
@dreamsource-tai does this make sense to you? Let me know if you need more clarification please. |
@fornellas |
@fornellas |
@dreamsource-tai I can certainly do that as I said previously, and it'll work for my case. In the general case though, this is exposing one interface for users (I do understand the rationale), and the API has a different interface. How about this, for example:
This would keep things simple for "the average user", but also, enable more complex scenarios, such as LCD screen protocols which DO support multiple buses. WDYT? |
@fornellas |
While I understand this is the current state, this is not what the decoder API allows. For example, I sent this PR #338 which adds support for an LCD driver. In that case, I had tons of trouble stacking on existing SPI decoders (similar issues to the UART issues I had), so I ended up... reimplementing a SPI decoder inside it, essentially duplicating code. This works, but is far from good engineering. As this LCD driver supports multiple buses (SPI, I2C, various parallel interfaces), a much nicer implementation would be for it to support Hope that clarifies. |
@fornellas |
Thanks! I want to congratulate you for taking the time to listen and understand. |
It seems that 37a03216d518ee1a12ec2da870c8e3ca51398bead8ecf41d4c1555697943b533L482 completely removed the ability to stack decoders. At previous commits (eg: v1.1.2), we have the option to stack a decoder:
At any later commits (eg v1.2.0, v1.2.1), the option is GONE:
@dreamsource-tai it seems you authored the commit that seems to have broken things, perhaps you can help shed some light here, probably this should be a somewhat quick fix.
I'm honestly surprised how such a core feature has been broken for so long.
The text was updated successfully, but these errors were encountered: