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

Made upspeedgraph and downspeed graph scale on a common axis #1991

Merged
merged 2 commits into from
Jul 21, 2024
Merged

Made upspeedgraph and downspeed graph scale on a common axis #1991

merged 2 commits into from
Jul 21, 2024

Conversation

donutAnees
Copy link
Contributor

Checklist

  • I have described the changes
  • All new code is licensed under GPLv3

Description

Before

In the current latest code of conky, downspeedgraph and upspeedgraph look the same because they're both individually scaled with respect to max value.

Screenshot 2024-07-20 at 10 59 35 PM

After

Screenshot 2024-07-21 at 3 15 48 AM Screenshot 2024-07-21 at 3 15 59 AM

This has now been fixed and both of them are scaled on a common axis. I have tested the code, and it does not influence any other graphs.

The changes made include

  1. Adding char speedgraph flag to the struct graph and struct special_node.
  2. Declaring a global double maxval to keep track of the current max value across the two graphs.
  3. Adding parameter char speedgraph to scan_graph method.
  4. And finally checking if the current value getting added is bigger than maxval, if so we make our scale = maxval, in the graph_append method.

Fixes #1820

@github-actions github-actions bot added sources PR modifies project sources tests related to project tests networking related to network information reporting rendering related to code that handles rendering, excluding the used graphics API disk io related to disk I/O statistics nvidia related to Nvidia GPU information reporting text related to `conky.text` variables, their parsing or implementation labels Jul 20, 2024
Copy link

netlify bot commented Jul 20, 2024

Deploy Preview for conkyweb canceled.

Name Link
🔨 Latest commit a22ce03
🔍 Latest deploy log https://app.netlify.com/sites/conkyweb/deploys/669c38fa17b3e5000839bd1b

Copy link
Owner

@brndnmtthws brndnmtthws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks!

A bit weird that we mix bool, char, true/false, TRUE/FALSE but that's something for another PR.

@brndnmtthws brndnmtthws added the feature suggest addition of new functionality that isn't currently supported in any way label Jul 21, 2024
@brndnmtthws brndnmtthws merged commit ed6d188 into brndnmtthws:main Jul 21, 2024
39 checks passed
@donutAnees donutAnees deleted the upspeed_downspeed_fix branch July 21, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disk io related to disk I/O statistics feature suggest addition of new functionality that isn't currently supported in any way networking related to network information reporting nvidia related to Nvidia GPU information reporting rendering related to code that handles rendering, excluding the used graphics API sources PR modifies project sources tests related to project tests text related to `conky.text` variables, their parsing or implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: make downspeedgraph and upspeedgraph use same scaling
2 participants