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

AD5686 - get and set channel volts is inconsistent #585

Open
brunolalb opened this issue Aug 1, 2024 · 0 comments
Open

AD5686 - get and set channel volts is inconsistent #585

brunolalb opened this issue Aug 1, 2024 · 0 comments

Comments

@brunolalb
Copy link

Setting the voltage of a channel has to be done in volts, but getting returns it in milivolts.
See the getter and setter function (ad5686.py at line 118):

      def to_raw(self, val):
            """Converts raw value to SI"""
            return int(1000.0 * val / self.scale)

        @property
        def volts(self):
            """AD5686 channel value in volts"""
            return self.raw * self.scale

        @volts.setter
        def volts(self, val):
            """AD5686 channel value in volts"""
            self.raw = self.to_raw(val)
@brunolalb brunolalb changed the title AD5686 - get and set channel volts is inconsistent AD5686 - bugs Aug 1, 2024
@brunolalb brunolalb changed the title AD5686 - bugs AD5686 - get and set channel volts is inconsistent Aug 1, 2024
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