Hi Jim,
I was able to get the MFM decoder (
http://www.sardis-technologies.com/ufdr/pulseview.htm) working on PulseView
version 0.4.2 after a quick edit to update the decoder.

PulseView logged an error message while loading the MFM decoder that says
it has no reset() method.
So the decoder probably predates a change in libsigrokdecode where decoders
are required to have a reset() method.
https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=commit;h=10aeb8ea8b183394cebc0033f048f49f4262b57d

The quick fix is to rename the decoder's __init__ method to reset, and have
__init__ call reset. It is only a few lines change which you can do
yourself, but I also attached a file with the change already done. Rename
and replace the pd.py file in the mfm decoder directory. It worked on the
MFM sample data included with the decoder SampleMFMdataAnaDig.sr.

For reference, PulseView's log output is in Settings (screwdriver and
wrench icon near the top left), then Logging. It showed the following error
message for the MFM decoder:

AttributeError: Protocol decoder mfm Decoder class has no reset() method:
type object 'Decoder' has no attribute 'reset'
srd: Failed to load decoder mfm: no 'reset()' method

On Mon, Mar 13, 2023 at 6:35 PM Jim Grant <jgrant...@gmail.com> wrote:

> I am using PulseView to troubleshoot old floppy disk technology. A sigrok
> contributor has published an FM/MFM decoder (
> https://sigrok.org/wiki/Protocol_decoder:Mfm) that I think would be
> useful.
>
> I have loaded the mfm directory into the
> \sigrok\PulseView\share\libsigrokdecode\decoders folder on my WIN 10
> machine but when I run PulseView it does not show up in the decoders list.
>
> I am not an expert at this stuff so I probably missed something. Can you
> point me in the right direction?
>
> Thanks!
>
> Jim G.
> _______________________________________________
> sigrok-devel mailing list
> sigrok-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sigrok-devel
>

Attachment: mfm-reset-method-pd.py
Description: Binary data

_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to