From 663419a7e096276b490d5e515d2ee2bd02436e9e Mon Sep 17 00:00:00 2001 From: Liz Date: Fri, 8 Aug 2025 13:46:33 -0400 Subject: [PATCH] clean up comments --- README.rst | 2 +- adafruit_qmc5883p.py | 6 +++++- examples/qmc5883p_simpletest.py | 8 +++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 0ab774e..50ab249 100644 --- a/README.rst +++ b/README.rst @@ -105,7 +105,7 @@ Usage Example while True: mag_x, mag_y, mag_z = sensor.magnetic - print(f"X:{mag_x:10.2f}, Y:{mag_y:10.2f}, Z:{mag_z:10.2f} uT") + print(f"X:{mag_x:2.3f}, Y:{mag_y:2.3f}, Z:{mag_z:2.3f} G") print("") time.sleep(1) diff --git a/adafruit_qmc5883p.py b/adafruit_qmc5883p.py index d44f473..b898142 100644 --- a/adafruit_qmc5883p.py +++ b/adafruit_qmc5883p.py @@ -100,7 +100,11 @@ _LSB_PER_GAUSS = {RANGE_30G: 1000.0, RANGE_12G: 2500.0, RANGE_8G: 3750.0, RANGE_ class QMC5883P: - """Driver for the QMC5883P 3-axis magnetometer.""" + """Driver for the QMC5883P 3-axis magnetometer. + + :param ~busio.I2C i2c_bus: The I2C bus the QMC5883P is connected to. + :param int address: The I2C address of the device. Defaults to :const:`0x3C` + """ # Register definitions using adafruit_register _chip_id = ROUnaryStruct(_CHIPID, "