ngscopeclient / scopehal-apps

ngscopeclient and other client applications for libscopehal.
https://www.ngscopeclient.org/
BSD 3-Clause "New" or "Revised" License
608 stars 100 forks source link

Reload configuration from scope is tied to window events #399

Closed mubes closed 1 year ago

mubes commented 2 years ago

After clicking the 'Reload Config' option (third from right) on the toolbar, the reload 'steps' only happen when window events occur (e.g. mouse move). If there are no window events then the reload steps don't happen and things appear to freeze.

Tested on Siglent driver against 18e6d57fc4bf51198176cda765702853782cf79b.

DAVE

azonenberg commented 2 years ago

The reload button flushes the configuration cache. Each individual configuration setting is pulled from the hardware the next time the relevant API, e.g. GetVoltageRange() is called. Some of these are called every frame while others are only called when you open the trigger or timebase properties dialog, the context menu, etc.

I guess maybe we could force a redraw of all waveform areas on the button press as well as flushing the cache?

mubes commented 2 years ago

Hiya,

From a UI perspective I think that would add a lot of value, because the only reason you would flush the cache is that you think something is out of step in the display....it would also make it 'feel' like it's done something (and make this bug I'm trying to find a lot easier to track down!).

Regards

DAVE

On 13/01/2022 23:16, Andrew Zonenberg wrote:

The reload button flushes the configuration cache. Each individual configuration setting is pulled from the hardware the next time the relevant API, e.g. GetVoltageRange() is called. Some of these are called every frame while others are only called when you open the trigger or timebase properties dialog, the context menu, etc.

I guess maybe we could force a redraw of all waveform areas on the button press as well as flushing the cache?

— Reply to this email directly, view it on GitHub https://github.com/azonenberg/scopehal-apps/issues/399#issuecomment-1012605331, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJTBD5KNP6BYW2WEZFUBMDUV5MMTANCNFSM5L5E25TA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

azonenberg commented 2 years ago

I don't have time to work on this for a bit but try adding a queue_draw() call in the refresh handler in OscilloscopeWindow. You might have to also loop over the WaveformArea instances and refresh them too, I forget if it's recursive to child windows or not.

mubes commented 2 years ago

Candidate patch available as https://github.com/azonenberg/scopehal-apps/pull/400

DAVE

azonenberg commented 1 year ago

Fixed in 1ed6e626bde5e60bd2ae769bd96b8355baa2d12d