Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing names of channels is not being saved when exporting data #277

Open
StrandmonYellow opened this issue Jun 25, 2024 · 2 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@StrandmonYellow
Copy link

Joulescope model

JS220

UI version

other

What OS are you seeing the problem on?

Windows 11

What happened?

I am using UI version 1.1.10.

When a measurement has been made, the names of the channels can be changed to anything. When I change the name, export the data and then load the file again, the names are back to default.

When I save a file it shows:
image

When I reopen the file it shows:
image

What was expected?

I expect the names to be saved when I reload my measurement.

How to reproduce?

  1. Start the application on windows 11.
  2. Perform a measurement with external GPIO as input.
  3. Change the names by Right-clicking and entering a new name.
  4. Export the data to a .jls file.
  5. Load the file again, now the names are back to default. (0, 1, 2)

Extra information

No response

@StrandmonYellow StrandmonYellow added bug Something isn't working triage New issue that needs to be reviewed and prioritized labels Jun 25, 2024
@mliberty1 mliberty1 removed the triage New issue that needs to be reviewed and prioritized label Jun 25, 2024
@mliberty1
Copy link
Member

Hi @StrandmonYellow - I can definitely understand that you would want the saved JLS to display the same in the Waveform widget as when you saved it.

The original feature to label the plots is #255. When you change a plot name, you are not changing a signal name. Those exist internally, but the UI needs them in a certain way to display the correct information. The plot name is only local to the Waveform widget.

When you save a JLS file, you are saving each signal for each connected Joulescope. JLS record is actually independent of any Waveform widget. The plot names are only specific to a single Waveform widget. You can actually add multiple Waveform widgets to the same view. So, if you press the Signal sample recording button on the sidebar, and the UI knows that you have set plot names, the Configure signal recording widget could prompt you for signal names as default or any of the visible Waveform widgets.

Now, if you export a JLS from a Waveform widget, then it should automatically use the source Waveform widget for the plot names.

What do you think?


Developer notes: The JLS file signal names must not change. However, we can save the plot names as arbitrary metadata on signal 0. The existing code stores "notes" this way. We could add a JSON structure that contains all of the Waveform plot overrides, like this:

{
  "id": "joulescope.ui.waveform.widget",
  "version": "1.0.0",
  "data": {
    "plots": {
      "i": {
        "range": ...
        "scale": ...
        "preferred_prefix": ....
        "name": ....
        "color": ....
      }, 
      "v": {
        ....
      },
     ....
   }
  }
}
  

@StrandmonYellow
Copy link
Author

Yes, this could be a valid solution to save the names without the need to save them in the notes of a recording.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants