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

Added setting of minimum and maximum curves values on the graphs #689

Closed
wants to merge 220 commits into from

Conversation

demvlad
Copy link
Contributor

@demvlad demvlad commented Jan 18, 2024

Added setting of minimum and maximum values of curves on the graph.
The revision is fully compatible with the previous scaling method.

To use it, you need to:

Open "Configure graphs" dialog box.
Check new "MinMax" checbox on curve settings.
Set required values for minimum and maximum chart values for curve (there are real min max values as default).
You need to input min and max values in primary units as in logfile. You can look it at default min max values in text fields,
Click "Save changes".
This is the most versatile way to configure curves.
If it is necessary to plot some curves along the same axis, then you need to set the same or proportional ranges of values for them.

With unchecked "MinMax" checkbox the curve scaled in the standard way, as before.

There is a first step for improvment of curve scales. It will be improved in the future.
For example, it will be possible to automatically combine several curves on one axis.

This comment has been minimized.

@demvlad
Copy link
Contributor Author

demvlad commented Jan 18, 2024

All are pushed good in new PR... This version has issue: minimum and maximum values of curves for some parameters are limited after reloading charts setup dialog box. This issue will resolve in near time. But i see: it is posible to input any min max values, and chart works normal, but this values are limited after chart setup panel reopening.

@demvlad
Copy link
Contributor Author

demvlad commented Jan 18, 2024

it is posible to input any min max values, and chart works normal, but this values are limited after chart setup panel reopening.

There is more interested behavior today: it is posiable input and save any min max values, but exclude zero. Zero values is rewriten after reload of config dialog box.

@demvlad demvlad changed the title Added setting of minimum and maximum values of curves on the graphadded minimum and maximum curves values Added setting of minimum and maximum values curves values on the graphs Jan 19, 2024
@demvlad demvlad changed the title Added setting of minimum and maximum values curves values on the graphs Added setting of minimum and maximum curves values on the graphs Jan 19, 2024
@demvlad

This comment was marked as off-topic.

@nerdCopter

This comment was marked as off-topic.

@demvlad

This comment was marked as outdated.

@demvlad

This comment was marked as outdated.

@demvlad demvlad closed this Jan 19, 2024
@demvlad

This comment was marked as off-topic.

@nerdCopter

This comment was marked as outdated.

@demvlad

This comment was marked as outdated.

@nerdCopter nerdCopter reopened this Jan 19, 2024
@nerdCopter nerdCopter marked this pull request as draft January 19, 2024 14:45

This comment has been minimized.

@demvlad

This comment was marked as off-topic.

@nerdCopter

This comment was marked as off-topic.

@demvlad

This comment was marked as off-topic.

@nerdCopter

This comment was marked as outdated.

@demvlad

This comment was marked as outdated.

@nerdCopter
Copy link
Member

findings:

  • if i checkmark min/max without changing the value, the trace will move. uncheck will return.
  • if i change the min or max values, there is no way to reset to default values unless a press a number key to reload my workspace. if i were to save a workspace with modified values, how to reset to default values?

@nerdCopter nerdCopter marked this pull request as ready for review January 19, 2024 15:37
@demvlad
Copy link
Contributor Author

demvlad commented Jan 19, 2024

findings:

  • if i checkmark min/max without changing the value, the trace will move. uncheck will return.
  • ...how to reset to default values?

Yes, i thought about restoring of defaults values.
Will think how to do that...

@demvlad

This comment was marked as off-topic.

@nerdCopter

This comment was marked as off-topic.

@demvlad

This comment was marked as outdated.

@ctzsnooze
Copy link
Member

ctzsnooze commented Jan 19, 2024

I think this is looking really good, and I commend what you've achieved. Hopefully the comments here are encouraging, because it will be very useful when complete.

I'm not a git expert by any means. From experience could I suggest making a duplicate 'test' branch of the PR, and working mostly on the 'test' branch. Once you have the 'next step in the job' done, checked, and known good, squash the new commits in the test branch (those added above the current state of the PR branch) so that they become a single commit in your 'test' branch, and cherry-pick that commit into the PR branch. Otherwise you can accidentally mess up the PR branch without meaning to. And always make backup branches in case you do something bad by accident :-)

One thing to consider is things like the motors tab, where there are existing mechanisms to set default min and max. There is a percentage zoom that zooms in around the middle 50%. I think it would be a big job, but it would be great if things like motors would somehow automatically end up with a min-max range of 0-100 by default.

Likewise in many debugs the range for values within the debug is defined either in a 0-N range, which 'zooms' in and out around N/2, or in a -N to +N range, which zooms around zero. If not defined, the range is min-max of the values in the variable (very not nice).

It would be a big job but once this method is in place, I would be willing to go through the min and max configurations for those debugs. It would certainly simplify things if we only had to set min and max values :-)

@demvlad
Copy link
Contributor Author

demvlad commented Apr 26, 2024

THE MANUAL
The MinMax control PR can control curves scale and placement quickly and full.
The current MinMax curves settings are showed at 'Configure graphs' dialog box in the "Minimum" and "Maximum" columns.
1

The MinMax values can be changed:

  • By direct input into table cells at 'Configure graphs' dialog box. It is possible to changes values manualy or set default values by double mouse click at values field.
  • By using context menu

To show context menu you must do right mouse click on Minimum or Maximum values field what you want to edit.
The main context menu:
2

