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

4 Bugs #4

Open
1rf1 opened this issue Jul 8, 2022 · 0 comments
Open

4 Bugs #4

1rf1 opened this issue Jul 8, 2022 · 0 comments

Comments

@1rf1
Copy link

1rf1 commented Jul 8, 2022

Hi!

First of all thank you for providing this useful multimeter tool! I found 4 bugs in the Measurement class:

  • Instead of "DIODE", you wrote "DIDOE"
  • On line 146, in the 'unit' property, it should be return self._data['unit'] instead of return self._data['display_unit'].
  • The Decimal.rotate function doesn't work for right-shifting (for negative exponents)
  • When in overload mode, the 'unit' variable retains the exponent prefix, e.g. "mV" instead of "V".

To fix the last two issues, I rewrote lines 242 - 245:

        if self._data['unit'][0] in self._EXPONENTS:
            if not self._data['overload']:
                self._data['decimal'] = self._data['decimal']*decimal.Decimal(10)**self._EXPONENTS[self.unit[0]]
            self._data['unit'] = self._data['unit'][1:]  # remove first char
@Eheran1 Eheran1 mentioned this issue Mar 31, 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