openhantek icon indicating copy to clipboard operation
openhantek copied to clipboard

Wish: measuring voltages

Open phmarek opened this issue 7 years ago • 9 comments

65f1202bf20910e9ba83fdf219e9b5aec715ec11 is great; now, if the Y position would be used too, it should be easy to mark two places via mouse clicks, to measure time resp. frequency and voltage differential at the same time!

Thank you for this software!

phmarek avatar Jan 13 '18 09:01 phmarek

I like this idea too, but there”s a way to kind of do it already. Move the trigger slider up and down to see what voltage any point represents. Of course you lose trigger if you go too far so maybe pause the display first.

Hoagie572 avatar Jan 13 '18 22:01 Hoagie572

Well, the right way of enabling cursor measurements is to reimplement an idea from legacy Hantek SW: provide choice of 3 cursor shapes ('|', '-', '+') and attach markers to specific channel. Legacy SW has only one global pair of markers, we can go beyond that limitation and implement two markers per channel. Does not look too hard to implement, UX would be the most complicated part of this effort :)

dendvz avatar Jan 13 '18 23:01 dendvz

Already started prototyping. Expecting first results for preview in a week or so.

  • cursor selection: initially on / off only, where on is a rectangle; later on will add '+', '|' and '-' shape selector
  • measurements grid is displayed as vertical 2x14 bar near left or right edge (position selectable via settings) of the scope view, e.g.
Markers .
40 ms .
CH1 ON
20.00 ms 2.0 V
CH2 OFF
. .
MATH ON
15.00 ms 150 mV
SP1 ON
20.00 kHz 11 dB
SP2 OFF
. .
SPM ON
10.00 kHz 13 dB

Click on cursor / marker name in a measurements grid activates the cursor for mouse events.

dendvz avatar Jan 19 '18 15:01 dendvz

Omg, we will get some merge conflicts, whoever finishes his work first :D I'm working on GlScope at the moment as well ^^.

davidgraeff avatar Jan 20 '18 11:01 davidgraeff

NP, the GlScope changes in this proto only affect GlScope::drawMarkers() :)

dendvz avatar Jan 20 '18 11:01 dendvz

I have created a branch with my changes and will postpone them until yours are ready. The plan is to cut out grid/marker code into a separate class and draw to an offscreen texture, so that it can be reused by the exporter.

davidgraeff avatar Jan 20 '18 13:01 davidgraeff

Also, how about having more keybindings available? Eg. "m1" sets the first marker to the mouse position, "m2" the second one, "z1" moves the zero level of CH1 to the chosen vertical position, and so on.

This would be much better than the current "find-the-UI-with-the-mouse-and-fiddle-around".

Also, please bring "Ctrl-Q" back - this used to quit OpenHantek, but does so no more.

phmarek avatar Jan 21 '18 16:01 phmarek

Keybindings make sense. At the moment I have control part (DsoWidget + scopesettings.h) more or less ready for preview. Not yet in: save / restore settings to / from ini file, cursor panel placement, dedicated toolbar button to show / hide all cursors, switching between cursor shapes. The latter is the first candidate for automation with shortcuts. Will also think of binding popup menu to right button click.

An immediate goal, however, is to merge my proto with branch prepared by David.

Screenshot (fake cursors, control part only): cursor_panel

dendvz avatar Jan 21 '18 21:01 dendvz

PR #177

dendvz avatar Jan 28 '18 18:01 dendvz