MCUViewer icon indicating copy to clipboard operation
MCUViewer copied to clipboard

Display (parts of) arrays

Open wimalopaan opened this issue 1 year ago • 11 comments

It would be convenient to have an option to display the contents of an array (e.g. like the output of a fft) and update that continously. Sometimes it would also be good to only display a part of that array e.g. an index-range.

wimalopaan avatar Feb 23 '24 05:02 wimalopaan

Do you mean it would be nice to have a way of quickly importing an array, or rather displaying a range of an array as a table view?

klonyyy avatar Feb 23 '24 08:02 klonyyy

A table-view would be good, but I had an updating graphical view (e.g. a bar-graph) in mind. And it would be very nice if it would be possible to import the whole array at once.

wimalopaan avatar Feb 23 '24 08:02 wimalopaan

Another option would be so save the array-data in a trace-file periodically triggered by some event / variable-change.

wimalopaan avatar Feb 23 '24 08:02 wimalopaan

So considering options that are available right now, the main problem is that the import and placing the variables on the plot takes very long to set up, am I right?

klonyyy avatar Feb 23 '24 11:02 klonyyy

Not only that, but I'm looking for a way to plot an array as a whole: e.g. the array contains some fft-values (or the amplitudes of the frequencies), I want to see the spektrum.

wimalopaan avatar Feb 23 '24 16:02 wimalopaan

I'm thinking if the problem is not too specific. Are there any obstacles in using bar graph for that? Apart from a lengthy process of manually adding the coefficients to the list and then to the plot?

klonyyy avatar Feb 25 '24 06:02 klonyyy

Yes, a bar graph is an option but specifying the indixes is tedious (e.g. a 512 element array).

Maybe a another option would be to write the whole array to a file (together with some other variable that represents to time).

wimalopaan avatar Feb 25 '24 08:02 wimalopaan

Thanks for clarification. The functionality you're porposing seems to be connected to #34. I'll think about the optimal way to implement it.

klonyyy avatar Feb 25 '24 08:02 klonyyy

Yes, I overlooked #34 . Thank you!

wimalopaan avatar Feb 25 '24 08:02 wimalopaan

For the bar-graph of arrays: do you see any change to implement this?

wimalopaan avatar May 17 '24 09:05 wimalopaan

Unfortunately my current priority is to merge the devel branch with J-Link HSS feature to main. After that I plan on adding less anticipated features. If you're not able to help directly by implementing the feature, It would be great if you could provide a detailed description of how you'd see this feature. I wouldn't like to implement FFT-type plots using bargraphs if they are not designed for such usecases. You could check out ImPlot for the type of plot that would suit this best.

klonyyy avatar May 17 '24 20:05 klonyyy