You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 25, 2019. It is now read-only.
LSM303.set_mag_gain does not refer instantiated object.
Consequently, the following code fails: lsm303 = Adafruit_LSM303.LSM303() lsm303.set_mag_gain(gain=0x80)
with a TypeError: set_mag_gain() got multiple values for argument 'gain'
Changing line 88 of LSM303.py from: def set_mag_gain(gain=LSM303_MAGGAIN_1_3):
to def set_mag_gain(self, gain=LSM303_MAGGAIN_1_3):
fixes the issue.
The text was updated successfully, but these errors were encountered:
LSM303.set_mag_gain does not refer instantiated object.
Consequently, the following code fails:
lsm303 = Adafruit_LSM303.LSM303()
lsm303.set_mag_gain(gain=0x80)
with a TypeError: set_mag_gain() got multiple values for argument 'gain'
Changing line 88 of LSM303.py from:
def set_mag_gain(gain=LSM303_MAGGAIN_1_3):
to
def set_mag_gain(self, gain=LSM303_MAGGAIN_1_3):
fixes the issue.
The text was updated successfully, but these errors were encountered: