Skip to content

Add compatibility with Pyside2/Qt5 - #1

Open
amotl wants to merge 4 commits into
sigrokproject:masterfrom
daq-tools:pyside2
Open

Add compatibility with Pyside2/Qt5#1
amotl wants to merge 4 commits into
sigrokproject:masterfrom
daq-tools:pyside2

Conversation

@amotl

@amotl amotl commented Feb 21, 2021

Copy link
Copy Markdown

Dear Uwe, Jens and all sigrok contributors,

first things first: Thanks a stack for conceiving and maintaining sigrok.

While we know PulseView and SmuView are in the focus of development, there might still be a need for sigrok-meter. A friend told me that he would be interested to run sigrok-meter on Python 3. So, I tried to look into that and after finding it would still be based on PySide/Qt4, I decided to give it a shot to check what it would take to modernize it to use PySide2/Qt5. It turned out that it was not too much.

So, while I don't know if this is an accepted method to hand in patches to the code base, I still wanted to publish it here. Let me know what you think about it and also if you have a different process of submitting patches.

Keep up the spirit and with kind regards,
Andreas.

There have been some errors when configuring the device before opening.

The reason might be that something changed here with more recent
libsigrok versions. However, we have not been able to verify it yet.
With more recent libsigrok versions, "session.run()" has to be invoked
after "session.start()".

Other than this, pending events should be processed in order not to
block the UI. The most naive approach is to do it in the measurement
loop for now.
@abraxa

abraxa commented Feb 21, 2021

Copy link
Copy Markdown
Member

Thanks a lot for the changes!

In the .rst file you refer to "git clone https://github.com/daq-tools/sigrok-meter --branch pyside2", which as you know isn't the main repo. From a quick glance, it seems as if it merely contains the changes of this PR, so if the PR is merged, the .rst file might as well refer to the sigrok-meter main repo.

Is my understanding correct?

@amotl
amotl force-pushed the pyside2 branch 2 times, most recently from df61a38 to f84d056 Compare February 22, 2021 00:45
@amotl

amotl commented Feb 22, 2021

Copy link
Copy Markdown
Author

Hi Soeren,

--branch pyside2 - ... so if the PR is merged, the .rst file might as well refer to the sigrok-meter main repo.

Thanks for spotting this flaw. I merely added this to provide my colleague with thorough installation instructions and forgot to remove it before submitting the patch.

I've now corrected this and also improved the INSTALL.rst to provide better guidance while being at it.

With kind regards,
Andreas.

@amotl

amotl commented Mar 8, 2021

Copy link
Copy Markdown
Author

Hi Soeren,

I've addressed your suggestions the other day. Please let me know if you see that any other amendments should be made.

With kind regards,
Andreas.

@amotl

amotl commented Apr 19, 2021

Copy link
Copy Markdown
Author

Dear Soeren,

is there a chance to merge this patch?

With kind regards,
Andreas.

@fenugrec

fenugrec commented Oct 9, 2023

Copy link
Copy Markdown

FYI it is being discussed on the sigrok IRC channel these days if you would still care to participate. The PR is not mergeable as-is, there is some interest, but some broader questions need to be addressed first.

@dragonmux dragonmux left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having had a conversation with the sigrok folks on IRC, we've had a look through and identified some items that could do with clarification and potentially clean-up.

It would also be helpful if commit messages like "Make the data flow" were improved to better explain what the commits do and summarise. Right now, the commit log messages don't make much sense to us.

Comment thread .gitignore
@@ -1,2 +1,3 @@
.idea

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems unrelated to the main change set - perhaps drop this change?

Comment thread Makefile
RCC = pyside-rcc
else
$(error "resource compiler not found")
ifeq (0,$(shell which pyside2-rcc >/dev/null 2>&1; echo $$?))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a particular reason for checking for PySide2's resource compiler /after/ PySide's? Would have thought you'd want this the other way around. Additionally, the Python changes drop support for PySide, so what point is there keeping the old build logic around?

Comment thread acquisition.py
Comment on lines +102 to +103
self.session.add_device(device)
device.open()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of moving these two lines? This reads like change noise - a comment inserted before on why this reordering is needed and what bug it solves would be very helpful.

Comment thread acquisition.py
def start(self):
'''Start the session.'''
self.session.start()
self.session.run()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a behaviour change, why is this necessary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants