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

Yukon Host: Low currents are overreported #1

Open
ZodiusInfuser opened this issue Oct 10, 2023 · 0 comments
Open

Yukon Host: Low currents are overreported #1

ZodiusInfuser opened this issue Oct 10, 2023 · 0 comments

Comments

@ZodiusInfuser
Copy link
Member

Revisit this section of code:

def u16_to_current(u16):
# return (((u16 * 3.3) / 65535) * ( 1 / (2.99 * 4020 * 0.0005 / 120))) # Ideal equation, kept for reference
# Commented the below out as it reported underestimates for low current draws
# if u16 >= MEASURED_AT_CURRENT_MID:
# return ((u16 - MEASURED_AT_CURRENT_MID) * MEASURED_TO_CURRENT_MAX_MID) + CURRENT_MID
# else:
# return max(((u16 - MEASURED_AT_CURRENT_MIN) * MEASURED_TO_CURRENT_MID_MIN) + CURRENT_MIN, 0.0)
return max(((u16 - MEASURED_AT_CURRENT_MID) * MEASURED_TO_CURRENT_MAX_MID) + CURRENT_MID, 0.0) # This sadly overreports low current draws

See if anything can be done to address the overreporting, but not under report either (as is the issue with the currently commented out code)

@ZodiusInfuser ZodiusInfuser changed the title Low currents are overreported Yukon: Low currents are overreported Dec 1, 2023
@ZodiusInfuser ZodiusInfuser changed the title Yukon: Low currents are overreported Yukon Host: Low currents are overreported Dec 14, 2023
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

No branches or pull requests

1 participant