By popular demand, a quick hack that modifies the pyVCP meter widget to have two independent needles. It's used inside the <meter> tag by specifying <halpin2>"my2ndpin"</halpin2> and hooking up something to that pin. If <halpin2> is not used meter works as before, showing only one needle.
There's an XML file for this test-panel, a short HAL-file that hooks up the pins, and a shell script to run it all here: pyvcp_dual-needle-test
The modifications to linuxcnc source required are in lib/python/pyvcp_widgets.py: 0002-dual-needle-meter-use-with-halpin2-meter2-halpin2.patch
NOTE: This is a quick hack to make it work - don't take my code/patch too seriously...
4 thoughts on “Dual-needle pyVCP meter”
Hello Anders !! I need some hacking guidance. My name is Alan Jacobs in Green Bay Wisconsin, USA. I am retired EE engineer; I have been rebuilding/ restoring my 1973 vintage sailboat ( NOT an RC scale model- but a 42 ft REAL sailboat). I am trying to create a Python user GUI dashboard for my boat ( amps,volts, temps, pressures,fuel, etc) on Ubuntu 12.04. Although I've been at computers for 40 years I'm not up to date; my skills are only intermediate level.I have been struggling with various IDEs to find something like Visual Studio for linux. Idle/ Tkinter works but lots of coding. Glade has only primitive attributes exposed ( cannot change widget colors without coding)....tried Eclipse with Python bindings....Qt will not install on my Ubuntu 12.04 due to dependency/ library incompatibilities. I'm frustrated !! any suggestions.
I don't know of any go-to solution for a general purpose dashboard. Someone should create an open-source LabVIEW clone.
One solution many projects are taking is to build websites or things that are shown to the user in a web browser. This makes your dashboard/GUI independent of platform and not tied to a particular screen or device.
Rather than a patch, do you have a patched pyvcp_widgets.py file? The patch doesn't work with the source I currently run (2.7.14).
It's a shame this mod hasn't made it into the official release.
Sorry it is 8+ years since I worked on this. I think your best bet is posting the question/suggestion on the linuxcnc forum, maybe with the code from here attached, or a link.
For someone who is active with linuxcnc development I would imagine applying the patch and getting it into the next linuxcnc release is not much work. Unfortunately I am quite busy with other projects and I am not likely to do this in the near future.