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

pdo: expand storage types to cover common units #16

Merged
merged 1 commit into from
May 29, 2024

Conversation

sjoerdsimons
Copy link
Contributor

Using e.g. si::u8::ElectricPotential with a base unit of decivolts can not be converted to milivolts (which is the obvious conversion) as the u8 milivolts range is only 0 - 255mv.. Same for current. Expand the storage to 16 bits so the full range can be exposes as milivolt/miliamp

Using e.g. si::u8::ElectricPotential with a base unit of decivolts can
not be converted to milivolts (which is the obvious conversion) as the
u8 milivolts range is only 0 - 255mv.. Same for current. Expand the
storage to 16 bits so the full range can be exposes as milivolt/miliamp

Signed-off-by: Sjoerd Simons <[email protected]>
@fmckeogh fmckeogh merged commit ad17cc7 into fmckeogh:main May 29, 2024
2 checks passed
okhsunrog added a commit to okhsunrog/usb-pd-rs that referenced this pull request Jun 18, 2024
pdo: expand storage types to cover common units
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.

2 participants