Skip to content

Generic Inputs: fix custom unit display#2861

Open
blammit wants to merge 1 commit intomainfrom
blam/iochannel-label
Open

Generic Inputs: fix custom unit display#2861
blammit wants to merge 1 commit intomainfrom
blam/iochannel-label

Conversation

@blammit
Copy link
Contributor

@blammit blammit commented Mar 5, 2026

Fixes #2869

Fixes to show the custom unit, as per here:

image

valueText: quantityInfo.number
unit: Global.systemSettings.toPreferredUnit(ioChannel.unitType)
unitText: quantityInfo.unit === VenusOS.Units_None ? ioChannel.unitText : quantityInfo.unit
unitText: quantityInfo.unitType === VenusOS.Units_None ? ioChannel.unitText : quantityInfo.unit
Copy link
Contributor

Choose a reason for hiding this comment

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

the last one is also quantityInfo.unit should it also be updated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, as quantityInfo.unit is a string, while quantityInfo.unitType is an int.

(Would be nice to rename quantityInfo.unit to quantityInfo.unitText at some point to reduce confusion.)

@blammit blammit force-pushed the blam/iochannel-label branch from c0b65e2 to 76e35a3 Compare March 11, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generic Input API: unit not showing

2 participants