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

Feature request - Scale per channel #92

Open
usbalbin opened this issue Dec 1, 2023 · 3 comments
Open

Feature request - Scale per channel #92

usbalbin opened this issue Dec 1, 2023 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@usbalbin
Copy link

usbalbin commented Dec 1, 2023

When having different values with completely different scales, the smaller ones turns in to flat lines close to zero

It would be useful to have individual scaling per channel like on an oscilloscope. Not shure how that would work with y-ranges etc.

image

@hacknus
Copy link
Owner

hacknus commented Dec 2, 2023

Indeed a very good idea, this should be implemented! We could have a drop down to select pre-defined gains/scaling factors (..., 0.1, 1, 10, ...) next to the field where you can enter a name for the dataset/curve?

@usbalbin
Copy link
Author

usbalbin commented Dec 2, 2023

Perhaps even a "offset" parameter. That, I, believe would be enough to allow scaling and moving around the curves above until they are all evenly spread out and with their respective variations clearly visible.

If one could dream :), there would be two buttons Autoscale and Autoscale side by side(or similar). Where the first button would scale and move all curves to occupy the hole screen. The second button would do the same but put them side by side so as to avoid any overlapping.

@hacknus
Copy link
Owner

hacknus commented Dec 2, 2023

Yes, we would definitely require both a scale and offset. Autoscale could also be a possibility and could be easy to implement (not sure though). I think both need to be implemented in line 333 of gui.rs:

for (i, time) in self.data.time[window..].iter().enumerate() {
    let x = *time as f64 / 1000.0;
    for (graph, data) in graphs.iter_mut().zip(&self.data.dataset) {
        if self.data.time.len() == data.len() {
            if let Some(y) = data.get(i + window) {
                graph.push(PlotPoint { x, y: *y as f64 });   // implement offset and scale here
            }
        }
    }
}

Autosacle side by side could be more difficult, there I do not have a clear picture on how one would do this.

@hacknus hacknus added the enhancement New feature or request label Dec 2, 2023
@hacknus hacknus added the help wanted Extra attention is needed label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants