Battery-indicator: add color based voltage level indicator#2273
Merged
ArturoManzoli merged 1 commit intobluerobotics:masterfrom Dec 10, 2025
Merged
Conversation
1a6ab04 to
8b178d4
Compare
rafaellehmkuhl
requested changes
Dec 9, 2025
Comment on lines
237
to
246
| const voltageToColorScheme = useBlueOsStorage<Record<BatteryLevel, string>>( | ||
| 'cockpit-user-voltage-color-scheme', | ||
| defaultBatteryLevelColorScheme | ||
| ) | ||
|
|
||
| const userBatteryThresholds = useBlueOsStorage<BatteryLevelThresholds>( | ||
| 'cockpit-user-battery-levels', | ||
| defaultBatteryLevelThresholds | ||
| ) | ||
|
|
Member
There was a problem hiding this comment.
Being a BlueOS Synced Storage, those will be global, meaning a user that operates both ROVs and Boats (which use different batteries with different voltage levels) are forced to have a single map of levels to colors.
I think the correct approach here is to put those in the widget options instead, so it's tied to the profile, which is already tied to different vehicle types.
Contributor
Author
There was a problem hiding this comment.
Agreed. It makes more sense
| return 'unknown' | ||
| }) | ||
|
|
||
| const currentBatteryColor = computed(() => { |
Member
Signed-off-by: Arturo Manzoli <[email protected]>
8b178d4 to
9eb683f
Compare
rafaellehmkuhl
approved these changes
Dec 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

battery-indicatormini widget;Closes #2272