The main menu include following parts:

  1. The menu actions to edit all curves
  2. The menu actions to edit one curves what you selected by right mouse click (The 'Gyro pitch' for example at the picture)

The actions for all curves:

  • 'Like this one' - apply MinMax of curve what you selected by right mouse click ('Gyro pitch' for example) to all curves.
  • 'All to default' - set all curves MinMax values to default
  • 'Zoom in', 'Zoom out' - change zoom for all curves
  • 'Default' - set the all curves MinMax values to default
  • 'Full range' - set the all curves MinMax values from Log file data during the all flight time
  • 'One scale' - set all curves to one scale
  • 'Centered' - The curves are centered around X-axis

The single curve submenu has same actions:
3

The main menu has extended mode. You need press the 'Shift' key to activate it and select the submenu, what you need.
4

The 'Like this one' extended submenu.
You can change MinMax values and select curves what you need by using the checkboxes to apply these values.
Click 'SET MIN-MAX VALUES' item for apply.
Click 'Back' menu item to go back to main menu.
Click 'Apply change' or 'Cancel' button on the main 'Configure graphs' dialog box to close the menu and dialog box immediately
5

The 'Zoom in', 'Zoom out' extended submenu.
You can set the zoom procent value and select curves what you need by using the checkboxes to apply zoom.
Click 'ZOOM IN', 'ZOOM OUT' items for apply zoom
Click 'Back' menu item to go back to main menu.
Click 'Apply change' or 'Cancel' button on the main 'Configure graphs' dialog box to close the menu and dialog box immediately
6

The 'Default' extended submenu.
You can select curves what you need by using the checkboxes to apply default values.
Click 'SET CURVES TO DEFAULT' item for apply
Click 'Back' menu item to go back to main menu.
Click 'Apply change' or 'Cancel' button on the main 'Configure graphs' dialog box to close the menu and dialog box immediately
7

The 'Full range' extended submenu.
You can select curves what you need by using the checkboxes to apply values.
Click 'At all global log time' menu item to set MinMax values from log data during all time.
Click 'At local window time' menu item to set MinMax values from current time interval at the chart window.
Click 'At markere time range' menu item to set MinMax values from markered time interval what you select by using "I", "O" keys. If it is not select then will apply all log time interval.
Click 'Back' menu item to go back to main menu.
Click 'Apply change' or 'Cancel' button on the main 'Configure graphs' dialog box to close the menu and dialog box immediately
8

The 'One scale' extended submenu.
You can select curves what you need by using the checkboxes to set the same scale.
Click 'SET SET CURVES TO SAME SCALE' item for apply
Click 'Back' menu item to go back to main menu.
Click 'Apply change' or 'Cancel' button on the main 'Configure graphs' dialog box to close the menu and dialog box immediately
9

The 'Centered' extended submenu.
You can select curves what you need by using the checkboxes to centered.
Click 'SET CURVES TO ZERO OFFSET' item for apply
Click 'Back' menu item to go back to main menu.
Click 'Apply change' or 'Cancel' button on the main 'Configure graphs' dialog box to close the menu and dialog box immediately
10

The single curve submenu has one 'Full range' extended item:
It is like 'Full range' extended submenu, but for one selected curve only.
11

If you open context menu for one curves chart, then you see the short menu:
12

When you store the chart configuration in the workspace, the MinMax values stored for next using too.

This is the VITE WEB version the PR
#726

@demvlad
Copy link
Contributor Author

demvlad commented May 4, 2024

The small improvement:
The mouse click at curves on the legend works like toggle button (make the analyser chart as visible/unvisible)

Copy link

sonarcloud bot commented May 8, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
3 Security Hotspots
C Reliability Rating on New Code (required ≥ A)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@nerdCopter nerdCopter marked this pull request as draft May 9, 2024 13:00
@nerdCopter
Copy link
Member

PWA version was merged.

This PR set as draft and labeled Do not merge.
This PR could be recreated against 3.7.0_NWjs_maintenance if desired, but old github workflows are no longer active. End-users would have to build locally.

This PR should be closed.

@nerdCopter
Copy link
Member

although useful, this file should not have been committed.
./Workspace/workspaces-ctzsnooze.json

@demvlad
Copy link
Contributor Author

demvlad commented May 9, 2024

Ok. I am closing this PR, but the github branch will be active sometime.

@nerdCopter
Copy link
Member

nerdCopter commented May 9, 2024

i briefly tried to recreate a rebase and/or squash, but there were conflicts that i was not keen to fix. if you feel like doing it, welcome.
solved here: https://github.com/nerdCopter/blackbox-log-viewer/tree/20240509_NWjs_plus_Demvlad

@demvlad
Copy link
Contributor Author

demvlad commented May 9, 2024

i briefly tried to recreate a rebase and/or squash, but there were conflicts that i was not keen to fix. if you feel like doing it, welcome.

Yes, this PR have many merge conflicts with Vite Web.
But it include the all last updates and can be used as local version for someone

@demvlad
Copy link
Contributor Author

demvlad commented May 9, 2024

although useful, this file should not have been committed. ./Workspace/workspaces-ctzsnooze.json

i will do this workspace as default in this version too.

@demvlad
Copy link
Contributor Author

demvlad commented May 9, 2024

Closed!

@demvlad demvlad closed this May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants