Preferences dialog not show current state

@mliberty, I just noticed (0.4.5) that if one selects a current range in the “Oscilloscope” mode, say “2A”, and then opens the preferences dialog the current range shows “auto.” Similar behavior with the voltage range.

If one doesn’t notice this the settings from the dialog are applied to the UI, bit me a couple of times today,

1 Like

Hi @SidPrice, I have been thinking about this issue, and I am not sure how to resolve the the UI conflict. The Preferences are the defaults that persist between runs of the Joulescope UI software. Other than i_range and v_range, the Preferences panel is the only place to change these values, so applying them immediately makes sense. However, users may want to change i_range and v_range at runtime through the Control panel and not have these value changes persist.

I think that the software has some choices for Preferences i_range and v_range values:

  1. Do not apply change (just save to disk). Defer until next program start.
  2. Only apply when user changes i_range or v_range Preferences from previous value.
  3. :x: Always apply: current implementation which causes this issue.
  4. :x: Default Preferences to the active values and save. Will save undesired defaults - same problem as now but in reverse.

What do you think makes the most sense? Other options that I missed?

Hi @mliberty, I am not sure I fully understand the options you wrote.

My expectations of an application are:

  1. The state of the application when I close it should be preserved and restored when I next start it.
  2. When I open a settings/preferences dialog I expect any values displayed to be their current values. Therefore, only things I change from the current state will be applied.

Does that help or make things worse for you?

I think that this ties into your Persistence of preferences feature request. For now, persisting i_range and v_range will cause new users to be confused that the multimeter does not just work by default (it will saturate). I believe that I now understand your expectations that the software should behave as if you never stopped and started it. This means that you want the behavior I listed as (4). Unless the software persists all View settings, the software can’t do this without confusing people. I think (2) is the best option for now, then.

@mliberty, sorry I did mix the two feature requests.

My basic request here is that when one opens the preferences dialog it displays the current state of those settings on the dialog. As I said originally, I have found myself frustrated by the fact that opening the preferences and applying a new setting may update the live settings incorrectly, compared to how they were prior to opening settings.

Does that make sense?

I think #2 above does not address this, unless you implied that the current states would be displayed on opening.

Hi @SidPrice,

Here is a better description of what I just implemented :smile:

The Control view displays the present value in use for i_range (Current Range) and v_range (Voltage Range). Changing these values effect the device’s present operating mode and no more. Changes here are not persisted.

If you open the Preferences dialog, it will display the value of i_range and v_range that will be applied whenever you restart the software or connect a new device. This may be different that the present values in the Control view. If you open Preferences and don’t change i_range or v_range, Control will not be affected. Any changes to i_range or v_range will be applied to the Control view and active device.

This implementation makes it safe to open the Preferences and adjust other settings without affecting the operation of the active device, which meets your objective. If I end up adding a mode that fully persists the present view, then the Control changes would also be persisted, which means Preferences and Control would always match for i_range and v_range. So, this change still works going forward.

This change is in commit 0d086e. Either way, you can try out 0.4.6 when it’s released to make sure that it does what you want.

Hi @mliberty, I look forward to trying the update when it is released.

From a personal perspective I still think it is confusing and contrary to the way I expect Preferences to work. However, the final choice must be yours.

Keep up the great work!

1 Like