lobis / hvps

A Python package for controlling high voltage power supplies (HVPS) over serial port. Supports CAEN and iseg power supplies.
https://github.com/lobis/hvps
BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

GUI for N1471H (CAEN) #63

Closed lobis closed 3 weeks ago

lobis commented 2 months ago

@AlvaroEzq I made some changes to the file:

AlvaroEzq commented 2 months ago

however, in order for this to work you need to add your caenSimulator module to the directory.

I added the caenSimulator module in the same directory as gui.py (face723).

Modify some lambdas in https://github.com/lobis/hvps/commit/39669b75c2ec2c980da811dc3a5c25d3e07a24af and https://github.com/lobis/hvps/commit/1da155ec35cded0318da0c9d49721cab8d3fab09. I think this is more correct but I am not 100% sure this achieves what you originally intended.

Yes, this achives what I intended :+1:

AlvaroEzq commented 2 months ago

The 1231d77 breaks the GUI when showing and hiding the ToolTip. Apparently, tkinter sends one extra parameter to the show_tooltip and hide_tooltip https://github.com/lobis/hvps/blob/8189ab7fe6125d7a58cb3323605c85adf38653ce/gui/CAEN-N1471H/gui.py#L18-L19 in this lines...

lobis commented 2 months ago

The 1231d77 breaks the GUI when showing and hiding the ToolTip. Apparently, tkinter sends one extra parameter to the show_tooltip and hide_tooltip

https://github.com/lobis/hvps/blob/8189ab7fe6125d7a58cb3323605c85adf38653ce/gui/CAEN-N1471H/gui.py#L18-L19

in this lines...

Oh I see. I never use the event variable so it felt strange. Since I don't like to have unused variables (even if they are in fact used behind the scenes by the program) I like to remove them by wrapping the function in a lambda. This should work.

lobis commented 1 month ago

@AlvaroEzq when you think this is ready please review and approve the PR (since you are the reviewer) and I'll merge it!