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

Bug: Resistor value of R raises OverflowError exception #136

Open
Electro707 opened this issue Nov 21, 2022 · 0 comments
Open

Bug: Resistor value of R raises OverflowError exception #136

Electro707 opened this issue Nov 21, 2022 · 0 comments

Comments

@Electro707
Copy link
Contributor

There is a bug where if a resistor value is just R, an OverflowError is raised by power = math.floor(res.log10()) - 1 and crashes the application.

The reason is because the read_resistance interprets R as 0 ohms if one is to run that function manually. This means that we need to solve two issues:

  • The read_resistance function should return an invalid value if numbers like R and M are set for the resistance, so essentially a prefix/suffix without a number
  • We need the _apply_resistor_code to handle resistor values of zeros.

I do plan on fixing the above issues, I just wanted to raise this Issue to keep track of it and not forget about it.

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