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

Allow switching Brief page circular gauges from percentages to units #551

Closed
chriadam opened this issue Nov 20, 2023 · 17 comments · Fixed by #908
Closed

Allow switching Brief page circular gauges from percentages to units #551

chriadam opened this issue Nov 20, 2023 · 17 comments · Fixed by #908
Assignees
Milestone

Comments

@chriadam
Copy link
Contributor

Matthijs has asked if we could add a setting to allow switching the Brief page circular gauge values from Percentages to being "raw" units (e.g. Battery 87% to Battery 126 AH).

@chriadam
Copy link
Contributor Author

Note that we might have to do manual unit conversion (e.g. L to kL etc) if the base value would make the string too long to "fit" in the quarter circle area allowed for the labels.

@chriadam
Copy link
Contributor Author

Marking as 1.0.0, medium_prio.

@chriadam chriadam added this to the Version 1.0.0 milestone Jan 31, 2024
@DanielMcInnes
Copy link
Contributor

settings -> Brief View -> ....

@ReinvdZee
Copy link

This dbus path is already on the dbus: /Settings/Gui/BriefView/ShowPercentages. I'm not entirely sure which service is adding this path.

Sounds like this path is supposed to be used for switching between percentages and units. @chriadam, @DanielMcInnes?

@ReinvdZee
Copy link

@chriadam, @DanielMcInnes,

It turns out that /Settings/Gui/BriefView/ShowPercentages is already added by localsettings. This one can be used by gui-v2

@jpetrell
Copy link
Contributor

jpetrell commented Mar 1, 2024

Matthijs has asked if we could add a setting to allow switching the Brief page circular gauge values from Percentages to being "raw" units

Brief page circular gauges already support displaying percentages, which can be activated from Settings > Display& Language > Brief view levels > Toggle Show % on/off (uses /Settings/Gui/BriefView/ShowPercentages that Rein mentioned).

image

@blammit
Copy link
Contributor

blammit commented Mar 5, 2024

Yes, /Settings/Gui/BriefView/ShowPercentages is used to control whether the percentages are shown, but we don't have a setting to control whether it shows percentages as opposed to raw units.

We could add another setting like ShowRawValues or maybe use a different setting altogether like TankUnits and use that to control all three possibilities, e.g. 0 = do not show percentage or raw units, 1 = show percentage, 2 = show raw unit value. @ReinvdZee what do you think?

@ReinvdZee
Copy link

@blammit,

e.g. 0 = do not show percentage or raw units

So there is supposed to be an option to show nothing? Or not show any unit (just numbers)?

If there are three options, and they are always exclusive, then I would propose using one path (can be /Settings/Gui/BriefView/ShowPercentages) with 3 options.

@blammit
Copy link
Contributor

blammit commented Mar 6, 2024

@blammit,

e.g. 0 = do not show percentage or raw units

So there is supposed to be an option to show nothing? Or not show any unit (just numbers)?

Currently it is used as either true/false, so true = show %, and false = show nothing.

If there are three options, and they are always exclusive, then I would propose using one path (can be /Settings/Gui/BriefView/ShowPercentages) with 3 options.

My initial thought was that a name like ShowPercentages doesn't indicate a 3-option value, but looking at it again, it seems fine to use it in this manner. Sounds good to me.

@ReinvdZee
Copy link

Currently it is used as either true/false, so true = show %, and false = show nothing.

Would one actually prefer to have the brief page show "nothing"? What unit will the displayed number be in then?

Afaic, the only useful options are to show the values in percentages (ShowPercentages = true), or to show absolute units (ShowPercentages = false).

@blammit
Copy link
Contributor

blammit commented Mar 6, 2024

Would one actually prefer to have the brief page show "nothing"? What unit will the displayed number be in then?

Currently if you set ShowPercentages = false, then it will just show the tank name. E.g. just "battery", "Freshwater" etc. in the screenshot above.

@ReinvdZee
Copy link

Currently if you set ShowPercentages = false, then it will just show the tank name. E.g. just "battery", "Freshwater" etc. in the screenshot above.

Understood, then it makes sense to have 3 options. I would propose to rename /Settings/Gui/BriefView/ShowPercentages to /Settings/Gui/BriefView/Unit and let it have the options 0 ("none"), 1 ("absolute") and 2 ("percentage")

@blammit
Copy link
Contributor

blammit commented Mar 6, 2024

Currently if you set ShowPercentages = false, then it will just show the tank name. E.g. just "battery", "Freshwater" etc. in the screenshot above.

Understood, then it makes sense to have 3 options. I would propose to rename /Settings/Gui/BriefView/ShowPercentages to /Settings/Gui/BriefView/Unit and let it have the options 0 ("none"), 1 ("absolute") and 2 ("percentage")

Sounds good to me. Can gui-v2 use it like this already, or is ShowPercentages currently limited with a maximum value of 1?

@ReinvdZee
Copy link

@blammit, Currently, ShowPercentages has a maximum of 1.

If there are no objections I'll remove /Settings/Gui/BriefView/ShowPercentages and add /Settings/Gui/BriefView/Unit with a maximum of 2.

@jhofstee, @mpvader?

@mpvader
Copy link
Contributor

mpvader commented Mar 7, 2024

Ok

ReinvdZee added a commit to victronenergy/meta-victronenergy that referenced this issue Mar 7, 2024
Removed "/Settings/Gui/BriefView/ShowPercentages" and
added "/Settings/Gui/BriefView/Unit" with 3 options:
- 0: show no values and units on the briefview
- 1: show value in absolute units
- 2: show percentages

victronenergy/gui-v2#551
ReinvdZee added a commit to victronenergy/meta-victronenergy that referenced this issue Mar 7, 2024
Removed "/Settings/Gui/BriefView/ShowPercentages" and
added "/Settings/Gui/BriefView/Unit" with 3 options:
- 0: show no values and units on the briefview
- 1: show value in absolute units
- 2: show percentages

Default value is set to 1
victronenergy/gui-v2#551
@ReinvdZee
Copy link

ReinvdZee commented Mar 7, 2024

I added the setting.

@jpetrell
Copy link
Contributor

  • 1: show value in absolute units
    Default value is set to 1

Sorry just to verify do we want to change the default from percentages to absolute unit values? I don't have preferences either way, just the original issue description talks about adding a setting to allow switching from percentages to "raw" units, not the other way around.

@jpetrell jpetrell self-assigned this Mar 26, 2024
ReinvdZee added a commit to victronenergy/meta-victronenergy that referenced this issue Mar 28, 2024
Removed "/Settings/Gui/BriefView/ShowPercentages" and
added "/Settings/Gui/BriefView/Unit" with 3 options:
- 0: show no values and units on the briefview
- 1: show value in absolute units
- 2: show percentages

Default value is set to 2
victronenergy/gui-v2#551
jhofstee pushed a commit to victronenergy/meta-victronenergy that referenced this issue Mar 29, 2024
added "/Settings/Gui/BriefView/Unit" with 3 options:
- 0: show no values and units on the briefview
- 1: show value in absolute units
- 2: show percentages

Default value is set to 2

victronenergy/gui-v2#551

JHO: don't remove /Settings/Gui/BriefView/ShowPercentages yet, it is still in use.
jpetrell added a commit that referenced this issue Apr 3, 2024
Allow showing the remaining tank levels in absolute volumes,
but show the remaining battery level always in percentages.

Fixes #551.
jpetrell added a commit that referenced this issue Apr 3, 2024
Allow showing the remaining tank levels in absolute volumes,
but show the remaining battery level always in percentages.

Fixes #551.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants