Hi,
On Fri, Jan 10, 2020 at 08:51:44AM -0000, [email protected] wrote:
> Here's an error condition robustness update for SD Card (sdcard_sd)
> protocol analyzer. It adds recovery from state machine failures caused by
> missing packets, which would make the decoder show replies as commands and
> commands as replies, which was a common annoyance in my debug traces.
>
> For more information and screenshots, please visit:
>
> https://imgur.com/a/TeVnzR3
Quick review:
+ # for readability's sake, only show ones in the raw waveform
+ if s[bit][2] == 1:
+ self.putf(bit, bit, [128, ['%d' % s[bit][2]]])
This is no longer necessary, the decoder now has individual annotation
classes for 0 bits and 1 bits, so you can show/hide them independently
in the latest PulseView nightly build.
+ # Improve readability by showing the transmission bit differently,
original line below...
+ # self.putf(1, 1, [130, ['Transmission: ' + t, 'T: ' + t, 'T']])
+ k = 130 if s[1][2] == 1 else 131
+ t = 'C' if s[1][2] == 1 else 'R'
+ self.putf(1, 1, [k, [t,t,t]])
This looks like a useful change in general, but will need to be reworded
a bit for the latest git state of the decoder.
Also, please use longer and shorter string versions, they're used
for different zoom levels in GUIs (e.g. ['Card', 'C'] and such).
+ # is it a reply instead of a command?
+ s = self.token
+ if s[1][2]==0:
+ self.putr('DECODER EXPECED A COMMAND, BUT THIS IS A REPLY')
+ self.token, self.state = [], 'GET COMMAND TOKEN'
+ return
This could be a nice feature as well, but please put the output on an
extra "Warning" annotation class and a "Warnings" row indeed, as Soeren
mentioned in another mail. Also, no need for all-caps in the warning.
If possible, please put your changes in a git repo (GitHub or
elsewhere), or send patches in the usual git format. Example: if you
have exactly one local commit, this will get a file you can attach to mails:
git format-patch HEAD~1
Thanks! Uwe.
--
http://hermann-uwe.de | http://randomprojects.org | http://sigrok.org
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel